All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] crypto: caam - writel() arguments are swapped
@ 2014-02-21  8:51 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2014-02-21  8:51 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Alex Porosanu, Ruchika Gupta, Vakul Garg, Andy Fleming,
	linux-crypto, Steve Cornelius, Kim Phillips, kernel-janitors

My guess is that this little endian configuration is never found in real
life, but if it were then the writel() arguments are in the wrong order
so the driver would crash immediately.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
I can't compile this code.

diff --git a/drivers/crypto/caam/regs.h b/drivers/crypto/caam/regs.h
index d50174f45b21..cbde8b95a6f8 100644
--- a/drivers/crypto/caam/regs.h
+++ b/drivers/crypto/caam/regs.h
@@ -74,10 +74,10 @@
 #endif
 #else
 #ifdef __LITTLE_ENDIAN
-#define wr_reg32(reg, data) __raw_writel(reg, data)
+#define wr_reg32(reg, data) __raw_writel(data, reg)
 #define rd_reg32(reg) __raw_readl(reg)
 #ifdef CONFIG_64BIT
-#define wr_reg64(reg, data) __raw_writeq(reg, data)
+#define wr_reg64(reg, data) __raw_writeq(data, reg)
 #define rd_reg64(reg) __raw_readq(reg)
 #endif
 #endif

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

* [patch] crypto: caam - writel() arguments are swapped
@ 2014-02-21  8:51 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2014-02-21  8:51 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Alex Porosanu, Ruchika Gupta, Vakul Garg, Andy Fleming,
	linux-crypto, Steve Cornelius, Kim Phillips, kernel-janitors

My guess is that this little endian configuration is never found in real
life, but if it were then the writel() arguments are in the wrong order
so the driver would crash immediately.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
I can't compile this code.

diff --git a/drivers/crypto/caam/regs.h b/drivers/crypto/caam/regs.h
index d50174f45b21..cbde8b95a6f8 100644
--- a/drivers/crypto/caam/regs.h
+++ b/drivers/crypto/caam/regs.h
@@ -74,10 +74,10 @@
 #endif
 #else
 #ifdef __LITTLE_ENDIAN
-#define wr_reg32(reg, data) __raw_writel(reg, data)
+#define wr_reg32(reg, data) __raw_writel(data, reg)
 #define rd_reg32(reg) __raw_readl(reg)
 #ifdef CONFIG_64BIT
-#define wr_reg64(reg, data) __raw_writeq(reg, data)
+#define wr_reg64(reg, data) __raw_writeq(data, reg)
 #define rd_reg64(reg) __raw_readq(reg)
 #endif
 #endif

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

* Re: [patch] crypto: caam - writel() arguments are swapped
  2014-02-21  8:51 ` Dan Carpenter
@ 2014-02-25  0:41   ` Kim Phillips
  -1 siblings, 0 replies; 6+ messages in thread
From: Kim Phillips @ 2014-02-25  0:41 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Herbert Xu, Alex Porosanu, Ruchika Gupta, Vakul Garg,
	linux-crypto, Steve Cornelius, kernel-janitors

On Fri, 21 Feb 2014 11:51:31 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> My guess is that this little endian configuration is never found in real
> life, 

it is, but the code has not been upstreamed.  Steve?

> but if it were then the writel() arguments are in the wrong order
> so the driver would crash immediately.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---

Meanwhile:

Acked-by: Kim Phillips <kim.phillips@freescale.com>

Kim

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

* Re: [patch] crypto: caam - writel() arguments are swapped
@ 2014-02-25  0:41   ` Kim Phillips
  0 siblings, 0 replies; 6+ messages in thread
From: Kim Phillips @ 2014-02-25  0:41 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Herbert Xu, Alex Porosanu, Ruchika Gupta, Vakul Garg,
	linux-crypto, Steve Cornelius, kernel-janitors

On Fri, 21 Feb 2014 11:51:31 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> My guess is that this little endian configuration is never found in real
> life, 

it is, but the code has not been upstreamed.  Steve?

> but if it were then the writel() arguments are in the wrong order
> so the driver would crash immediately.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---

Meanwhile:

Acked-by: Kim Phillips <kim.phillips@freescale.com>

Kim


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

* Re: [patch] crypto: caam - writel() arguments are swapped
  2014-02-25  0:41   ` Kim Phillips
@ 2014-02-25 12:18     ` Herbert Xu
  -1 siblings, 0 replies; 6+ messages in thread
From: Herbert Xu @ 2014-02-25 12:18 UTC (permalink / raw)
  To: Kim Phillips
  Cc: Dan Carpenter, Alex Porosanu, Ruchika Gupta, Vakul Garg,
	linux-crypto, Steve Cornelius, kernel-janitors

On Mon, Feb 24, 2014 at 06:41:42PM -0600, Kim Phillips wrote:
> On Fri, 21 Feb 2014 11:51:31 +0300
> Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 
> > My guess is that this little endian configuration is never found in real
> > life, 
> 
> it is, but the code has not been upstreamed.  Steve?
> 
> > but if it were then the writel() arguments are in the wrong order
> > so the driver would crash immediately.
> > 
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> 
> Meanwhile:
> 
> Acked-by: Kim Phillips <kim.phillips@freescale.com>

Patch applied.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: [patch] crypto: caam - writel() arguments are swapped
@ 2014-02-25 12:18     ` Herbert Xu
  0 siblings, 0 replies; 6+ messages in thread
From: Herbert Xu @ 2014-02-25 12:18 UTC (permalink / raw)
  To: Kim Phillips
  Cc: Dan Carpenter, Alex Porosanu, Ruchika Gupta, Vakul Garg,
	linux-crypto, Steve Cornelius, kernel-janitors

On Mon, Feb 24, 2014 at 06:41:42PM -0600, Kim Phillips wrote:
> On Fri, 21 Feb 2014 11:51:31 +0300
> Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 
> > My guess is that this little endian configuration is never found in real
> > life, 
> 
> it is, but the code has not been upstreamed.  Steve?
> 
> > but if it were then the writel() arguments are in the wrong order
> > so the driver would crash immediately.
> > 
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> 
> Meanwhile:
> 
> Acked-by: Kim Phillips <kim.phillips@freescale.com>

Patch applied.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

end of thread, other threads:[~2014-02-25 12:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-21  8:51 [patch] crypto: caam - writel() arguments are swapped Dan Carpenter
2014-02-21  8:51 ` Dan Carpenter
2014-02-25  0:41 ` Kim Phillips
2014-02-25  0:41   ` Kim Phillips
2014-02-25 12:18   ` Herbert Xu
2014-02-25 12:18     ` Herbert Xu

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.