Skip to content

fujitsu-laptop: Consistent naming of constants

Michał Kępień lkml platform-driver-x86 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7platform/x86: fujitsu-laptop: Define constants for FUNC operationsdrivers/platform/x86/fujitsu-laptop.c+60 -4310 replies
2/7platform/x86: fujitsu-laptop: Define constants for FUNC featuresdrivers/platform/x86/fujitsu-laptop.c+29 -240 replies
3/7platform/x86: fujitsu-laptop: Define constants for FUNC feature statesdrivers/platform/x86/fujitsu-laptop.c+27 -230 replies
4/7platform/x86: fujitsu-laptop: Rename constants defining hotkey codesdrivers/platform/x86/fujitsu-laptop.c+18 -180 replies
5/7platform/x86: fujitsu-laptop: Tweak how constants are commented and laid outdrivers/platform/x86/fujitsu-laptop.c+27 -280 replies
6/7platform/x86: fujitsu-laptop: More accurately represent the hotkey ring buffer managed by firmwaredrivers/platform/x86/fujitsu-laptop.c+4 -52 replies
7/7platform/x86: fujitsu-laptop: Introduce fext_*() helper functionsdrivers/platform/x86/fujitsu-laptop.c+59 -570 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] fujitsu-laptop: Consistent naming of constants

This patch series is an attempt to organize all the named constants used throughout fujitsu-laptop so that their names more clearly convey their
purpose: a set of prefixes is introduced to "map" constant names to call_fext_func() parameters.

The chosen constant naming patterns are a compromise between readability and enabling longer conditional expressions to fit into the 80-character line length limit. Some changes (like those in patches 4/7 and 5/7) may be perceived as bikeshedding, so please just think of them as proposals, not fixes.

Finally, patch 7/7 again [1] proposes a set of helper functions which seem to be making quite a difference in terms of code readability in certain places (especially in long conditional expressions). YMMV, though, feel free to disagree.

This patch series should be applied on top of for-next as it builds on the previous patch series I submitted.

[1] https://www.spinics.net/lists/platform-driver-x86/msg11633.html

 drivers/platform/x86/fujitsu-laptop.c | 228 +++++++++++++++++++---------------
 1 file changed, 127 insertions(+), 101 deletions(-)
Signature · 1 line
2.16.2