diff options
author | Xining Xu <[email protected]> | 2024-05-07 15:27:57 +1200 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2024-05-11 15:51:44 -0700 |
commit | b1be5844c1a0124a49a30a20a189d0a53aa10578 (patch) | |
tree | 1a3d6ee7f85d13832d9aaa9574c94dcba8903521 /drivers/tty/serial/esp32_acm.c | |
parent | 6813216bbdba18e182759d949589be95ebef290f (diff) |
scripts: checkpatch: check unused parameters for function-like macro
If function-like macros do not utilize a parameter, it might result in a
build warning. In our coding style guidelines, we advocate for utilizing
static inline functions to replace such macros. This patch verifies
compliance with the new rule.
For a macro such as the one below,
#define test(a) do { } while (0)
The test result is as follows.
WARNING: Argument 'a' is not used in function-like macro
#21: FILE: mm/init-mm.c:20:
+#define test(a) do { } while (0)
total: 0 errors, 1 warnings, 8 lines checked
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Xining Xu <[email protected]>
Tested-by: Barry Song <[email protected]>
Signed-off-by: Barry Song <[email protected]>
Acked-by: Joe Perches <[email protected]>
Cc: Chris Zankel <[email protected]>
Cc: Huacai Chen <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Andy Whitcroft <[email protected]>
Cc: Dwaipayan Ray <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: Lukas Bulwahn <[email protected]>
Cc: Max Filippov <[email protected]>
Cc: Jeff Johnson <[email protected]>
Cc: Charlemagne Lasse <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'drivers/tty/serial/esp32_acm.c')
0 files changed, 0 insertions, 0 deletions