linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] atmel/spi: fix missing probe during the switch to module_platform_driver
@ 2011-11-03 14:48 Jean-Christophe PLAGNIOL-VILLARD
  2011-11-03 14:55 ` Deepak Saxena
  2011-11-03 15:10 ` [PATCH v2] " Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 2 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-11-03 14:48 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Grant Likely, spi-devel-general, Greg Kroah-Hartman,
	Jean-Christophe PLAGNIOL-VILLARD, Nicolas Ferre

in commit 940ab889

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
---
 arch/arm/mach-at91/include/mach/at91_aic.h |    2 +-
 drivers/spi/spi-atmel.c                    |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-at91/include/mach/at91_aic.h b/arch/arm/mach-at91/include/mach/at91_aic.h
index 4b0a57e..f163bb6 100644
--- a/arch/arm/mach-at91/include/mach/at91_aic.h
+++ b/arch/arm/mach-at91/include/mach/at91_aic.h
@@ -20,7 +20,7 @@
 extern void __iomem *at91_aic_base;
 
 #define at91_aic_read(field) \
-	__raw_read(at91_aic_base + field)
+	__raw_readl(at91_aic_base + field)
 
 #define at91_aic_write(field, value) \
 	__raw_writel(value, at91_aic_base + field);
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index 79665e2..a691240 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -1072,6 +1072,7 @@ static struct platform_driver atmel_spi_driver = {
 	},
 	.suspend	= atmel_spi_suspend,
 	.resume		= atmel_spi_resume,
+	.probe		= atmel_spi_probe,
 	.remove		= __exit_p(atmel_spi_remove),
 };
 module_platform_driver(atmel_spi_driver);
-- 
1.7.7

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/1] atmel/spi: fix missing probe during the switch to module_platform_driver
  2011-11-03 14:48 [PATCH 1/1] atmel/spi: fix missing probe during the switch to module_platform_driver Jean-Christophe PLAGNIOL-VILLARD
@ 2011-11-03 14:55 ` Deepak Saxena
  2011-11-03 15:14   ` Jean-Christophe PLAGNIOL-VILLARD
  2011-11-03 15:10 ` [PATCH v2] " Jean-Christophe PLAGNIOL-VILLARD
  1 sibling, 1 reply; 9+ messages in thread
From: Deepak Saxena @ 2011-11-03 14:55 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD
  Cc: Grant Likely, spi-devel-general, Greg Kroah-Hartman,
	Nicolas Ferre, linux-arm-kernel

On Thu, Nov 3, 2011 at 10:48 AM, Jean-Christophe PLAGNIOL-VILLARD
<plagnioj@jcrosoft.com> wrote:
> in commit 940ab889
>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Cc: Greg Kroah-Hartman <gregkh@suse.de>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
>  arch/arm/mach-at91/include/mach/at91_aic.h |    2 +-
>  drivers/spi/spi-atmel.c                    |    1 +
>  2 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-at91/include/mach/at91_aic.h b/arch/arm/mach-at91/include/mach/at91_aic.h
> index 4b0a57e..f163bb6 100644
> --- a/arch/arm/mach-at91/include/mach/at91_aic.h
> +++ b/arch/arm/mach-at91/include/mach/at91_aic.h
> @@ -20,7 +20,7 @@
>  extern void __iomem *at91_aic_base;
>
>  #define at91_aic_read(field) \
> -       __raw_read(at91_aic_base + field)
> +       __raw_readl(at91_aic_base + field)
>
>  #define at91_aic_write(field, value) \
>        __raw_writel(value, at91_aic_base + field);
> diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
> index 79665e2..a691240 100644
> --- a/drivers/spi/spi-atmel.c
> +++ b/drivers/spi/spi-atmel.c
> @@ -1072,6 +1072,7 @@ static struct platform_driver atmel_spi_driver = {
>        },
>        .suspend        = atmel_spi_suspend,
>        .resume         = atmel_spi_resume,
> +       .probe          = atmel_spi_probe,
>        .remove         = __exit_p(atmel_spi_remove),
>  };
>  module_platform_driver(atmel_spi_driver);

Jean,

This looks it should be two separate patches, one for the missing probe,
one for the raw_read -> raw_readl.

Thanks,
~Deepak

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] atmel/spi: fix missing probe during the switch to module_platform_driver
  2011-11-03 14:48 [PATCH 1/1] atmel/spi: fix missing probe during the switch to module_platform_driver Jean-Christophe PLAGNIOL-VILLARD
  2011-11-03 14:55 ` Deepak Saxena
@ 2011-11-03 15:10 ` Jean-Christophe PLAGNIOL-VILLARD
  2011-11-03 15:18   ` Russell King - ARM Linux
  1 sibling, 1 reply; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-11-03 15:10 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Grant Likely, spi-devel-general, Greg Kroah-Hartman,
	Jean-Christophe PLAGNIOL-VILLARD

in commit 940ab889

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
---
v2:

	remove local work

Best Regards,
J.
 drivers/spi/spi-atmel.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index 79665e2..a691240 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -1072,6 +1072,7 @@ static struct platform_driver atmel_spi_driver = {
 	},
 	.suspend	= atmel_spi_suspend,
 	.resume		= atmel_spi_resume,
+	.probe		= atmel_spi_probe,
 	.remove		= __exit_p(atmel_spi_remove),
 };
 module_platform_driver(atmel_spi_driver);
-- 
1.7.7

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/1] atmel/spi: fix missing probe during the switch to module_platform_driver
  2011-11-03 14:55 ` Deepak Saxena
@ 2011-11-03 15:14   ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-11-03 15:14 UTC (permalink / raw)
  To: Deepak Saxena
  Cc: Grant Likely, spi-devel-general, Greg Kroah-Hartman,
	Nicolas Ferre, linux-arm-kernel

On 10:55 Thu 03 Nov     , Deepak Saxena wrote:
> On Thu, Nov 3, 2011 at 10:48 AM, Jean-Christophe PLAGNIOL-VILLARD
> <plagnioj@jcrosoft.com> wrote:
> > in commit 940ab889
> >
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > Cc: Greg Kroah-Hartman <gregkh@suse.de>
> > Cc: Grant Likely <grant.likely@secretlab.ca>
> > Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> > ---
> >  arch/arm/mach-at91/include/mach/at91_aic.h |    2 +-
> >  drivers/spi/spi-atmel.c                    |    1 +
> >  2 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/arm/mach-at91/include/mach/at91_aic.h b/arch/arm/mach-at91/include/mach/at91_aic.h
> > index 4b0a57e..f163bb6 100644
> > --- a/arch/arm/mach-at91/include/mach/at91_aic.h
> > +++ b/arch/arm/mach-at91/include/mach/at91_aic.h
> > @@ -20,7 +20,7 @@
> >  extern void __iomem *at91_aic_base;
> >
> >  #define at91_aic_read(field) \
> > -       __raw_read(at91_aic_base + field)
> > +       __raw_readl(at91_aic_base + field)
> >
> >  #define at91_aic_write(field, value) \
> >        __raw_writel(value, at91_aic_base + field);
> > diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
> > index 79665e2..a691240 100644
> > --- a/drivers/spi/spi-atmel.c
> > +++ b/drivers/spi/spi-atmel.c
> > @@ -1072,6 +1072,7 @@ static struct platform_driver atmel_spi_driver = {
> >        },
> >        .suspend        = atmel_spi_suspend,
> >        .resume         = atmel_spi_resume,
> > +       .probe          = atmel_spi_probe,
> >        .remove         = __exit_p(atmel_spi_remove),
> >  };
> >  module_platform_driver(atmel_spi_driver);
> 
> Jean,
> 
> This looks it should be two separate patches, one for the missing probe,
> one for the raw_read -> raw_readl.
Yes I found when I receive the e-mail and already send the v2

Best Regards,
J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] atmel/spi: fix missing probe during the switch to module_platform_driver
  2011-11-03 15:10 ` [PATCH v2] " Jean-Christophe PLAGNIOL-VILLARD
@ 2011-11-03 15:18   ` Russell King - ARM Linux
  2011-11-03 16:51     ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 9+ messages in thread
From: Russell King - ARM Linux @ 2011-11-03 15:18 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD
  Cc: Grant Likely, spi-devel-general, Greg Kroah-Hartman, linux-arm-kernel

On Thu, Nov 03, 2011 at 11:10:42PM +0800, Jean-Christophe PLAGNIOL-VILLARD wrote:
> in commit 940ab889

This kind of commit message is, frankly, utter crap.

With all the complaints that have been on this mailing list about raw
commit IDs without saying what the commit was, it completely astounds
me that someone in your position (allegedly a co-maintainer of a SoC)
would make such an error.

Please generate a much better commit message.  Maybe something like:

----
Commit 940ab889 (blah blah blah) converted this driver to use
module_platform_driver, but due to the use of platform_driver_probe(),
this resulted in the call to atmel_spi_probe being lost.  Place the
call to this function into the driver structure.

As atmel_spi_probe is marked __init, this will cause a section mismatch
error, so ... <fill this in for the point below>
----

And, you're forgetting to fix this properly (maybe you don't care about
section mismatch errors - are you going to create another patch for that
as well?)  Did you even build-test this patch and pay attention to any
warnings issued, or were you just pleased to get a zImage at the end?

static int __init atmel_spi_probe(struct platform_device *pdev)

__init is not compatible with having a pointer in the platform driver
structure.  It needs to be __devinit.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] atmel/spi: fix missing probe during the switch to module_platform_driver
  2011-11-03 15:18   ` Russell King - ARM Linux
@ 2011-11-03 16:51     ` Jean-Christophe PLAGNIOL-VILLARD
  2011-11-03 17:43       ` Russell King - ARM Linux
  0 siblings, 1 reply; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-11-03 16:51 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Grant Likely, spi-devel-general, Greg Kroah-Hartman, linux-arm-kernel

On 15:18 Thu 03 Nov     , Russell King - ARM Linux wrote:
> On Thu, Nov 03, 2011 at 11:10:42PM +0800, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > in commit 940ab889
> 
> This kind of commit message is, frankly, utter crap.
> 
> With all the complaints that have been on this mailing list about raw
> commit IDs without saying what the commit was, it completely astounds
> me that someone in your position (allegedly a co-maintainer of a SoC)
> would make such an error.
> 
> Please generate a much better commit message.  Maybe something like:
> 
> ----
> Commit 940ab889 (blah blah blah) converted this driver to use
> module_platform_driver, but due to the use of platform_driver_probe(),
> this resulted in the call to atmel_spi_probe being lost.  Place the
> call to this function into the driver structure.
> 
> As atmel_spi_probe is marked __init, this will cause a section mismatch
> error, so ... <fill this in for the point below>
> ----
> 
> And, you're forgetting to fix this properly (maybe you don't care about
> section mismatch errors - are you going to create another patch for that
> as well?)  Did you even build-test this patch and pay attention to any
> warnings issued, or were you just pleased to get a zImage at the end?
> 
> static int __init atmel_spi_probe(struct platform_device *pdev)
> 
> __init is not compatible with having a pointer in the platform driver
> structure.  It needs to be __devinit.
this is an other fix I do not want to fix 2 issue in one commit and I do care
of mismatch erros I fix them all the time I send patch for some rm9200 few
weeks ago

Best Regards,
J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] atmel/spi: fix missing probe during the switch to module_platform_driver
  2011-11-03 16:51     ` Jean-Christophe PLAGNIOL-VILLARD
@ 2011-11-03 17:43       ` Russell King - ARM Linux
  2011-11-03 18:03         ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 9+ messages in thread
From: Russell King - ARM Linux @ 2011-11-03 17:43 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD
  Cc: Grant Likely, spi-devel-general, Greg Kroah-Hartman, linux-arm-kernel

On Thu, Nov 03, 2011 at 05:51:13PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> this is an other fix I do not want to fix 2 issue in one commit and I do care
> of mismatch erros I fix them all the time I send patch for some rm9200 few
> weeks ago

It should not be a separate patch - it's all to do with fixing the
original problem.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] atmel/spi: fix missing probe during the switch to module_platform_driver
  2011-11-03 17:43       ` Russell King - ARM Linux
@ 2011-11-03 18:03         ` Jean-Christophe PLAGNIOL-VILLARD
  2011-11-03 18:08           ` Russell King - ARM Linux
  0 siblings, 1 reply; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-11-03 18:03 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Grant Likely, spi-devel-general, Greg Kroah-Hartman, linux-arm-kernel

On 17:43 Thu 03 Nov     , Russell King - ARM Linux wrote:
> On Thu, Nov 03, 2011 at 05:51:13PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > this is an other fix I do not want to fix 2 issue in one commit and I do care
> > of mismatch erros I fix them all the time I send patch for some rm9200 few
> > weeks ago
> 
> It should not be a separate patch - it's all to do with fixing the
> original problem.

yes when we was supposed to swtch to module_platform_driver we use the .probe
which is suposed to be __devinit in this case but I was prefering to do it in
2 steps

as you wish and I found that the remove is __exit and supposed to be __devexit

Best Regards,
J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] atmel/spi: fix missing probe during the switch to module_platform_driver
  2011-11-03 18:03         ` Jean-Christophe PLAGNIOL-VILLARD
@ 2011-11-03 18:08           ` Russell King - ARM Linux
  0 siblings, 0 replies; 9+ messages in thread
From: Russell King - ARM Linux @ 2011-11-03 18:08 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD
  Cc: Grant Likely, spi-devel-general, Greg Kroah-Hartman, linux-arm-kernel

On Thu, Nov 03, 2011 at 07:03:38PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 17:43 Thu 03 Nov     , Russell King - ARM Linux wrote:
> > On Thu, Nov 03, 2011 at 05:51:13PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > this is an other fix I do not want to fix 2 issue in one commit and I do care
> > > of mismatch erros I fix them all the time I send patch for some rm9200 few
> > > weeks ago
> > 
> > It should not be a separate patch - it's all to do with fixing the
> > original problem.
> 
> yes when we was supposed to swtch to module_platform_driver we use the .probe
> which is suposed to be __devinit in this case but I was prefering to do it in
> 2 steps

Then do the __devinit transformation _first_ so you don't introduce a new
bug in the middle of your 'fix'.

But I personally think you're just creating needless churn by splitting
this one logical change.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-11-03 18:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-03 14:48 [PATCH 1/1] atmel/spi: fix missing probe during the switch to module_platform_driver Jean-Christophe PLAGNIOL-VILLARD
2011-11-03 14:55 ` Deepak Saxena
2011-11-03 15:14   ` Jean-Christophe PLAGNIOL-VILLARD
2011-11-03 15:10 ` [PATCH v2] " Jean-Christophe PLAGNIOL-VILLARD
2011-11-03 15:18   ` Russell King - ARM Linux
2011-11-03 16:51     ` Jean-Christophe PLAGNIOL-VILLARD
2011-11-03 17:43       ` Russell King - ARM Linux
2011-11-03 18:03         ` Jean-Christophe PLAGNIOL-VILLARD
2011-11-03 18:08           ` Russell King - ARM Linux

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).