diff mbox

spi: omap2-mcspi: fix blatant abuse of the resource subsystem

Message ID 1405683053-14104-1-git-send-email-LW@KARO-electronics.de (mailing list archive)
State Accepted
Commit af9e53fef7015e1e4fe3f32b35e839df392bf4d6
Headers show

Commit Message

Lothar Waßmann July 18, 2014, 11:30 a.m. UTC
Aua. This really hurts. I wonder how this could ever be admitted to
the Linux kernel...
Further comments suppressed because the would most likely violate the
CDA.

If someone should not grasp what this patch does, they should consider
what happens upon unloading/reloading the kernel module.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
---
 drivers/spi/spi-omap2-mcspi.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Mark Brown July 18, 2014, 5:10 p.m. UTC | #1
On Fri, Jul 18, 2014 at 01:30:53PM +0200, Lothar Waßmann wrote:
> Aua. This really hurts. I wonder how this could ever be admitted to
> the Linux kernel...
> Further comments suppressed because the would most likely violate the
> CDA.
> 
> If someone should not grasp what this patch does, they should consider
> what happens upon unloading/reloading the kernel module.
> 
> Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>

I'm not going to apply this with a commit message such as the above.
Quite aside from the tone the fact that it doesn't describe the issue
is not helpful for review, one of the things done in review is to try to
check that the change has the intended effect.
Lothar Waßmann July 21, 2014, 5:51 a.m. UTC | #2
Hi,

Mark Brown wrote:
> On Fri, Jul 18, 2014 at 01:30:53PM +0200, Lothar Waßmann wrote:
> > Aua. This really hurts. I wonder how this could ever be admitted to
> > the Linux kernel...
> > Further comments suppressed because the would most likely violate the
> > CDA.
> > 
> > If someone should not grasp what this patch does, they should consider
> > what happens upon unloading/reloading the kernel module.
> > 
> > Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
> 
> I'm not going to apply this with a commit message such as the above.
> Quite aside from the tone the fact that it doesn't describe the issue
> is not helpful for review, one of the things done in review is to try to
> check that the change has the intended effect.
>
Maybe the original author or the maintainer who accepted this can come
up with a decent fix for this.


Lothar Waßmann
Mark Brown July 21, 2014, 12:18 p.m. UTC | #3
On Mon, Jul 21, 2014 at 07:51:44AM +0200, Lothar Waßmann wrote:
> Mark Brown wrote:

> > I'm not going to apply this with a commit message such as the above.
> > Quite aside from the tone the fact that it doesn't describe the issue
> > is not helpful for review, one of the things done in review is to try to
> > check that the change has the intended effect.

> Maybe the original author or the maintainer who accepted this can come
> up with a decent fix for this.

Just to be clear the issue is with the presentation of your change, it
is not appropriate to provide a changelog which consists mainly of
widely directed personal insults especially given that it omits basic
technical content.
Lothar Waßmann July 21, 2014, 12:41 p.m. UTC | #4
Hi,

Mark Brown wrote:
> On Mon, Jul 21, 2014 at 07:51:44AM +0200, Lothar Waßmann wrote:
> > Mark Brown wrote:
> 
> > > I'm not going to apply this with a commit message such as the above.
> > > Quite aside from the tone the fact that it doesn't describe the issue
> > > is not helpful for review, one of the things done in review is to try to
> > > check that the change has the intended effect.
> 
> > Maybe the original author or the maintainer who accepted this can come
> > up with a decent fix for this.
> 
> Just to be clear the issue is with the presentation of your change, it
> is not appropriate to provide a changelog which consists mainly of
> widely directed personal insults especially given that it omits basic
> technical content.
>
I understood that, but I feel incapable to come up with a reasonable
changelog for this.


Lothar Waßmann
Mark Brown July 21, 2014, 3:44 p.m. UTC | #5
On Mon, Jul 21, 2014 at 02:41:04PM +0200, Lothar Waßmann wrote:
> Mark Brown wrote:

> > Just to be clear the issue is with the presentation of your change, it
> > is not appropriate to provide a changelog which consists mainly of
> > widely directed personal insults especially given that it omits basic
> > technical content.

> I understood that, but I feel incapable to come up with a reasonable
> changelog for this.

Just describe in a specific, technical fashion what the problem is and
what the fix does without reference to personal qualities of the various
parties involved in the code being the way it is.
diff mbox

Patch

diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 68441fa..cb23f5d 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1379,15 +1379,13 @@  static int omap2_mcspi_probe(struct platform_device *pdev)
 		goto free_master;
 	}
 
-	r->start += regs_offset;
-	r->end += regs_offset;
-	mcspi->phys = r->start;
-
 	mcspi->base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(mcspi->base)) {
 		status = PTR_ERR(mcspi->base);
 		goto free_master;
 	}
+	mcspi->phys = r->start + regs_offset;
+	mcspi->base += regs_offset;
 
 	mcspi->dev = &pdev->dev;