From: Adrian Bunk <bunk@stusta.de>
To: Henne <henne@nachtwindheim.de>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>,
Neela.Kolli@engenio.com, kernel-janitors@lists.osdl.org,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [KJ] [PATCH] fix legacy megaraid-driver to compile without
Date: Thu, 06 Jul 2006 21:59:57 +0000 [thread overview]
Message-ID: <20060706215957.GX26941@stusta.de> (raw)
In-Reply-To: <44AD78A1.5010708@nachtwindheim.de>
On Thu, Jul 06, 2006 at 10:54:57PM +0200, Henne wrote:
> Adrian Bunk schrieb:
> > On Thu, Jul 06, 2006 at 10:33:49PM +0200, Henne wrote:
> >>>> From: Henrik Kretzschmar <henne@nachtwindheim.de>
> >>>>
> >>>> Create an empty inline function to make the legacy megaraid-driver compile
> >>>> without PROC_FS.
> >>>> Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
> >>>> ---
> >>>>
> >>>> --- linux-2.6.18-rc1/drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200
> >>>> +++ linux/drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200
> >>>> @@ -1039,6 +1039,9 @@
> >>>> static int proc_rdrv_30(char *, char **, off_t, int, int *, void *);
> >>>> static int proc_rdrv_40(char *, char **, off_t, int, int *, void *);
> >>>> static int proc_rdrv(adapter_t *, char *, int, int);
> >>>> +#else
> >>>> +static inline void
> >>>> +mega_create_proc_entry(int index, struct proc_dir_entry *parent) {}
> >>>> #endif
> >>>>
> >>>> static int mega_adapinq(adapter_t *, dma_addr_t);
> >>> Already in -mm:
> >>> http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17-mm6/broken-out/drivers-scsi-megaraidc-add-a-dummy-mega_create_proc_entry-for-proc_fs=y.patch
> >> Great, but isn't it better to put that define stuff into the headers?
> >
> > No - the function itself is static (and has therefore itself no
> > prototype in any header).
> >
> > If the function was global, I'd agree with you.
> >
> >> Thanks and Greets,
> >> Henne
> >
> > cu
> > Adrian
> >
> The header I mean is /drivers/scsi/megaraid.h and is only used by megaraid.c.
> And there are the prototypes, in dependency of CONFIG_PROC_FS, for all these other proc-related functions.
> Thats why I decided to make the change there and not in megaraid.c .
Prototypes for static functions don't belong into header files.
That this has been done in megaraid.h in the past is something that
should be cleaned up, not a good example.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
WARNING: multiple messages have this Message-ID (diff)
From: Adrian Bunk <bunk@stusta.de>
To: Henne <henne@nachtwindheim.de>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>,
Neela.Kolli@engenio.com, kernel-janitors@lists.osdl.org,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [KJ] [PATCH] fix legacy megaraid-driver to compile without CONFIG_PROC_FS
Date: Thu, 6 Jul 2006 23:59:57 +0200 [thread overview]
Message-ID: <20060706215957.GX26941@stusta.de> (raw)
In-Reply-To: <44AD78A1.5010708@nachtwindheim.de>
On Thu, Jul 06, 2006 at 10:54:57PM +0200, Henne wrote:
> Adrian Bunk schrieb:
> > On Thu, Jul 06, 2006 at 10:33:49PM +0200, Henne wrote:
> >>>> From: Henrik Kretzschmar <henne@nachtwindheim.de>
> >>>>
> >>>> Create an empty inline function to make the legacy megaraid-driver compile
> >>>> without PROC_FS.
> >>>> Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
> >>>> ---
> >>>>
> >>>> --- linux-2.6.18-rc1/drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200
> >>>> +++ linux/drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200
> >>>> @@ -1039,6 +1039,9 @@
> >>>> static int proc_rdrv_30(char *, char **, off_t, int, int *, void *);
> >>>> static int proc_rdrv_40(char *, char **, off_t, int, int *, void *);
> >>>> static int proc_rdrv(adapter_t *, char *, int, int);
> >>>> +#else
> >>>> +static inline void
> >>>> +mega_create_proc_entry(int index, struct proc_dir_entry *parent) {}
> >>>> #endif
> >>>>
> >>>> static int mega_adapinq(adapter_t *, dma_addr_t);
> >>> Already in -mm:
> >>> http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17-mm6/broken-out/drivers-scsi-megaraidc-add-a-dummy-mega_create_proc_entry-for-proc_fs=y.patch
> >> Great, but isn't it better to put that define stuff into the headers?
> >
> > No - the function itself is static (and has therefore itself no
> > prototype in any header).
> >
> > If the function was global, I'd agree with you.
> >
> >> Thanks and Greets,
> >> Henne
> >
> > cu
> > Adrian
> >
> The header I mean is /drivers/scsi/megaraid.h and is only used by megaraid.c.
> And there are the prototypes, in dependency of CONFIG_PROC_FS, for all these other proc-related functions.
> Thats why I decided to make the change there and not in megaraid.c .
Prototypes for static functions don't belong into header files.
That this has been done in megaraid.h in the past is something that
should be cleaned up, not a good example.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
next prev parent reply other threads:[~2006-07-06 21:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-06 19:54 [KJ] [PATCH] fix legacy megaraid-driver to compile without Henne
2006-07-06 19:54 ` [PATCH] fix legacy megaraid-driver to compile without CONFIG_PROC_FS Henne
2006-07-06 20:14 ` [KJ] [PATCH] fix legacy megaraid-driver to compile without Randy.Dunlap
2006-07-06 20:14 ` [KJ] [PATCH] fix legacy megaraid-driver to compile without CONFIG_PROC_FS Randy.Dunlap
2006-07-06 20:33 ` [KJ] [PATCH] fix legacy megaraid-driver to compile without Henne
2006-07-06 20:33 ` [KJ] [PATCH] fix legacy megaraid-driver to compile without CONFIG_PROC_FS Henne
2006-07-06 20:39 ` [KJ] [PATCH] fix legacy megaraid-driver to compile without Randy.Dunlap
2006-07-06 20:39 ` [KJ] [PATCH] fix legacy megaraid-driver to compile without CONFIG_PROC_FS Randy.Dunlap
2006-07-06 20:42 ` [KJ] [PATCH] fix legacy megaraid-driver to compile without Adrian Bunk
2006-07-06 20:42 ` [KJ] [PATCH] fix legacy megaraid-driver to compile without CONFIG_PROC_FS Adrian Bunk
2006-07-06 20:54 ` [KJ] [PATCH] fix legacy megaraid-driver to compile without Henne
2006-07-06 20:54 ` [KJ] [PATCH] fix legacy megaraid-driver to compile without CONFIG_PROC_FS Henne
2006-07-06 21:59 ` Adrian Bunk [this message]
2006-07-06 21:59 ` Adrian Bunk
2006-07-07 6:32 ` [KJ] [PATCH] fix legacy megaraid-driver to compile without Henne
2006-07-07 6:32 ` [KJ] [PATCH] fix legacy megaraid-driver to compile without CONFIG_PROC_FS Henne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060706215957.GX26941@stusta.de \
--to=bunk@stusta.de \
--cc=Neela.Kolli@engenio.com \
--cc=henne@nachtwindheim.de \
--cc=kernel-janitors@lists.osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=rdunlap@xenotime.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.