diff options
| author | André Draszik <andre.draszik@linaro.org> | 2024-07-10 11:36:10 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-08-07 12:49:30 +0200 |
| commit | f523aa6d72598bcd2946c7e02d29f33f94806a15 (patch) | |
| tree | 7b646b0f3b14c9f805a87095910b31f7983113cf /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | usb: typec: tcpm/tcpci_maxim: clarify a comment (diff) | |
| download | linux-f523aa6d72598bcd2946c7e02d29f33f94806a15.tar.gz linux-f523aa6d72598bcd2946c7e02d29f33f94806a15.zip | |
usb: typec: tcpci: use GENMASK() for TCPC_CC_STATUS_CC[12]
The existing code here, particularly in maxim_contaminant.c, is
arguably quite hard to read due to the open-coded masking and shifting
spanning multiple lines.
Use GENMASK() and FIELD_GET() instead, which arguably make the code
much easier to follow.
While at it, use the symbolic name TCPC_CC_STATE_SRC_OPEN for one
instance of open-coded 0x0.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240710-tcpc-cleanup-v1-3-0ec1f41f4263@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions
