linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] include/linux/platform_data: beautify code, 'inline' is better in front of 'void'
@ 2013-03-25  2:36 Chen Gang
  2013-03-25  2:48 ` [Suggestion] scripts/checkpatch.pl: an issue about checking failed for a patch Chen Gang
  2013-03-25 23:32 ` [PATCH] include/linux/platform_data: beautify code, 'inline' is better in front of 'void' Greg KH
  0 siblings, 2 replies; 8+ messages in thread
From: Chen Gang @ 2013-03-25  2:36 UTC (permalink / raw)
  To: Mark Brown, Mauro Carvalho Chehab, nico, Arnd Bergmann
  Cc: Greg KH, linux-kernel


  better to let 'inline' in front of 'void'

Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 include/linux/platform_data/usb-ohci-s3c2410.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/platform_data/usb-ohci-s3c2410.h b/include/linux/platform_data/usb-ohci-s3c2410.h
index 7fa1fbe..cc7554a 100644
--- a/include/linux/platform_data/usb-ohci-s3c2410.h
+++ b/include/linux/platform_data/usb-ohci-s3c2410.h
@@ -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);
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Suggestion] scripts/checkpatch.pl: an issue about checking failed for a patch
  2013-03-25  2:36 [PATCH] include/linux/platform_data: beautify code, 'inline' is better in front of 'void' Chen Gang
@ 2013-03-25  2:48 ` Chen Gang
  2013-03-25 23:32 ` [PATCH] include/linux/platform_data: beautify code, 'inline' is better in front of 'void' Greg KH
  1 sibling, 0 replies; 8+ messages in thread
From: Chen Gang @ 2013-03-25  2:48 UTC (permalink / raw)
  To: apw, Joe Perches; +Cc: linux-kernel

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")


>From e8be21fd7b7126847a6ddfea5ac002c2ca2ca194 Mon Sep 17 00:00:00 2001
From: Chen Gang <gang.chen@asianux.com>
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'

Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 include/linux/platform_data/usb-ohci-s3c2410.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/platform_data/usb-ohci-s3c2410.h b/include/linux/platform_data/usb-ohci-s3c2410.h
index 7fa1fbe..cc7554a 100644
--- a/include/linux/platform_data/usb-ohci-s3c2410.h
+++ b/include/linux/platform_data/usb-ohci-s3c2410.h
@@ -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);
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] include/linux/platform_data: beautify code, 'inline' is better in front of 'void'
  2013-03-25  2:36 [PATCH] include/linux/platform_data: beautify code, 'inline' is better in front of 'void' Chen Gang
  2013-03-25  2:48 ` [Suggestion] scripts/checkpatch.pl: an issue about checking failed for a patch Chen Gang
@ 2013-03-25 23:32 ` Greg KH
  2013-03-26  1:22   ` Chen Gang
  1 sibling, 1 reply; 8+ messages in thread
From: Greg KH @ 2013-03-25 23:32 UTC (permalink / raw)
  To: Chen Gang
  Cc: Mark Brown, Mauro Carvalho Chehab, nico, Arnd Bergmann, linux-kernel

On Mon, Mar 25, 2013 at 10:36:22AM +0800, Chen Gang wrote:
> 
>   better to let 'inline' in front of 'void'

Why?  What does this fix?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] include/linux/platform_data: beautify code, 'inline' is better in front of 'void'
  2013-03-25 23:32 ` [PATCH] include/linux/platform_data: beautify code, 'inline' is better in front of 'void' Greg KH
@ 2013-03-26  1:22   ` Chen Gang
  2013-03-26  1:48     ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Chen Gang @ 2013-03-26  1:22 UTC (permalink / raw)
  To: Greg KH
  Cc: Mark Brown, Mauro Carvalho Chehab, nico, Arnd Bergmann, linux-kernel

On 2013年03月26日 07:32, Greg KH wrote:
> On Mon, Mar 25, 2013 at 10:36:22AM +0800, Chen Gang wrote:
>>
>>   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.



  :-)


-- 
Chen Gang

Asianux Corporation

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] include/linux/platform_data: beautify code, 'inline' is better in front of 'void'
  2013-03-26  1:22   ` Chen Gang
@ 2013-03-26  1:48     ` Greg KH
  2013-03-26  2:28       ` Chen Gang
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2013-03-26  1:48 UTC (permalink / raw)
  To: Chen Gang
  Cc: Mark Brown, Mauro Carvalho Chehab, nico, Arnd Bergmann, linux-kernel

On Tue, Mar 26, 2013 at 09:22:57AM +0800, Chen Gang wrote:
> On 2013年03月26日 07:32, Greg KH wrote:
> > On Mon, Mar 25, 2013 at 10:36:22AM +0800, Chen Gang wrote:
> >>
> >>   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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] include/linux/platform_data: beautify code, 'inline' is better in front of 'void'
  2013-03-26  1:48     ` Greg KH
@ 2013-03-26  2:28       ` Chen Gang
  2013-03-26  2:47         ` Nicolas Pitre
  0 siblings, 1 reply; 8+ messages in thread
From: Chen Gang @ 2013-03-26  2:28 UTC (permalink / raw)
  To: Greg KH
  Cc: Mark Brown, Mauro Carvalho Chehab, nico, Arnd Bergmann, linux-kernel

On 2013年03月26日 09:48, Greg KH wrote:
> On Tue, Mar 26, 2013 at 09:22:57AM +0800, Chen Gang wrote:
>> On 2013年03月26日 07:32, Greg KH wrote:
>>> On Mon, Mar 25, 2013 at 10:36:22AM +0800, Chen Gang wrote:
>>>>
>>>>   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 :)

  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.

> 
> greg k-h
> 
> 


-- 
Chen Gang

Asianux Corporation

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] include/linux/platform_data: beautify code, 'inline' is better in front of 'void'
  2013-03-26  2:28       ` Chen Gang
@ 2013-03-26  2:47         ` Nicolas Pitre
  2013-03-26  3:00           ` Chen Gang
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Pitre @ 2013-03-26  2:47 UTC (permalink / raw)
  To: Chen Gang
  Cc: Greg KH, Mark Brown, Mauro Carvalho Chehab, Arnd Bergmann, linux-kernel

On Tue, 26 Mar 2013, Chen Gang wrote:

>   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 <trivial@kernel.org>.


Nicolas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] include/linux/platform_data: beautify code, 'inline' is better in front of 'void'
  2013-03-26  2:47         ` Nicolas Pitre
@ 2013-03-26  3:00           ` Chen Gang
  0 siblings, 0 replies; 8+ messages in thread
From: Chen Gang @ 2013-03-26  3:00 UTC (permalink / raw)
  To: Nicolas Pitre
  Cc: Greg KH, Mark Brown, Mauro Carvalho Chehab, Arnd Bergmann, linux-kernel

On 2013年03月26日 10:47, Nicolas Pitre wrote:
> On Tue, 26 Mar 2013, Chen Gang wrote:
> 
>>   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 <trivial@kernel.org>.
> 

  ok

> 
> Nicolas
> 
> 


-- 
Chen Gang

Asianux Corporation

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-03-26  3:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-25  2:36 [PATCH] include/linux/platform_data: beautify code, 'inline' is better in front of 'void' Chen Gang
2013-03-25  2:48 ` [Suggestion] scripts/checkpatch.pl: an issue about checking failed for a patch Chen Gang
2013-03-25 23:32 ` [PATCH] include/linux/platform_data: beautify code, 'inline' is better in front of 'void' Greg KH
2013-03-26  1:22   ` Chen Gang
2013-03-26  1:48     ` Greg KH
2013-03-26  2:28       ` Chen Gang
2013-03-26  2:47         ` Nicolas Pitre
2013-03-26  3:00           ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).