* [minor & trivial patch] kill some potential warnings about inline keyword placement - 2.6.1-rc1-mm1
@ 2004-01-04 0:01 Jesper Juhl
2004-01-04 0:09 ` Russell King
0 siblings, 1 reply; 3+ messages in thread
From: Jesper Juhl @ 2004-01-04 0:01 UTC (permalink / raw)
To: linux-kernel
Hi,
I'm compiling 2.6.1-rc1-mm1 with "-W -Wall" to look for potential problems
and minor stuff to clean up.
One of the things that enabling the extra warnings turn up is errors about
the placement of the inline keyword - like :
arch/i386/kernel/efi.c:177: warning: `inline' is not at beginning of declaration
arch/i386/kernel/efi.c:210: warning: `inline' is not at beginning of declaration
include/linux/efi.h:300: warning: `inline' is not at beginning of declaration
include/linux/efi.h:301: warning: `inline' is not at beginning of declaration
kernel/posix-timers.c:577: warning: `inline' is not at beginning of declaration
While these warnings do not show up with the usual gcc arguments used to
build the kernel and they are harmless, they are none the less trivial to
correct, so below is a patch that does just that. I don't see why not
(well, unless some consider it an important style issue that is) ...
I haven't been over the entire source looking for this particular issue
yet, but if the patches below are appreciated then I'll go through it all.
--- linux-2.6.1-rc1-mm1-orig/include/linux/efi.h 2003-12-31 05:48:26.000000000 +0100
+++ linux-2.6.1-rc1-mm1/include/linux/efi.h 2004-01-04 00:29:48.000000000 +0100
@@ -297,8 +297,8 @@ extern u64 efi_mem_attributes (unsigned
extern void efi_initialize_iomem_resources(struct resource *code_resource,
struct resource *data_resource);
extern efi_status_t phys_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc);
-extern unsigned long inline __init efi_get_time(void);
-extern int inline __init efi_set_rtc_mmss(unsigned long nowtime);
+inline extern unsigned long __init efi_get_time(void);
+inline extern int __init efi_set_rtc_mmss(unsigned long nowtime);
extern struct efi_memory_map memmap;
#ifdef CONFIG_EFI
--- linux-2.6.1-rc1-mm1-orig/arch/i386/kernel/efi.c 2003-12-31 05:47:59.000000000 +0100
+++ linux-2.6.1-rc1-mm1/arch/i386/kernel/efi.c 2004-01-04 00:30:53.000000000 +0100
@@ -174,7 +174,7 @@ phys_efi_get_time(efi_time_t *tm, efi_ti
return status;
}
-int inline efi_set_rtc_mmss(unsigned long nowtime)
+inline int efi_set_rtc_mmss(unsigned long nowtime)
{
int real_seconds, real_minutes;
efi_status_t status;
@@ -207,7 +207,7 @@ int inline efi_set_rtc_mmss(unsigned lon
* services have been remapped, therefore, we'll need to call in physical
* mode. Note, this call isn't used later, so mark it __init.
*/
-unsigned long inline __init efi_get_time(void)
+inline unsigned long __init efi_get_time(void)
{
efi_status_t status;
efi_time_t eft;
--- linux-2.6.1-rc1-mm1-orig/kernel/posix-timers.c 2003-12-31 05:47:26.000000000 +0100
+++ linux-2.6.1-rc1-mm1/kernel/posix-timers.c 2004-01-04 00:31:45.000000000 +0100
@@ -574,7 +574,7 @@ static struct k_itimer * lock_timer(time
* it is the same as a requeue pending timer WRT to what we should
* report.
*/
-void inline
+inline void
do_timer_gettime(struct k_itimer *timr, struct itimerspec *cur_setting)
{
unsigned long expires;
Kind regards,
Jesper Juhl
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [minor & trivial patch] kill some potential warnings about inline keyword placement - 2.6.1-rc1-mm1
2004-01-04 0:01 [minor & trivial patch] kill some potential warnings about inline keyword placement - 2.6.1-rc1-mm1 Jesper Juhl
@ 2004-01-04 0:09 ` Russell King
2004-01-04 0:18 ` Jesper Juhl
0 siblings, 1 reply; 3+ messages in thread
From: Russell King @ 2004-01-04 0:09 UTC (permalink / raw)
To: Jesper Juhl; +Cc: linux-kernel
On Sun, Jan 04, 2004 at 01:01:26AM +0100, Jesper Juhl wrote:
> --- linux-2.6.1-rc1-mm1-orig/include/linux/efi.h 2003-12-31 05:48:26.000000000 +0100
> +++ linux-2.6.1-rc1-mm1/include/linux/efi.h 2004-01-04 00:29:48.000000000 +0100
> @@ -297,8 +297,8 @@ extern u64 efi_mem_attributes (unsigned
> extern void efi_initialize_iomem_resources(struct resource *code_resource,
> struct resource *data_resource);
> extern efi_status_t phys_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc);
> -extern unsigned long inline __init efi_get_time(void);
> -extern int inline __init efi_set_rtc_mmss(unsigned long nowtime);
> +inline extern unsigned long __init efi_get_time(void);
> +inline extern int __init efi_set_rtc_mmss(unsigned long nowtime);
For the sake of consistency, can we keep these the same as the rest
of the kernel code please? IOW:
extern inline unsigned long __init efi_get_time(void);
Thanks.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [minor & trivial patch] kill some potential warnings about inline keyword placement - 2.6.1-rc1-mm1
2004-01-04 0:09 ` Russell King
@ 2004-01-04 0:18 ` Jesper Juhl
0 siblings, 0 replies; 3+ messages in thread
From: Jesper Juhl @ 2004-01-04 0:18 UTC (permalink / raw)
To: Russell King; +Cc: linux-kernel
On Sun, 4 Jan 2004, Russell King wrote:
> On Sun, Jan 04, 2004 at 01:01:26AM +0100, Jesper Juhl wrote:
> > --- linux-2.6.1-rc1-mm1-orig/include/linux/efi.h 2003-12-31 05:48:26.000000000 +0100
> > +++ linux-2.6.1-rc1-mm1/include/linux/efi.h 2004-01-04 00:29:48.000000000 +0100
> > @@ -297,8 +297,8 @@ extern u64 efi_mem_attributes (unsigned
> > extern void efi_initialize_iomem_resources(struct resource *code_resource,
> > struct resource *data_resource);
> > extern efi_status_t phys_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc);
> > -extern unsigned long inline __init efi_get_time(void);
> > -extern int inline __init efi_set_rtc_mmss(unsigned long nowtime);
> > +inline extern unsigned long __init efi_get_time(void);
> > +inline extern int __init efi_set_rtc_mmss(unsigned long nowtime);
>
> For the sake of consistency, can we keep these the same as the rest
> of the kernel code please? IOW:
>
> extern inline unsigned long __init efi_get_time(void);
>
Sure, I don't have a problem with that - good point, consistency is
important.
Here's the patch for efi.h again redone that way.
--- linux-2.6.1-rc1-mm1-orig/include/linux/efi.h 2003-12-31 05:48:26.000000000 +0100
+++ linux-2.6.1-rc1-mm1/include/linux/efi.h 2004-01-04 01:25:40.000000000 +0100
@@ -297,8 +297,8 @@ extern u64 efi_mem_attributes (unsigned
extern void efi_initialize_iomem_resources(struct resource *code_resource,
struct resource *data_resource);
extern efi_status_t phys_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc);
-extern unsigned long inline __init efi_get_time(void);
-extern int inline __init efi_set_rtc_mmss(unsigned long nowtime);
+extern inline unsigned long __init efi_get_time(void);
+extern inline int __init efi_set_rtc_mmss(unsigned long nowtime);
extern struct efi_memory_map memmap;
#ifdef CONFIG_EFI
/Jesper Juhl
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-01-04 0:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-04 0:01 [minor & trivial patch] kill some potential warnings about inline keyword placement - 2.6.1-rc1-mm1 Jesper Juhl
2004-01-04 0:09 ` Russell King
2004-01-04 0:18 ` Jesper Juhl
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.