From: Dan Carpenter <dan.carpenter@oracle.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Alex Porosanu <alexandru.porosanu@freescale.com>,
Ruchika Gupta <ruchika.gupta@freescale.com>,
Vakul Garg <vakul@freescale.com>,
Andy Fleming <afleming@freescale.com>,
linux-crypto@vger.kernel.org, Steve Cornelius <sec@pobox.com>,
Kim Phillips <kim.phillips@freescale.com>,
kernel-janitors@vger.kernel.org
Subject: [patch] crypto: caam - writel() arguments are swapped
Date: Fri, 21 Feb 2014 08:51:31 +0000 [thread overview]
Message-ID: <20140221085131.GB13078@elgon.mountain> (raw)
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
next reply other threads:[~2014-02-21 8:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-21 8:51 Dan Carpenter [this message]
2014-02-25 0:41 ` [patch] crypto: caam - writel() arguments are swapped Kim Phillips
2014-02-25 12:18 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140221085131.GB13078@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=afleming@freescale.com \
--cc=alexandru.porosanu@freescale.com \
--cc=herbert@gondor.apana.org.au \
--cc=kernel-janitors@vger.kernel.org \
--cc=kim.phillips@freescale.com \
--cc=linux-crypto@vger.kernel.org \
--cc=ruchika.gupta@freescale.com \
--cc=sec@pobox.com \
--cc=vakul@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox