* [PATCH 00/18] treewide: Move storage class before return type
@ 2017-07-05 20:02 Joe Perches
2017-07-05 20:02 ` [PATCH 12/18] drivers: s390: Move static and inline " Joe Perches
0 siblings, 1 reply; 6+ messages in thread
From: Joe Perches @ 2017-07-05 20:02 UTC (permalink / raw)
To: Andrew Morton, kvm, linux-arm-kernel, kvmarm, linux-m68k,
linux-efi, linux-s390, linux-serial, linux-ia64, linux-usb,
linux-fbdev, linux-omap, alsa-devel
Cc: linux-kernel, linux-cris-kernel, linux-mips, linux-sh
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 12/18] drivers: s390: Move static and inline before return type
2017-07-05 20:02 [PATCH 00/18] treewide: Move storage class before return type Joe Perches
@ 2017-07-05 20:02 ` Joe Perches
2017-07-06 10:29 ` Heiko Carstens
0 siblings, 1 reply; 6+ messages in thread
From: Joe Perches @ 2017-07-05 20:02 UTC (permalink / raw)
To: Andrew Morton, Julian Wiedmann, Ursula Braun
Cc: Martin Schwidefsky, Heiko Carstens, linux-s390, linux-kernel
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 12/18] drivers: s390: Move static and inline before return type
2017-07-05 20:02 ` [PATCH 12/18] drivers: s390: Move static and inline " Joe Perches
@ 2017-07-06 10:29 ` Heiko Carstens
2017-07-06 10:57 ` Joe Perches
0 siblings, 1 reply; 6+ messages in thread
From: Heiko Carstens @ 2017-07-06 10:29 UTC (permalink / raw)
To: Joe Perches
Cc: Andrew Morton, Julian Wiedmann, Ursula Braun, Martin Schwidefsky,
linux-s390, linux-kernel
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 12/18] drivers: s390: Move static and inline before return type
2017-07-06 10:29 ` Heiko Carstens
@ 2017-07-06 10:57 ` Joe Perches
2017-07-06 12:25 ` Heiko Carstens
0 siblings, 1 reply; 6+ messages in thread
From: Joe Perches @ 2017-07-06 10:57 UTC (permalink / raw)
To: Heiko Carstens, Klaus-Dieter Wacker
Cc: Andrew Morton, Julian Wiedmann, Ursula Braun, Martin Schwidefsky,
linux-s390, linux-kernel
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 12/18] drivers: s390: Move static and inline before return type
2017-07-06 10:57 ` Joe Perches
@ 2017-07-06 12:25 ` Heiko Carstens
2017-07-06 18:04 ` Julian Wiedmann
0 siblings, 1 reply; 6+ messages in thread
From: Heiko Carstens @ 2017-07-06 12:25 UTC (permalink / raw)
To: Joe Perches
Cc: Klaus-Dieter Wacker, Andrew Morton, Julian Wiedmann, Ursula Braun,
Martin Schwidefsky, linux-s390, linux-kernel
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 12/18] drivers: s390: Move static and inline before return type
2017-07-06 12:25 ` Heiko Carstens
@ 2017-07-06 18:04 ` Julian Wiedmann
0 siblings, 0 replies; 6+ messages in thread
From: Julian Wiedmann @ 2017-07-06 18:04 UTC (permalink / raw)
To: Heiko Carstens, Joe Perches
Cc: Klaus-Dieter Wacker, Andrew Morton, Ursula Braun,
Martin Schwidefsky, linux-s390, linux-kernel
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...
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-07-06 18:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-05 20:02 [PATCH 00/18] treewide: Move storage class before return type Joe Perches
2017-07-05 20:02 ` [PATCH 12/18] drivers: s390: Move static and inline " Joe Perches
2017-07-06 10:29 ` Heiko Carstens
2017-07-06 10:57 ` Joe Perches
2017-07-06 12:25 ` Heiko Carstens
2017-07-06 18:04 ` Julian Wiedmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox