* [PATCH] megaraid_mbox: fix section mismatch warnings
@ 2006-05-25 16:46 Randy.Dunlap
2006-05-25 21:39 ` Andrew Morton
0 siblings, 1 reply; 8+ messages in thread
From: Randy.Dunlap @ 2006-05-25 16:46 UTC (permalink / raw)
To: __smail Dönmez, scsi; +Cc: akpm, jejb, Neela.Kolli
From: Randy Dunlap <rdunlap@xenotime.net>
Fix section warning:
WARNING: drivers/scsi/megaraid/megaraid_mbox.o - Section mismatch: reference to .init.text: from .text between 'megaraid_probe_one' (at offset 0x171e) and 'megaraid_queue_command'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/scsi/megaraid/megaraid_mbox.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- linux-2617-rc5.orig/drivers/scsi/megaraid/megaraid_mbox.c
+++ linux-2617-rc5/drivers/scsi/megaraid/megaraid_mbox.c
@@ -714,7 +714,7 @@ megaraid_io_detach(adapter_t *adapter)
* . Allocate memory required for all the commands
* . Use internal library of FW routines, build up complete soft state
*/
-static int __init
+static int __devinit
megaraid_init_mbox(adapter_t *adapter)
{
struct pci_dev *pdev;
---
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] megaraid_mbox: fix section mismatch warnings
2006-05-25 16:46 Randy.Dunlap
@ 2006-05-25 21:39 ` Andrew Morton
2006-05-25 21:54 ` Randy.Dunlap
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2006-05-25 21:39 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: ismail, linux-scsi, james.bottomley, Neela.Kolli
"Randy.Dunlap" <rdunlap@xenotime.net> wrote:
>
> From: Randy Dunlap <rdunlap@xenotime.net>
>
> Fix section warning:
> WARNING: drivers/scsi/megaraid/megaraid_mbox.o - Section mismatch: reference to .init.text: from .text between 'megaraid_probe_one' (at offset 0x171e) and 'megaraid_queue_command'
>
> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
> ---
> drivers/scsi/megaraid/megaraid_mbox.c | 2 +-
> 1 files changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-2617-rc5.orig/drivers/scsi/megaraid/megaraid_mbox.c
> +++ linux-2617-rc5/drivers/scsi/megaraid/megaraid_mbox.c
> @@ -714,7 +714,7 @@ megaraid_io_detach(adapter_t *adapter)
> * . Allocate memory required for all the commands
> * . Use internal library of FW routines, build up complete soft state
> */
> -static int __init
> +static int __devinit
> megaraid_init_mbox(adapter_t *adapter)
> {
> struct pci_dev *pdev;
>
>
<trying to get the old brain sorted out here>
This one's a bugfix, isn't it? In the CONFIG_HOTPLUG kernel the __devinit
megaraid_probe_one() resides in .text and calls the __init
megaraid_init_mbox(), which isn't there any more. So if this driver is
statically linked into vmlinux and the kernel is hotplug-capable and if
someone hotplugs one of these devices we go blam.
You agree with that analysis?
If so, I'll toss this onto the 2.6.17 pile, thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] megaraid_mbox: fix section mismatch warnings
2006-05-25 21:39 ` Andrew Morton
@ 2006-05-25 21:54 ` Randy.Dunlap
0 siblings, 0 replies; 8+ messages in thread
From: Randy.Dunlap @ 2006-05-25 21:54 UTC (permalink / raw)
To: Andrew Morton; +Cc: ismail, linux-scsi, james.bottomley, Neela.Kolli
On Thu, 25 May 2006 14:39:50 -0700 Andrew Morton wrote:
> "Randy.Dunlap" <rdunlap@xenotime.net> wrote:
> >
> > From: Randy Dunlap <rdunlap@xenotime.net>
> >
> > Fix section warning:
> > WARNING: drivers/scsi/megaraid/megaraid_mbox.o - Section mismatch: reference to .init.text: from .text between 'megaraid_probe_one' (at offset 0x171e) and 'megaraid_queue_command'
> >
> > Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
> > ---
> > drivers/scsi/megaraid/megaraid_mbox.c | 2 +-
> > 1 files changed, 1 insertion(+), 1 deletion(-)
> >
> > --- linux-2617-rc5.orig/drivers/scsi/megaraid/megaraid_mbox.c
> > +++ linux-2617-rc5/drivers/scsi/megaraid/megaraid_mbox.c
> > @@ -714,7 +714,7 @@ megaraid_io_detach(adapter_t *adapter)
> > * . Allocate memory required for all the commands
> > * . Use internal library of FW routines, build up complete soft state
> > */
> > -static int __init
> > +static int __devinit
> > megaraid_init_mbox(adapter_t *adapter)
> > {
> > struct pci_dev *pdev;
> >
> >
>
> <trying to get the old brain sorted out here>
>
> This one's a bugfix, isn't it? In the CONFIG_HOTPLUG kernel the __devinit
> megaraid_probe_one() resides in .text and calls the __init
> megaraid_init_mbox(), which isn't there any more. So if this driver is
> statically linked into vmlinux and the kernel is hotplug-capable and if
> someone hotplugs one of these devices we go blam.
>
> You agree with that analysis?
>
> If so, I'll toss this onto the 2.6.17 pile, thanks.
Yes, agreed.
Thanks,
---
~Randy
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] megaraid_mbox: fix section mismatch warnings
@ 2006-05-30 13:37 Ju, Seokmann
2006-05-30 15:53 ` Randy.Dunlap
2006-05-30 17:03 ` Matthew Wilcox
0 siblings, 2 replies; 8+ messages in thread
From: Ju, Seokmann @ 2006-05-30 13:37 UTC (permalink / raw)
To: Randy.Dunlap, __smail Dönmez, scsi; +Cc: akpm, jejb, Kolli, Neela
Hi,
Thursday, May 25, 2006 12:46 PM, Randy Dunlap wrote:
> Fix section warning:
> WARNING: drivers/scsi/megaraid/megaraid_mbox.o - Section
> mismatch: reference to .init.text: from .text between
> 'megaraid_probe_one' (at offset 0x171e) and 'megaraid_queue_command'
>
> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
> ---
> drivers/scsi/megaraid/megaraid_mbox.c | 2 +-
> 1 files changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-2617-rc5.orig/drivers/scsi/megaraid/megaraid_mbox.c
> +++ linux-2617-rc5/drivers/scsi/megaraid/megaraid_mbox.c
> @@ -714,7 +714,7 @@ megaraid_io_detach(adapter_t *adapter)
> * . Allocate memory required for all the commands
> * . Use internal library of FW routines, build up complete
> soft state
> */
> -static int __init
> +static int __devinit
> megaraid_init_mbox(adapter_t *adapter)
> {
> struct pci_dev *pdev;
Thank you for pointing out a bug.
However, in my opinion, I would rather to simply remove '__init' from the function.
The function is just a sub function called by megaraid_probe_one which has '__devinit' tag.
Please let me know if this is acceptable.
I will submit a patch with proper change.
Thanks,
Seokmann
> -----Original Message-----
> From: linux-scsi-owner@vger.kernel.org
> [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Randy.Dunlap
> Sent: Thursday, May 25, 2006 12:46 PM
> To: __smail Dönmez; scsi
> Cc: akpm; jejb; Kolli, Neela
> Subject: [PATCH] megaraid_mbox: fix section mismatch warnings
>
> From: Randy Dunlap <rdunlap@xenotime.net>
>
> Fix section warning:
> WARNING: drivers/scsi/megaraid/megaraid_mbox.o - Section
> mismatch: reference to .init.text: from .text between
> 'megaraid_probe_one' (at offset 0x171e) and 'megaraid_queue_command'
>
> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
> ---
> drivers/scsi/megaraid/megaraid_mbox.c | 2 +-
> 1 files changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-2617-rc5.orig/drivers/scsi/megaraid/megaraid_mbox.c
> +++ linux-2617-rc5/drivers/scsi/megaraid/megaraid_mbox.c
> @@ -714,7 +714,7 @@ megaraid_io_detach(adapter_t *adapter)
> * . Allocate memory required for all the commands
> * . Use internal library of FW routines, build up complete
> soft state
> */
> -static int __init
> +static int __devinit
> megaraid_init_mbox(adapter_t *adapter)
> {
> struct pci_dev *pdev;
>
>
> ---
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] megaraid_mbox: fix section mismatch warnings
2006-05-30 13:37 Ju, Seokmann
@ 2006-05-30 15:53 ` Randy.Dunlap
2006-05-30 17:03 ` Matthew Wilcox
1 sibling, 0 replies; 8+ messages in thread
From: Randy.Dunlap @ 2006-05-30 15:53 UTC (permalink / raw)
To: Ju, Seokmann; +Cc: ismail, linux-scsi, akpm, james.bottomley, Neela.Kolli
On Tue, 30 May 2006 07:37:18 -0600 Ju, Seokmann wrote:
> Hi,
>
> Thursday, May 25, 2006 12:46 PM, Randy Dunlap wrote:
> > Fix section warning:
> > WARNING: drivers/scsi/megaraid/megaraid_mbox.o - Section
> > mismatch: reference to .init.text: from .text between
> > 'megaraid_probe_one' (at offset 0x171e) and 'megaraid_queue_command'
> >
> > Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
> > ---
> > drivers/scsi/megaraid/megaraid_mbox.c | 2 +-
> > 1 files changed, 1 insertion(+), 1 deletion(-)
> >
> > --- linux-2617-rc5.orig/drivers/scsi/megaraid/megaraid_mbox.c
> > +++ linux-2617-rc5/drivers/scsi/megaraid/megaraid_mbox.c
> > @@ -714,7 +714,7 @@ megaraid_io_detach(adapter_t *adapter)
> > * . Allocate memory required for all the commands
> > * . Use internal library of FW routines, build up complete
> > soft state
> > */
> > -static int __init
> > +static int __devinit
> > megaraid_init_mbox(adapter_t *adapter)
> > {
> > struct pci_dev *pdev;
> Thank you for pointing out a bug.
> However, in my opinion, I would rather to simply remove '__init' from the function.
> The function is just a sub function called by megaraid_probe_one which has '__devinit' tag.
> Please let me know if this is acceptable.
> I will submit a patch with proper change.
Sure, go for it.
> Thanks,
>
> Seokmann
>
> > -----Original Message-----
> > From: linux-scsi-owner@vger.kernel.org
> > [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Randy.Dunlap
> > Sent: Thursday, May 25, 2006 12:46 PM
> > To: __smail Dönmez; scsi
> > Cc: akpm; jejb; Kolli, Neela
> > Subject: [PATCH] megaraid_mbox: fix section mismatch warnings
> >
> > From: Randy Dunlap <rdunlap@xenotime.net>
> >
> > Fix section warning:
> > WARNING: drivers/scsi/megaraid/megaraid_mbox.o - Section
> > mismatch: reference to .init.text: from .text between
> > 'megaraid_probe_one' (at offset 0x171e) and 'megaraid_queue_command'
> >
> > Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
> > ---
> > drivers/scsi/megaraid/megaraid_mbox.c | 2 +-
> > 1 files changed, 1 insertion(+), 1 deletion(-)
> >
> > --- linux-2617-rc5.orig/drivers/scsi/megaraid/megaraid_mbox.c
> > +++ linux-2617-rc5/drivers/scsi/megaraid/megaraid_mbox.c
> > @@ -714,7 +714,7 @@ megaraid_io_detach(adapter_t *adapter)
> > * . Allocate memory required for all the commands
> > * . Use internal library of FW routines, build up complete
> > soft state
> > */
> > -static int __init
> > +static int __devinit
> > megaraid_init_mbox(adapter_t *adapter)
> > {
> > struct pci_dev *pdev;
---
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] megaraid_mbox: fix section mismatch warnings
2006-05-30 13:37 Ju, Seokmann
2006-05-30 15:53 ` Randy.Dunlap
@ 2006-05-30 17:03 ` Matthew Wilcox
1 sibling, 0 replies; 8+ messages in thread
From: Matthew Wilcox @ 2006-05-30 17:03 UTC (permalink / raw)
To: Ju, Seokmann; +Cc: Randy.Dunlap, __smail D?nmez, scsi, akpm, jejb, Kolli, Neela
On Tue, May 30, 2006 at 07:37:18AM -0600, Ju, Seokmann wrote:
> > */
> > -static int __init
> > +static int __devinit
> > megaraid_init_mbox(adapter_t *adapter)
> Thank you for pointing out a bug.
> However, in my opinion, I would rather to simply remove '__init' from the function.
> The function is just a sub function called by megaraid_probe_one which has '__devinit' tag.
> Please let me know if this is acceptable.
> I will submit a patch with proper change.
Why would you want to do that? A subfunction of a __devinit function
should also be __devinit (unless it's alsoi used by something which
isn't __devinit, of course)
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] megaraid_mbox: fix section mismatch warnings
@ 2006-05-30 17:11 Ju, Seokmann
2006-05-31 12:30 ` Matthew Wilcox
0 siblings, 1 reply; 8+ messages in thread
From: Ju, Seokmann @ 2006-05-30 17:11 UTC (permalink / raw)
To: Matthew Wilcox
Cc: Randy.Dunlap, __smail D?nmez, scsi, akpm, jejb, Kolli, Neela
> Why would you want to do that? A subfunction of a __devinit function
> should also be __devinit (unless it's alsoi used by something which
> isn't __devinit, of course)
For similar reason as you pointed out, I thought it would be good to remove (unless it is required) the tag so that it can be called by any functions in the driver if needed be.
I don't have enough knowledge on the topic, unfortunately. Is it hardly required to have the tag on all sub-functions called in the function?
If so, there are couple of other sub-functions need to have the tag.
Thank you,
Seokmann
> -----Original Message-----
> From: Matthew Wilcox [mailto:matthew@wil.cx]
> Sent: Tuesday, May 30, 2006 1:03 PM
> To: Ju, Seokmann
> Cc: Randy.Dunlap; __smail D?nmez; scsi; akpm; jejb; Kolli, Neela
> Subject: Re: [PATCH] megaraid_mbox: fix section mismatch warnings
>
> On Tue, May 30, 2006 at 07:37:18AM -0600, Ju, Seokmann wrote:
> > > */
> > > -static int __init
> > > +static int __devinit
> > > megaraid_init_mbox(adapter_t *adapter)
>
> > Thank you for pointing out a bug.
> > However, in my opinion, I would rather to simply remove
> '__init' from the function.
> > The function is just a sub function called by
> megaraid_probe_one which has '__devinit' tag.
> > Please let me know if this is acceptable.
> > I will submit a patch with proper change.
>
> Why would you want to do that? A subfunction of a __devinit function
> should also be __devinit (unless it's alsoi used by something which
> isn't __devinit, of course)
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] megaraid_mbox: fix section mismatch warnings
2006-05-30 17:11 [PATCH] megaraid_mbox: fix section mismatch warnings Ju, Seokmann
@ 2006-05-31 12:30 ` Matthew Wilcox
0 siblings, 0 replies; 8+ messages in thread
From: Matthew Wilcox @ 2006-05-31 12:30 UTC (permalink / raw)
To: Ju, Seokmann; +Cc: Randy.Dunlap, __smail D?nmez, scsi, akpm, jejb, Kolli, Neela
On Tue, May 30, 2006 at 11:11:59AM -0600, Ju, Seokmann wrote:
> > Why would you want to do that? A subfunction of a __devinit function
> > should also be __devinit (unless it's alsoi used by something which
> > isn't __devinit, of course)
> For similar reason as you pointed out, I thought it would be good to remove (unless it is required) the tag so that it can be called by any functions in the driver if needed be.
If it turns out you want to call it from elsewhere in the driver, you
should remove the __devinit tag at that time.
> I don't have enough knowledge on the topic, unfortunately. Is it hardly required to have the tag on all sub-functions called in the function?
> If so, there are couple of other sub-functions need to have the tag.
It's not required, but it is a good idea. Marking the function as
__devinit allows the function to be discarded when we know it can't be
called again (an infrequent case these days, to be sure, but one the
embedded people are grateful for).
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-05-31 12:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-30 17:11 [PATCH] megaraid_mbox: fix section mismatch warnings Ju, Seokmann
2006-05-31 12:30 ` Matthew Wilcox
-- strict thread matches above, loose matches on Subject: below --
2006-05-30 13:37 Ju, Seokmann
2006-05-30 15:53 ` Randy.Dunlap
2006-05-30 17:03 ` Matthew Wilcox
2006-05-25 16:46 Randy.Dunlap
2006-05-25 21:39 ` Andrew Morton
2006-05-25 21:54 ` Randy.Dunlap
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).