include/linux/platform_data: beautify code, 'inline' is better in front of 'void'
PATCH 1/1 include/linux/platform_data: beautify code, 'inline' is better in front of 'void'
better to let 'inline' in front of 'void'
--- include/linux/platform_data/usb-ohci-s3c2410.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/platform_data/usb-ohci-s3c2410.h +1 -1
@@ -31,7 +31,7 @@ struct s3c2410_hcd_info {void (*report_oc)(struct s3c2410_hcd_info *,int ports); }; -static void inline s3c2410_usb_report_oc (struct s3c2410_hcd_info *info,int ports) +static inline void s3c2410_usb_report_oc (struct s3c2410_hcd_info *info,int ports) {if (info->report_oc !=NULL ) { (info->report_oc)(info, ports);
Signature · 1 line
1.7.7.6
[Suggestion] scripts/checkpatch.pl: an issue about checking failed for a patch
Hello Maintainers:
when I use ./scripts/checkpatch.pl to check a patch,
it reports a style issue.
but after check, I can not find issue.
(I use "static inline void" instead of "static void inline")
please help check.
thanks.
the related issue is:
--------------------------------------------------------------------------------------------------------------------------------
[root@gchenlinux linux-next]# ./scripts/checkpatch.pl /tmp/0003-include-linux-platform_data-beautify-code-inline-is-.patch
WARNING: line over 80 characters
#22: FILE: include/linux/platform_data/usb-ohci-s3c2410.h:34:
+static inline void s3c2410_usb_report_oc(struct s3c2410_hcd_info *info, int ports)
total: 0 errors, 1 warnings, 8 lines checked
/tmp/0003-include-linux-platform_data-beautify-code-inline-is-.patch has style problems, please review.
If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
--------------------------------------------------------------------------------------------------------------------------------
the related patch is :
("/tmp/0003-include-linux-platform_data-beautify-code-inline-is-.patch")
Quoted 1 line
From
e8be21fd7b7126847a6ddfea5ac002c2ca2ca194Mon Sep 17 00:00:00 2001
From: Chen Gang <[email protected]>
Date: Mon, 25 Mar 2013 10:25:53 +0800
Subject: [PATCH] include/linux/platform_data: beautify code, 'inline' is better in front of 'void'
better to let 'inline' in front of 'void'
--- include/linux/platform_data/usb-ohci-s3c2410.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/platform_data/usb-ohci-s3c2410.h +1 -1
@@ -31,7 +31,7 @@ struct s3c2410_hcd_info {void (*report_oc)(struct s3c2410_hcd_info *,int ports); }; -static void inline s3c2410_usb_report_oc (struct s3c2410_hcd_info *info,int ports) +static inline void s3c2410_usb_report_oc (struct s3c2410_hcd_info *info,int ports) {if (info->report_oc !=NULL ) { (info->report_oc)(info, ports);
Signature · 1 line
1.7.7.6
Quoted 2 lines · Chen Gang
better to let 'inline' in front of 'void'
Why? What does this fix?
Quoted 8 lines · Greg KH
Quoted 2 lines · Chen Gang
better to let 'inline' in front of 'void'
Why? What does this fix?
when I am compiling with "EXTRA_FLAGS=-W", I get a warning:
make V=1 EXTRA_CFLAGS=-W ARCH=arm randconfig make V=1 EXTRA_CFLAGS=-W ARCH=arm menuconfig
choose arm-linux-gnu- for cross chain prefix. choose S5pv210 for processor type
make V=1 EXTRA_CFLAGS=-W ARCH=arm
the warning is:
include/linux/platform_data/usb-ohci-s3c2410.h:34:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
it is only for beautify code, not fix a bug.
:-)
Signature · 3 lines
Chen Gang Asianux Corporation
Quoted 11 lines · Chen Gang
Quoted 8 lines · Greg KH
Quoted 2 lines · Chen Gang
better to let 'inline' in front of 'void'
Why? What does this fix?
when I am compiling with "EXTRA_FLAGS=-W", I get a warning:
That's not anything I really care about, sorry. No one sane builds the kernel like that :)
greg k-h
Quoted 11 lines · Greg KH
Quoted 10 lines · Chen Gang
Quoted 8 lines · Greg KH
Quoted 2 lines · Chen Gang
better to let 'inline' in front of 'void'
Why? What does this fix?
Quoted 4 lines
Quoted 1 line
when I am compiling with "EXTRA_FLAGS=-W", I get a warning:
That's not anything I really care about, sorry. No one sane builds the kernel like that :)
a hacker may find something "valuable" with the aid of compiler ;-)
maybe, it is a patch which is too minor to apply. I can understand :-)
thanks.
Quoted 4 lines
greg k-h
Signature · 3 lines
Chen Gang Asianux Corporation
Quoted 3 lines · Chen Gang
a hacker may find something "valuable" with the aid of compiler ;-)
maybe, it is a patch which is too minor to apply. I can understand :-)
You should send such patches to Jiri Kosina <[email protected]>.
Nicolas
Quoted 8 lines · Nicolas Pitre
Quoted 3 lines · Chen Gang
a hacker may find something "valuable" with the aid of compiler ;-)
maybe, it is a patch which is too minor to apply. I can understand :-)
You should send such patches to Jiri Kosina <[email protected]>.
ok
Quoted 4 lines
Nicolas
Signature · 3 lines
Chen Gang Asianux Corporation