Skip to content

staging: media: lirc: Fix several checkpatch issues

Ricardo Silva linux-media 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5staging: media: lirc: Fix whitespace style checksdrivers/staging/media/lirc/lirc_zilog.c+18 -190 replies
2/5staging: media: lirc: Fix NULL comparisons styledrivers/staging/media/lirc/lirc_zilog.c+24 -240 replies
3/5staging: media: lirc: Use __func__ for logging function namedrivers/staging/media/lirc/lirc_zilog.c+5 -40 replies
4/5staging: media: lirc: Use sizeof(*p) instead of sizeof(struct P)drivers/staging/media/lirc/lirc_zilog.c+3 -30 replies
5/5staging: media: lirc: Fix unbalanced braces around if/elsedrivers/staging/media/lirc/lirc_zilog.c+6 -40 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/5] staging: media: lirc: Fix several checkpatch issues

This patch series is intended to fix several checkpatch issues (from CHECK level) found on lirc_zilog.c:

The 1st patch focus on whitespace related fixes.
The 2nd patch fixes NULL comparisons style.
The 3rd patch is for using __func__ in logging functions that are to trace the function's name, instead of writing down the actual function name.
The 4th patch changes use of sizeof(struct s) to sizeof(*s_ptr) instead. Finally, the 5th patch fixes unbalanced braces around if/else statements.

All checks were fixed, except for the following (and why):

* CHECK: "Do not include the paragraph about writing to the Free Software Foundation...", in the file's header.
Didn't want to mess with the license notice, unless given explicit permission.

* CHECK: "struct mutex definition without comment", for the ir_lock mutex from struct IR. I understand the mutex is there to serialize access to the i2c bus but felt hesitant about adding such comment, due to lack of deeper knowledge about the driver.

* CHECK: "Please don't use multiple blank lines". Two instances of these were left because acting as logical code blocks separators (separating vars declarations from functions, etc.). They seem intended for readability purposes.

* CHECK: "Alignment should match open parenthesis", unchanged because makes the code more readable.

* CHECK: "usleep_range is preferred over udelay". Wouldn't know which range to use, due to lack of deeper knowledge about the module.

* CHECK: "ENOSYS means 'invalid syscall nr' and nothing else", in some of the module's ioctl function return paths. I believe correct return value here would be -ENOTTY, but had some doubts about doing the change, as this could break userspace. Will gladly do the change if it's OK.

Please advise if it's ok to go ahead and fix these remaining checks.

Ricardo Silva (5):
staging: media: lirc: Fix whitespace style checks
staging: media: lirc: Fix NULL comparisons style
staging: media: lirc: Use __func__ for logging function name
staging: media: lirc: Use sizeof(*p) instead of sizeof(struct P)
staging: media: lirc: Fix unbalanced braces around if/else

 drivers/staging/media/lirc/lirc_zilog.c | 110 ++++++++++++++++----------------
 1 file changed, 56 insertions(+), 54 deletions(-)
Signature · 1 line
2.12.2