Skip to content

staging: gdm72xx: Code cleanup

Michalis Pappas lkml 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest10 patches 0 repliesNew
  2. v410 patches 0 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10staging: gdm72xx: Remove unnecessary extern declarations from header filesdrivers/staging/gdm72xx/gdm_wimax.h drivers/staging/gdm72xx/sdio_boot.h drivers/staging/gdm72xx/usb_boot.h+6 -60 replies
2/10staging: gdm72xx: Replace comparisons on jiffies values with wrap-safe functionsdrivers/staging/gdm72xx/gdm_usb.c drivers/staging/gdm72xx/sdio_boot.c+3 -30 replies
3/10staging: gdm72xx: Modify a struct allocation to match coding standardsdrivers/staging/gdm72xx/gdm_qos.c+1 -10 replies
4/10staging: gdm72xx: Move logical continuation to previous line to conform to coding styledrivers/staging/gdm72xx/gdm_usb.c+2 -20 replies
5/10staging: gdm72xx: Fix some camel-case variablesdrivers/staging/gdm72xx/gdm_qos.c+15 -160 replies
6/10staging: gdm72xx: Fix braces to conform with coding styledrivers/staging/gdm72xx/gdm_wimax.c drivers/staging/gdm72xx/netlink_k.c+12 -110 replies
7/10staging: gdm72xx: Removed commented-out codedrivers/staging/gdm72xx/gdm_qos.h drivers/staging/gdm72xx/gdm_wimax.c drivers/staging/gdm72xx/gdm_wimax.h +1 more+1 -430 replies
8/10staging: gdm72xx: Whitespace fixes to conform to coding standardsdrivers/staging/gdm72xx/gdm_qos.c drivers/staging/gdm72xx/gdm_sdio.c drivers/staging/gdm72xx/gdm_usb.c +5 more+101 -1230 replies
9/10staging: gdm72xx: Indentation and other whitespace fixesdrivers/staging/gdm72xx/gdm_qos.c drivers/staging/gdm72xx/gdm_sdio.c drivers/staging/gdm72xx/gdm_sdio.h +7 more+97 -1290 replies
10/10staging: gdm72xx: Remove task from TODO listdrivers/staging/gdm72xx/TODO+0 -10 replies

Reviews trailers per patch

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

Read the v5 thread

Cover letter [PATCH v5 0/10] staging: gdm72xx: Code cleanup
Quoted 48 lines · Michalis Pappas

Ok, I generated a new patchset based on running checkpatch.pl with the --strict option, as well as any recommendations made earlier on this thread.

From the following patches, both 8/10 and 9/10 involve whitespace fixes:
the former fixes issues reported by checkpatch.pl while the latter is mostly indentation stuff found by inspecting the code, stray tabs etc. I am sending them as separate patches in case one wants to keep only one of them.

After applying the patches, the following issues are still reported by checkpatch.pl. My comments follow:

ERROR: Macros with complex values should be enclosed in parenthesis #34: FILE: usb_ids.h:34:

(quoted diff) +3 -0
+#define USB_DEVICE_BOOTLOADER(vid, pid)	\
+	{USB_DEVICE((vid), ((pid)&BL_PID_MASK)|B_DOWNLOAD)},	\
+	{USB_DEVICE((vid), ((pid)&BL_PID_MASK)|B_DOWNLOAD|B_DIFF_DL_DRV)}

We agreed on that one already.

WARNING:LONG_LINE: line over 80 characters

This comes out in cases where I slightly bent the 80 chars rule to improve readability. Should anyone complain that it doesn't fit their terminal I promise I'll revert it back ;)

WARNING: unchecked sscanf return value
#295: FILE: gdm_wimax.c:295:

(quoted diff) +1 -0
+		sscanf(e->dev->name, "wm%d", &idx);

From my understanding this should be ok. The value stored in e->dev>name is generated by __dev_alloc_name which does all the necessary checks for user supplied input etc, so it should be considered as a trusted value.

WARNING:SPACING: Missing a blank line after declarations

This is a false positive, as it refers to pointer-to-function declarations withing structures.

CHECK:BRACES: Blank lines aren't necessary after an open brace '{'

I found it to be more readable the way it was, so I didn't touch it.

CHECK:UNCOMMENTED_DEFINITION: spinlock_t definition without comment

I am not sure what the locks are used for so I am unable to write a comment on these.

Quoted 8 lines

Regards,

-Michalis
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Updates from v4:

* Fixed message subjects
* Improved commit messages
* Added forgotten signed-of-by's

Thanks,

-Michalis