linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: omap2-mcspi: fix blatant abuse of the resource subsystem
@ 2014-07-18 11:30 Lothar Waßmann
  2014-07-18 17:10 ` Mark Brown
  2016-10-04  9:27 ` Applied "spi: omap2-mcspi: Fix modifying platform resource data" to the spi tree Mark Brown
  0 siblings, 2 replies; 7+ messages in thread
From: Lothar Waßmann @ 2014-07-18 11:30 UTC (permalink / raw)
  To: linux-arm-kernel

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

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;
 
-- 
1.7.10.4

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

* [PATCH] spi: omap2-mcspi: fix blatant abuse of the resource subsystem
  2014-07-18 11:30 [PATCH] spi: omap2-mcspi: fix blatant abuse of the resource subsystem Lothar Waßmann
@ 2014-07-18 17:10 ` Mark Brown
  2014-07-21  5:51   ` Lothar Waßmann
  2016-10-04  9:27 ` Applied "spi: omap2-mcspi: Fix modifying platform resource data" to the spi tree Mark Brown
  1 sibling, 1 reply; 7+ messages in thread
From: Mark Brown @ 2014-07-18 17:10 UTC (permalink / raw)
  To: linux-arm-kernel

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140718/662acef2/attachment.sig>

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

* [PATCH] spi: omap2-mcspi: fix blatant abuse of the resource subsystem
  2014-07-18 17:10 ` Mark Brown
@ 2014-07-21  5:51   ` Lothar Waßmann
  2014-07-21 12:18     ` Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Lothar Waßmann @ 2014-07-21  5:51 UTC (permalink / raw)
  To: linux-arm-kernel

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
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________

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

* [PATCH] spi: omap2-mcspi: fix blatant abuse of the resource subsystem
  2014-07-21  5:51   ` Lothar Waßmann
@ 2014-07-21 12:18     ` Mark Brown
  2014-07-21 12:41       ` Lothar Waßmann
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2014-07-21 12:18 UTC (permalink / raw)
  To: linux-arm-kernel

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140721/60630cbb/attachment.sig>

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

* [PATCH] spi: omap2-mcspi: fix blatant abuse of the resource subsystem
  2014-07-21 12:18     ` Mark Brown
@ 2014-07-21 12:41       ` Lothar Waßmann
  2014-07-21 15:44         ` Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Lothar Waßmann @ 2014-07-21 12:41 UTC (permalink / raw)
  To: linux-arm-kernel

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
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________

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

* [PATCH] spi: omap2-mcspi: fix blatant abuse of the resource subsystem
  2014-07-21 12:41       ` Lothar Waßmann
@ 2014-07-21 15:44         ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2014-07-21 15:44 UTC (permalink / raw)
  To: linux-arm-kernel

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140721/585a0d12/attachment.sig>

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

* Applied "spi: omap2-mcspi: Fix modifying platform resource data" to the spi tree
  2014-07-18 11:30 [PATCH] spi: omap2-mcspi: fix blatant abuse of the resource subsystem Lothar Waßmann
  2014-07-18 17:10 ` Mark Brown
@ 2016-10-04  9:27 ` Mark Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Brown @ 2016-10-04  9:27 UTC (permalink / raw)
  To: linux-arm-kernel

The patch

   spi: omap2-mcspi: Fix modifying platform resource data

has been applied to the spi tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 0142d2ee7e9f107248ebf69bd66037c536d3f6cc Mon Sep 17 00:00:00 2001
From: Vikram N <vicky773@gmail.com>
Date: Fri, 30 Sep 2016 19:53:11 +0530
Subject: [PATCH] spi: omap2-mcspi: Fix modifying platform resource data

currently during probe the resource data gets modified and device
physical address remains valid only during first load. If the module is
unloaded and loaded again, the ioremp will be done on a incorrect address
as the resource was modified during previous module load.
This patch fixes this issue.

Signed-off-by: Vikram N <vicky773@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/spi/spi-omap2-mcspi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index d5157b2222ce..3567e1dfd30d 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1391,15 +1391,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;
 
-- 
2.9.3

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

end of thread, other threads:[~2016-10-04  9:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-18 11:30 [PATCH] spi: omap2-mcspi: fix blatant abuse of the resource subsystem Lothar Waßmann
2014-07-18 17:10 ` Mark Brown
2014-07-21  5:51   ` Lothar Waßmann
2014-07-21 12:18     ` Mark Brown
2014-07-21 12:41       ` Lothar Waßmann
2014-07-21 15:44         ` Mark Brown
2016-10-04  9:27 ` Applied "spi: omap2-mcspi: Fix modifying platform resource data" to the spi tree Mark Brown

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