Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1681760 > unrolled thread

[PATCH 00/18] treewide: Move storage class before return type

Started byJoe Perches <joe@perches.com>
First post2017-07-05 22:10 +0200
Last post2017-07-05 22:10 +0200
Articles 17 — 5 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 00/18] treewide: Move storage class before return type Joe Perches <joe@perches.com> - 2017-07-05 22:10 +0200
    [PATCH 09/18] MIPS: SMP: Move asmlinkage before return type Joe Perches <joe@perches.com> - 2017-07-05 22:10 +0200
    [PATCH 11/18] x86/efi: Move asmlinkage before return type Joe Perches <joe@perches.com> - 2017-07-05 22:10 +0200
    [PATCH 12/18] drivers: s390: Move static and inline before return type Joe Perches <joe@perches.com> - 2017-07-05 22:10 +0200
      Re: [PATCH 12/18] drivers: s390: Move static and inline before  return type Heiko Carstens <heiko.carstens@de.ibm.com> - 2017-07-06 12:30 +0200
        Re: [PATCH 12/18] drivers: s390: Move static and inline before  return type Joe Perches <joe@perches.com> - 2017-07-06 13:00 +0200
          Re: [PATCH 12/18] drivers: s390: Move static and inline before  return type Heiko Carstens <heiko.carstens@de.ibm.com> - 2017-07-06 14:30 +0200
            Re: [PATCH 12/18] drivers: s390: Move static and inline before return  type Julian Wiedmann <jwi@linux.vnet.ibm.com> - 2017-07-06 20:10 +0200
    [PATCH 01/18] checkpatch: improve the STORAGE_CLASS test Joe Perches <joe@perches.com> - 2017-07-05 22:10 +0200
    [PATCH 07/18] ia64: sn: pci: Move inline before type Joe Perches <joe@perches.com> - 2017-07-05 22:10 +0200
    [PATCH 18/18] ALSA: opl4: Move inline before return type Joe Perches <joe@perches.com> - 2017-07-05 22:10 +0200
      Re: [PATCH 18/18] ALSA: opl4: Move inline before return type Clemens Ladisch <clemens@ladisch.de> - 2017-07-05 22:40 +0200
      Re: [PATCH 18/18] ALSA: opl4: Move inline before return type Takashi Iwai <tiwai@suse.de> - 2017-07-06 09:30 +0200
    [PATCH 17/18] ARM: samsung: usb-ohci: Move inline before return type Joe Perches <joe@perches.com> - 2017-07-05 22:10 +0200
    [PATCH 13/18] drivers: tty: serial: Move inline before return type Joe Perches <joe@perches.com> - 2017-07-05 22:10 +0200
    [PATCH 15/18] video: fbdev: intelfb: Move inline before return type Joe Perches <joe@perches.com> - 2017-07-05 22:10 +0200
    [PATCH 03/18] ARM: HP Jornada 7XX: Move inline before return type Joe Perches <joe@perches.com> - 2017-07-05 22:10 +0200

#1681760 — [PATCH 00/18] treewide: Move storage class before return type

FromJoe Perches <joe@perches.com>
Date2017-07-05 22:10 +0200
Subject[PATCH 00/18] treewide: Move storage class before return type
Message-ID<tZYMx-2CG-3@gated-at.bofh.it>
Move the inline/asmlinkage keywords before the return types
Add a checkpatch test for this too.

Joe Perches (18):
  checkpatch: improve the STORAGE_CLASS test
  ARM: KVM: Move asmlinkage before type
  ARM: HP Jornada 7XX: Move inline before return type
  CRIS: gpio: Move inline before return type
  FRV: tlbflush: Move asmlinkage before return type
  ia64: Move inline before return type
  ia64: sn: pci: Move inline before type
  m68k: coldfire: Move inline before return type
  MIPS: SMP: Move asmlinkage before return type
  sh: Move inline before return type
  x86/efi: Move asmlinkage before return type
  drivers: s390: Move static and inline before return type
  drivers: tty: serial: Move inline before return type
  USB: serial: safe_serial: Move __inline__ before return type
  video: fbdev: intelfb: Move inline before return type
  video: fbdev: omap: Move inline before return type
  ARM: samsung: usb-ohci: Move inline before return type
  ALSA: opl4: Move inline before return type

 arch/arm/include/asm/kvm_hyp.h                 |  8 ++++----
 arch/arm/mach-sa1100/jornada720_ssp.c          |  2 +-
 arch/cris/arch-v10/drivers/gpio.c              |  4 ++--
 arch/frv/include/asm/tlbflush.h                |  8 ++++----
 arch/ia64/kernel/mca.c                         |  2 +-
 arch/ia64/sn/pci/pcibr/pcibr_ate.c             |  2 +-
 arch/ia64/sn/pci/tioce_provider.c              |  4 ++--
 arch/m68k/coldfire/intc-simr.c                 |  4 ++--
 arch/mips/include/asm/smp.h                    |  2 +-
 arch/sh/mm/cache-sh5.c                         |  2 +-
 arch/x86/include/asm/efi.h                     |  4 ++--
 drivers/s390/net/ctcm_main.c                   |  2 +-
 drivers/s390/net/qeth_l3_main.c                |  2 +-
 drivers/tty/serial/ioc3_serial.c               |  4 ++--
 drivers/tty/serial/ioc4_serial.c               |  4 ++--
 drivers/usb/serial/safe_serial.c               |  2 +-
 drivers/video/fbdev/intelfb/intelfbdrv.c       |  2 +-
 drivers/video/fbdev/omap/lcdc.c                |  6 +++---
 include/linux/platform_data/usb-ohci-s3c2410.h |  2 +-
 scripts/checkpatch.pl                          | 12 ++++++++++--
 sound/drivers/opl4/opl4_lib.c                  |  2 +-
 21 files changed, 44 insertions(+), 36 deletions(-)

-- 
2.10.0.rc2.1.g053435c

[toc] | [next] | [standalone]


#1681761 — [PATCH 09/18] MIPS: SMP: Move asmlinkage before return type

FromJoe Perches <joe@perches.com>
Date2017-07-05 22:10 +0200
Subject[PATCH 09/18] MIPS: SMP: Move asmlinkage before return type
Message-ID<tZYMy-2CG-31@gated-at.bofh.it>
In reply to#1681760
Make the code like the rest of the kernel.

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/mips/include/asm/smp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h
index 98a117a05fbc..bab3d41e5987 100644
--- a/arch/mips/include/asm/smp.h
+++ b/arch/mips/include/asm/smp.h
@@ -47,7 +47,7 @@ extern int __cpu_logical_map[NR_CPUS];
 /* Mask of CPUs which are currently definitely operating coherently */
 extern cpumask_t cpu_coherent_mask;
 
-extern void asmlinkage smp_bootstrap(void);
+extern asmlinkage void smp_bootstrap(void);
 
 extern void calculate_cpu_foreign_map(void);
 
-- 
2.10.0.rc2.1.g053435c

[toc] | [prev] | [next] | [standalone]


#1681762 — [PATCH 11/18] x86/efi: Move asmlinkage before return type

FromJoe Perches <joe@perches.com>
Date2017-07-05 22:10 +0200
Subject[PATCH 11/18] x86/efi: Move asmlinkage before return type
Message-ID<tZYMy-2CG-33@gated-at.bofh.it>
In reply to#1681760
Make the code like the rest of the kernel.

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/x86/include/asm/efi.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
index d2ff779f347e..796ff6c1aa53 100644
--- a/arch/x86/include/asm/efi.h
+++ b/arch/x86/include/asm/efi.h
@@ -33,7 +33,7 @@
 
 #ifdef CONFIG_X86_32
 
-extern unsigned long asmlinkage efi_call_phys(void *, ...);
+extern asmlinkage unsigned long efi_call_phys(void *, ...);
 
 #define arch_efi_call_virt_setup()	kernel_fpu_begin()
 #define arch_efi_call_virt_teardown()	kernel_fpu_end()
@@ -52,7 +52,7 @@ extern unsigned long asmlinkage efi_call_phys(void *, ...);
 
 #define EFI_LOADER_SIGNATURE	"EL64"
 
-extern u64 asmlinkage efi_call(void *fp, ...);
+extern asmlinkage u64 efi_call(void *fp, ...);
 
 #define efi_call_phys(f, args...)		efi_call((f), args)
 
-- 
2.10.0.rc2.1.g053435c

[toc] | [prev] | [next] | [standalone]


#1681764 — [PATCH 12/18] drivers: s390: Move static and inline before return type

FromJoe Perches <joe@perches.com>
Date2017-07-05 22:10 +0200
Subject[PATCH 12/18] drivers: s390: Move static and inline before return type
Message-ID<tZYMz-2CG-39@gated-at.bofh.it>
In reply to#1681760
Make the code like the rest of the kernel.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/s390/net/ctcm_main.c    | 2 +-
 drivers/s390/net/qeth_l3_main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c
index 1563b1458e44..2ade6131a89f 100644
--- a/drivers/s390/net/ctcm_main.c
+++ b/drivers/s390/net/ctcm_main.c
@@ -1115,7 +1115,7 @@ static const struct net_device_ops ctcm_mpc_netdev_ops = {
 	.ndo_start_xmit		= ctcmpc_tx,
 };
 
-void static ctcm_dev_setup(struct net_device *dev)
+static void ctcm_dev_setup(struct net_device *dev)
 {
 	dev->type = ARPHRD_SLIP;
 	dev->tx_queue_len = 100;
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 3062cde33a3d..8975cd321390 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -2408,7 +2408,7 @@ static int qeth_l3_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 	return rc;
 }
 
-int inline qeth_l3_get_cast_type(struct qeth_card *card, struct sk_buff *skb)
+inline int qeth_l3_get_cast_type(struct qeth_card *card, struct sk_buff *skb)
 {
 	int cast_type = RTN_UNSPEC;
 	struct neighbour *n = NULL;
-- 
2.10.0.rc2.1.g053435c

[toc] | [prev] | [next] | [standalone]


#1682323 — Re: [PATCH 12/18] drivers: s390: Move static and inline before return type

FromHeiko Carstens <heiko.carstens@de.ibm.com>
Date2017-07-06 12:30 +0200
SubjectRe: [PATCH 12/18] drivers: s390: Move static and inline before return type
Message-ID<u0ccO-32q-27@gated-at.bofh.it>
In reply to#1681764
On Wed, Jul 05, 2017 at 01:02:21PM -0700, Joe Perches wrote:
> Make the code like the rest of the kernel.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/s390/net/ctcm_main.c    | 2 +-
>  drivers/s390/net/qeth_l3_main.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)


> diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
> index 3062cde33a3d..8975cd321390 100644
> --- a/drivers/s390/net/qeth_l3_main.c
> +++ b/drivers/s390/net/qeth_l3_main.c
> @@ -2408,7 +2408,7 @@ static int qeth_l3_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
>  	return rc;
>  }
> 
> -int inline qeth_l3_get_cast_type(struct qeth_card *card, struct sk_buff *skb)
> +inline int qeth_l3_get_cast_type(struct qeth_card *card, struct sk_buff *skb)
>  {

Actually the function could be made static, and "inline" should be removed,
considering the large function body.

[toc] | [prev] | [next] | [standalone]


#1682350 — Re: [PATCH 12/18] drivers: s390: Move static and inline before return type

FromJoe Perches <joe@perches.com>
Date2017-07-06 13:00 +0200
SubjectRe: [PATCH 12/18] drivers: s390: Move static and inline before return type
Message-ID<u0cFP-3bQ-1@gated-at.bofh.it>
In reply to#1682323
On Thu, 2017-07-06 at 12:29 +0200, Heiko Carstens wrote:
> On Wed, Jul 05, 2017 at 01:02:21PM -0700, Joe Perches wrote:
> > Make the code like the rest of the kernel.
[]
> > diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.cqq
[]
> > @@ -2408,7 +2408,7 @@ static int qeth_l3_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
> >  	return rc;
> >  }
> > 
> > -int inline qeth_l3_get_cast_type(struct qeth_card *card, struct sk_buff *skb)
> > +inline int qeth_l3_get_cast_type(struct qeth_card *card, struct sk_buff *skb)
> >  {
> 
> Actually the function could be made static, and "inline" should be removed,
> considering the large function body.

I agree to a certain extent.

It's only used once and  it looks like Klaus-Dieter Wacker
just missed adding static to this function.

$ git log --stat -p -1 ce73e10ee0cb6
commit ce73e10ee0cb6cde1c5075a2803da0f0eb5b2324
Author: Klaus-Dieter Wacker <kdwacker@de.ibm.com>

But it also looks like inline is too often used in several
drivers/s390/net/*.c files, where most of those static inline
functions are only used once.

$ git grep -w inline drivers/s390/net/*.c | wc -l
42

Maybe inline removals should be a separate pass for all those.

[toc] | [prev] | [next] | [standalone]


#1682393 — Re: [PATCH 12/18] drivers: s390: Move static and inline before return type

FromHeiko Carstens <heiko.carstens@de.ibm.com>
Date2017-07-06 14:30 +0200
SubjectRe: [PATCH 12/18] drivers: s390: Move static and inline before return type
Message-ID<u0e4X-4gf-41@gated-at.bofh.it>
In reply to#1682350
On Thu, Jul 06, 2017 at 03:57:19AM -0700, Joe Perches wrote:
> On Thu, 2017-07-06 at 12:29 +0200, Heiko Carstens wrote:
> > On Wed, Jul 05, 2017 at 01:02:21PM -0700, Joe Perches wrote:
> > > Make the code like the rest of the kernel.
> []
> > > diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.cqq
> []
> > > @@ -2408,7 +2408,7 @@ static int qeth_l3_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
> > >  	return rc;
> > >  }
> > > 
> > > -int inline qeth_l3_get_cast_type(struct qeth_card *card, struct sk_buff *skb)
> > > +inline int qeth_l3_get_cast_type(struct qeth_card *card, struct sk_buff *skb)
> > >  {
> > 
> > Actually the function could be made static, and "inline" should be removed,
> > considering the large function body.
> 
> I agree to a certain extent.
> 
> It's only used once and  it looks like Klaus-Dieter Wacker
> just missed adding static to this function.
> 
> $ git log --stat -p -1 ce73e10ee0cb6
> commit ce73e10ee0cb6cde1c5075a2803da0f0eb5b2324
> Author: Klaus-Dieter Wacker <kdwacker@de.ibm.com>
> 
> But it also looks like inline is too often used in several
> drivers/s390/net/*.c files, where most of those static inline
> functions are only used once.
> 
> $ git grep -w inline drivers/s390/net/*.c | wc -l
> 42
> 
> Maybe inline removals should be a separate pass for all those.

Yes, Ursula or Julian can address this if they care.

[toc] | [prev] | [next] | [standalone]


#1682618 — Re: [PATCH 12/18] drivers: s390: Move static and inline before return type

FromJulian Wiedmann <jwi@linux.vnet.ibm.com>
Date2017-07-06 20:10 +0200
SubjectRe: [PATCH 12/18] drivers: s390: Move static and inline before return type
Message-ID<u0jnY-zr-19@gated-at.bofh.it>
In reply to#1682393
On 07/06/2017 02:25 PM, Heiko Carstens wrote:
> On Thu, Jul 06, 2017 at 03:57:19AM -0700, Joe Perches wrote:
>> On Thu, 2017-07-06 at 12:29 +0200, Heiko Carstens wrote:
>>> On Wed, Jul 05, 2017 at 01:02:21PM -0700, Joe Perches wrote:
>>>> Make the code like the rest of the kernel.
>> []
>>>> diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.cqq
>> []
>>>> @@ -2408,7 +2408,7 @@ static int qeth_l3_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
>>>>  	return rc;
>>>>  }
>>>>
>>>> -int inline qeth_l3_get_cast_type(struct qeth_card *card, struct sk_buff *skb)
>>>> +inline int qeth_l3_get_cast_type(struct qeth_card *card, struct sk_buff *skb)
>>>>  {
>>>
>>> Actually the function could be made static, and "inline" should be removed,
>>> considering the large function body.
>>
>> I agree to a certain extent.
>>
>> It's only used once and  it looks like Klaus-Dieter Wacker
>> just missed adding static to this function.
>>
>> $ git log --stat -p -1 ce73e10ee0cb6
>> commit ce73e10ee0cb6cde1c5075a2803da0f0eb5b2324
>> Author: Klaus-Dieter Wacker <kdwacker@de.ibm.com>
>>
>> But it also looks like inline is too often used in several
>> drivers/s390/net/*.c files, where most of those static inline
>> functions are only used once.
>>
>> $ git grep -w inline drivers/s390/net/*.c | wc -l
>> 42
>>
>> Maybe inline removals should be a separate pass for all those.
> 
> Yes, Ursula or Julian can address this if they care.
> 
true, no shortage of inline in s390/net. I'll see about spending a few
OCD cycles on it...

[toc] | [prev] | [next] | [standalone]


#1681765 — [PATCH 01/18] checkpatch: improve the STORAGE_CLASS test

FromJoe Perches <joe@perches.com>
Date2017-07-05 22:10 +0200
Subject[PATCH 01/18] checkpatch: improve the STORAGE_CLASS test
Message-ID<tZYMz-2CG-43@gated-at.bofh.it>
In reply to#1681760
Make sure static, extern, and asmlinkage appear before a specific type.

e.g.:
	int asmlinkage foo(void)
is better written
       asmlinkage int foo(void)

Signed-off-by: Joe Perches <joe@perches.com>
---
 scripts/checkpatch.pl | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 43171ed88115..e903028f6557 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5576,10 +5576,18 @@ sub process {
 			    "architecture specific defines should be avoided\n" .  $herecurr);
 		}
 
+# check that the storage class is not after a type
+		if ($line =~ /\b($Type)\s+($Storage)\b/) {
+			WARN("STORAGE_CLASS",
+			     "storage class '$2' should be located before type '$1'\n" . $herecurr);
+		}
 # Check that the storage class is at the beginning of a declaration
-		if ($line =~ /\b$Storage\b/ && $line !~ /^.\s*$Storage\b/) {
+		if ($line =~ /\b$Storage\b/ &&
+		    $line !~ /^.\s*$Storage/ &&
+		    $line =~ /^.\s*(.+?)\$Storage\s/ &&
+		    $1 !~ /[\,\)]\s*$/) {
 			WARN("STORAGE_CLASS",
-			     "storage class should be at the beginning of the declaration\n" . $herecurr)
+			     "storage class should be at the beginning of the declaration\n" . $herecurr);
 		}
 
 # check the location of the inline attribute, that it is between
-- 
2.10.0.rc2.1.g053435c

[toc] | [prev] | [next] | [standalone]


#1681767 — [PATCH 07/18] ia64: sn: pci: Move inline before type

FromJoe Perches <joe@perches.com>
Date2017-07-05 22:10 +0200
Subject[PATCH 07/18] ia64: sn: pci: Move inline before type
Message-ID<tZYMz-2CG-53@gated-at.bofh.it>
In reply to#1681760
Make the use of inline like the rest of the kernel.

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/ia64/sn/pci/pcibr/pcibr_ate.c | 2 +-
 arch/ia64/sn/pci/tioce_provider.c  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/ia64/sn/pci/pcibr/pcibr_ate.c b/arch/ia64/sn/pci/pcibr/pcibr_ate.c
index 5bc34eac9e01..b67bb4cb73ff 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_ate.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_ate.c
@@ -140,7 +140,7 @@ static inline u64 __iomem *pcibr_ate_addr(struct pcibus_info *pcibus_info,
 /*
  * Update the ate.
  */
-void inline
+inline void
 ate_write(struct pcibus_info *pcibus_info, int ate_index, int count,
 	  volatile u64 ate)
 {
diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c
index 46d3df4b03a1..3bd9abc35485 100644
--- a/arch/ia64/sn/pci/tioce_provider.c
+++ b/arch/ia64/sn/pci/tioce_provider.c
@@ -52,7 +52,7 @@
  * All registers defined in struct tioce will meet that criteria.
  */
 
-static void inline
+static inline void
 tioce_mmr_war_pre(struct tioce_kernel *kern, void __iomem *mmr_addr)
 {
 	u64 mmr_base;
@@ -78,7 +78,7 @@ tioce_mmr_war_pre(struct tioce_kernel *kern, void __iomem *mmr_addr)
 	}
 }
 
-static void inline
+static inline void
 tioce_mmr_war_post(struct tioce_kernel *kern, void __iomem *mmr_addr)
 {
 	u64 mmr_base;
-- 
2.10.0.rc2.1.g053435c

[toc] | [prev] | [next] | [standalone]


#1681768 — [PATCH 18/18] ALSA: opl4: Move inline before return type

FromJoe Perches <joe@perches.com>
Date2017-07-05 22:10 +0200
Subject[PATCH 18/18] ALSA: opl4: Move inline before return type
Message-ID<tZYMz-2CG-51@gated-at.bofh.it>
In reply to#1681760
Make the code like the rest of the kernel.

Signed-off-by: Joe Perches <joe@perches.com>
---
 sound/drivers/opl4/opl4_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/drivers/opl4/opl4_lib.c b/sound/drivers/opl4/opl4_lib.c
index bc345d564f8d..db76a5bf2bd2 100644
--- a/sound/drivers/opl4/opl4_lib.c
+++ b/sound/drivers/opl4/opl4_lib.c
@@ -29,7 +29,7 @@ MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>");
 MODULE_DESCRIPTION("OPL4 driver");
 MODULE_LICENSE("GPL");
 
-static void inline snd_opl4_wait(struct snd_opl4 *opl4)
+static inline void snd_opl4_wait(struct snd_opl4 *opl4)
 {
 	int timeout = 10;
 	while ((inb(opl4->fm_port) & OPL4_STATUS_BUSY) && --timeout > 0)
-- 
2.10.0.rc2.1.g053435c

[toc] | [prev] | [next] | [standalone]


#1681785 — Re: [PATCH 18/18] ALSA: opl4: Move inline before return type

FromClemens Ladisch <clemens@ladisch.de>
Date2017-07-05 22:40 +0200
SubjectRe: [PATCH 18/18] ALSA: opl4: Move inline before return type
Message-ID<tZZfA-2Op-19@gated-at.bofh.it>
In reply to#1681768
Joe Perches wrote:
> Make the code like the rest of the kernel.
>
> Signed-off-by: Joe Perches <joe@perches.com>

Acked-by: Clemens Ladisch <clemens@ladisch.de>

> ---
>  sound/drivers/opl4/opl4_lib.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/drivers/opl4/opl4_lib.c b/sound/drivers/opl4/opl4_lib.c
> index bc345d564f8d..db76a5bf2bd2 100644
> --- a/sound/drivers/opl4/opl4_lib.c
> +++ b/sound/drivers/opl4/opl4_lib.c
> @@ -29,7 +29,7 @@ MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>");
>  MODULE_DESCRIPTION("OPL4 driver");
>  MODULE_LICENSE("GPL");
>
> -static void inline snd_opl4_wait(struct snd_opl4 *opl4)
> +static inline void snd_opl4_wait(struct snd_opl4 *opl4)
>  {
>  	int timeout = 10;
>  	while ((inb(opl4->fm_port) & OPL4_STATUS_BUSY) && --timeout > 0)

[toc] | [prev] | [next] | [standalone]


#1682118 — Re: [PATCH 18/18] ALSA: opl4: Move inline before return type

FromTakashi Iwai <tiwai@suse.de>
Date2017-07-06 09:30 +0200
SubjectRe: [PATCH 18/18] ALSA: opl4: Move inline before return type
Message-ID<u09oC-1hk-17@gated-at.bofh.it>
In reply to#1681768
On Wed, 05 Jul 2017 22:02:27 +0200,
Joe Perches wrote:
> 
> Make the code like the rest of the kernel.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied, thanks.


Takashi

[toc] | [prev] | [next] | [standalone]


#1681771 — [PATCH 17/18] ARM: samsung: usb-ohci: Move inline before return type

FromJoe Perches <joe@perches.com>
Date2017-07-05 22:10 +0200
Subject[PATCH 17/18] ARM: samsung: usb-ohci: Move inline before return type
Message-ID<tZYMz-2CG-55@gated-at.bofh.it>
In reply to#1681760
Make the code like the rest of the kernel.

Signed-off-by: Joe Perches <joe@perches.com>
---
 include/linux/platform_data/usb-ohci-s3c2410.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/platform_data/usb-ohci-s3c2410.h b/include/linux/platform_data/usb-ohci-s3c2410.h
index 7fa1fbefc3f2..cc7554ae6e8b 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);
-- 
2.10.0.rc2.1.g053435c

[toc] | [prev] | [next] | [standalone]


#1681772 — [PATCH 13/18] drivers: tty: serial: Move inline before return type

FromJoe Perches <joe@perches.com>
Date2017-07-05 22:10 +0200
Subject[PATCH 13/18] drivers: tty: serial: Move inline before return type
Message-ID<tZYMA-2CG-61@gated-at.bofh.it>
In reply to#1681760
Make the code like the rest of the kernel.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/tty/serial/ioc3_serial.c | 4 ++--
 drivers/tty/serial/ioc4_serial.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/ioc3_serial.c b/drivers/tty/serial/ioc3_serial.c
index 2a61dd6b4009..906ee770ff4a 100644
--- a/drivers/tty/serial/ioc3_serial.c
+++ b/drivers/tty/serial/ioc3_serial.c
@@ -377,7 +377,7 @@ static struct ioc3_port *get_ioc3_port(struct uart_port *the_port)
  *			called per port from attach...
  * @port: port to initialize
  */
-static int inline port_init(struct ioc3_port *port)
+static inline int port_init(struct ioc3_port *port)
 {
 	uint32_t sio_cr;
 	struct port_hooks *hooks = port->ip_hooks;
@@ -1430,7 +1430,7 @@ static int receive_chars(struct uart_port *the_port)
  * @pending: interrupts to handle
  */
 
-static int inline
+static inline int
 ioc3uart_intr_one(struct ioc3_submodule *is,
 			struct ioc3_driver_data *idd,
 			unsigned int pending)
diff --git a/drivers/tty/serial/ioc4_serial.c b/drivers/tty/serial/ioc4_serial.c
index f96bcf9bee25..43d7d32eb150 100644
--- a/drivers/tty/serial/ioc4_serial.c
+++ b/drivers/tty/serial/ioc4_serial.c
@@ -824,7 +824,7 @@ pending_intrs(struct ioc4_soft *soft, int type)
  *			called per port from attach...
  * @port: port to initialize
  */
-static int inline port_init(struct ioc4_port *port)
+static inline int port_init(struct ioc4_port *port)
 {
 	uint32_t sio_cr;
 	struct hooks *hooks = port->ip_hooks;
@@ -1048,7 +1048,7 @@ static irqreturn_t ioc4_intr(int irq, void *arg)
  *			IOC4 with serial ports in the system.
  * @idd: Master module data for this IOC4
  */
-static int inline ioc4_attach_local(struct ioc4_driver_data *idd)
+static inline int ioc4_attach_local(struct ioc4_driver_data *idd)
 {
 	struct ioc4_port *port;
 	struct ioc4_port *ports[IOC4_NUM_SERIAL_PORTS];
-- 
2.10.0.rc2.1.g053435c

[toc] | [prev] | [next] | [standalone]


#1681773 — [PATCH 15/18] video: fbdev: intelfb: Move inline before return type

FromJoe Perches <joe@perches.com>
Date2017-07-05 22:10 +0200
Subject[PATCH 15/18] video: fbdev: intelfb: Move inline before return type
Message-ID<tZYMA-2CG-63@gated-at.bofh.it>
In reply to#1681760
Make the code like the rest of the kernel.

But there is an oddity here because the inline should probably be removed.

It's an extern function in intelfb.h and it is used in intelfbdrv.c and
intelfbhw.c.

The inline is kept here as I suppose it's possible for some compiler to
make the uses inline in intelfbdrv and and also create an external function
for intelfbhw.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/video/fbdev/intelfb/intelfbdrv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/intelfb/intelfbdrv.c b/drivers/video/fbdev/intelfb/intelfbdrv.c
index 6b444400a86c..ffc391208b27 100644
--- a/drivers/video/fbdev/intelfb/intelfbdrv.c
+++ b/drivers/video/fbdev/intelfb/intelfbdrv.c
@@ -907,7 +907,7 @@ static void intelfb_pci_unregister(struct pci_dev *pdev)
  *                       helper functions                      *
  ***************************************************************/
 
-int __inline__ intelfb_var_to_depth(const struct fb_var_screeninfo *var)
+__inline__ int intelfb_var_to_depth(const struct fb_var_screeninfo *var)
 {
 	DBG_MSG("intelfb_var_to_depth: bpp: %d, green.length is %d\n",
 		var->bits_per_pixel, var->green.length);
-- 
2.10.0.rc2.1.g053435c

[toc] | [prev] | [next] | [standalone]


#1681774 — [PATCH 03/18] ARM: HP Jornada 7XX: Move inline before return type

FromJoe Perches <joe@perches.com>
Date2017-07-05 22:10 +0200
Subject[PATCH 03/18] ARM: HP Jornada 7XX: Move inline before return type
Message-ID<tZYMA-2CG-65@gated-at.bofh.it>
In reply to#1681760
Convert 'u8 inline' to 'inline u8' to be the same style used
by the rest of the kernel.

Miscellanea:

jornada_ssp_reverse is an odd function.
It is declared inline but is also EXPORT_SYMBOL.
It is also apparently only used by jornada720_ssp.c
Likely the EXPORT_SYMBOL could be removed and the function
converted to static.

The addition of static and removal of EXPORT_SYMBOL was not done.

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/arm/mach-sa1100/jornada720_ssp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-sa1100/jornada720_ssp.c b/arch/arm/mach-sa1100/jornada720_ssp.c
index b143c4659346..7fc11a3c17b4 100644
--- a/arch/arm/mach-sa1100/jornada720_ssp.c
+++ b/arch/arm/mach-sa1100/jornada720_ssp.c
@@ -33,7 +33,7 @@ static unsigned long jornada_ssp_flags;
  * we need to reverse all data we receive from the mcu due to its physical location
  * returns : 01110111 -> 11101110
  */
-u8 inline jornada_ssp_reverse(u8 byte)
+inline u8 jornada_ssp_reverse(u8 byte)
 {
 	return
 		((0x80 & byte) >> 7) |
-- 
2.10.0.rc2.1.g053435c

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web