[PATCH 0/6] usb: Use FIELD_MODIFY() for bitfield operations
Hans Zhang
18255117159 at 163.com
Thu Apr 30 09:39:13 PDT 2026
Replace open-coded bitfield modifications with the standard FIELD_MODIFY()
macro across multiple USB drivers (dwc3, xhci, typec). This improves
readability and adds compile-time checking without functional changes.
---
Hi, If the Maintainers think it's not necessary, please ignore it.
---
Hans Zhang (6):
usb: dwc3: Use FIELD_MODIFY()
usb: dwc3: google: Use FIELD_MODIFY()
usb: dwc3: dwc3-octeon: Use FIELD_MODIFY()
usb: xhci: Use FIELD_MODIFY()
usb: xhci-mtk: Use FIELD_MODIFY()
usb: typec: Use FIELD_MODIFY()
drivers/usb/dwc3/core.c | 12 ++++--------
drivers/usb/dwc3/dwc3-google.c | 5 ++---
drivers/usb/dwc3/dwc3-octeon.c | 11 ++++-------
drivers/usb/host/xhci-hub.c | 5 ++---
drivers/usb/host/xhci-mtk.c | 6 +++---
drivers/usb/typec/tcpm/tcpci.c | 11 ++++-------
6 files changed, 19 insertions(+), 31 deletions(-)
base-commit: 3b3bea6d4b9c162f9e555905d96b8c1da67ecd5b
--
2.34.1
More information about the Linux-mediatek
mailing list