* [PATCH 1/2] crypto: s5p-sss - Fix minor coding style violations
@ 2016-01-11 11:45 Krzysztof Kozlowski
2016-01-11 11:45 ` [PATCH 2/2] crypto: s5p-sss - Use memcpy_toio for iomem annotated memory Krzysztof Kozlowski
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2016-01-11 11:45 UTC (permalink / raw)
To: Herbert Xu, David S. Miller, linux-crypto, linux-kernel
Cc: Krzysztof Kozlowski
Improve a little bit code readability and use dev_info/err for printing
messages.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
---
drivers/crypto/s5p-sss.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
index f214a8755827..e10284744fd2 100644
--- a/drivers/crypto/s5p-sss.c
+++ b/drivers/crypto/s5p-sss.c
@@ -224,6 +224,7 @@ static inline struct samsung_aes_variant *find_s5p_sss_version
{
if (IS_ENABLED(CONFIG_OF) && (pdev->dev.of_node)) {
const struct of_device_id *match;
+
match = of_match_node(s5p_sss_dt_match,
pdev->dev.of_node);
return (struct samsung_aes_variant *)match->data;
@@ -397,7 +398,6 @@ static void s5p_set_aes(struct s5p_aes_dev *dev,
static void s5p_aes_crypt_start(struct s5p_aes_dev *dev, unsigned long mode)
{
struct ablkcipher_request *req = dev->req;
-
uint32_t aes_control;
int err;
unsigned long flags;
@@ -518,7 +518,7 @@ static int s5p_aes_crypt(struct ablkcipher_request *req, unsigned long mode)
struct s5p_aes_dev *dev = ctx->dev;
if (!IS_ALIGNED(req->nbytes, AES_BLOCK_SIZE)) {
- pr_err("request size is not exact amount of AES blocks\n");
+ dev_err(dev->dev, "request size is not exact amount of AES blocks\n");
return -EINVAL;
}
@@ -566,7 +566,7 @@ static int s5p_aes_cbc_decrypt(struct ablkcipher_request *req)
static int s5p_aes_cra_init(struct crypto_tfm *tfm)
{
- struct s5p_aes_ctx *ctx = crypto_tfm_ctx(tfm);
+ struct s5p_aes_ctx *ctx = crypto_tfm_ctx(tfm);
ctx->dev = s5p_dev;
tfm->crt_ablkcipher.reqsize = sizeof(struct s5p_aes_reqctx);
@@ -701,7 +701,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
goto err_algs;
}
- pr_info("s5p-sss driver registered\n");
+ dev_info(dev, "s5p-sss driver registered\n");
return 0;
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] crypto: s5p-sss - Use memcpy_toio for iomem annotated memory
2016-01-11 11:45 [PATCH 1/2] crypto: s5p-sss - Fix minor coding style violations Krzysztof Kozlowski
@ 2016-01-11 11:45 ` Krzysztof Kozlowski
2016-01-13 3:01 ` Vladimir Zapolskiy
2016-01-13 2:59 ` [PATCH 1/2] crypto: s5p-sss - Fix minor coding style violations Vladimir Zapolskiy
2016-01-25 14:47 ` Herbert Xu
2 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2016-01-11 11:45 UTC (permalink / raw)
To: Herbert Xu, David S. Miller, linux-crypto, linux-kernel
Cc: Krzysztof Kozlowski
Use memcpy_toio to fix following sparse warning:
drivers/crypto/s5p-sss.c:386:40: warning: incorrect type in argument 1 (different address spaces)
drivers/crypto/s5p-sss.c:386:40: expected void *<noident>
drivers/crypto/s5p-sss.c:386:40: got void [noderef] <asn:2>*
Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
---
drivers/crypto/s5p-sss.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
index e10284744fd2..5f161a9777e3 100644
--- a/drivers/crypto/s5p-sss.c
+++ b/drivers/crypto/s5p-sss.c
@@ -383,7 +383,7 @@ static void s5p_set_aes(struct s5p_aes_dev *dev,
void __iomem *keystart;
if (iv)
- memcpy(dev->aes_ioaddr + SSS_REG_AES_IV_DATA(0), iv, 0x10);
+ memcpy_toio(dev->aes_ioaddr + SSS_REG_AES_IV_DATA(0), iv, 0x10);
if (keylen == AES_KEYSIZE_256)
keystart = dev->aes_ioaddr + SSS_REG_AES_KEY_DATA(0);
@@ -392,7 +392,7 @@ static void s5p_set_aes(struct s5p_aes_dev *dev,
else
keystart = dev->aes_ioaddr + SSS_REG_AES_KEY_DATA(4);
- memcpy(keystart, key, keylen);
+ memcpy_toio(keystart, key, keylen);
}
static void s5p_aes_crypt_start(struct s5p_aes_dev *dev, unsigned long mode)
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] crypto: s5p-sss - Fix minor coding style violations
2016-01-11 11:45 [PATCH 1/2] crypto: s5p-sss - Fix minor coding style violations Krzysztof Kozlowski
2016-01-11 11:45 ` [PATCH 2/2] crypto: s5p-sss - Use memcpy_toio for iomem annotated memory Krzysztof Kozlowski
@ 2016-01-13 2:59 ` Vladimir Zapolskiy
2016-01-25 14:47 ` Herbert Xu
2 siblings, 0 replies; 5+ messages in thread
From: Vladimir Zapolskiy @ 2016-01-13 2:59 UTC (permalink / raw)
To: Krzysztof Kozlowski, Herbert Xu, David S. Miller, linux-crypto,
linux-kernel
On 11.01.2016 13:45, Krzysztof Kozlowski wrote:
> Improve a little bit code readability and use dev_info/err for printing
> messages.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
> ---
> drivers/crypto/s5p-sss.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
With best wishes,
Vladimir
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] crypto: s5p-sss - Use memcpy_toio for iomem annotated memory
2016-01-11 11:45 ` [PATCH 2/2] crypto: s5p-sss - Use memcpy_toio for iomem annotated memory Krzysztof Kozlowski
@ 2016-01-13 3:01 ` Vladimir Zapolskiy
0 siblings, 0 replies; 5+ messages in thread
From: Vladimir Zapolskiy @ 2016-01-13 3:01 UTC (permalink / raw)
To: Krzysztof Kozlowski, Herbert Xu, David S. Miller, linux-crypto,
linux-kernel
On 11.01.2016 13:45, Krzysztof Kozlowski wrote:
> Use memcpy_toio to fix following sparse warning:
>
> drivers/crypto/s5p-sss.c:386:40: warning: incorrect type in argument 1 (different address spaces)
> drivers/crypto/s5p-sss.c:386:40: expected void *<noident>
> drivers/crypto/s5p-sss.c:386:40: got void [noderef] <asn:2>*
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
> ---
> drivers/crypto/s5p-sss.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
With best wishes,
Vladimir
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] crypto: s5p-sss - Fix minor coding style violations
2016-01-11 11:45 [PATCH 1/2] crypto: s5p-sss - Fix minor coding style violations Krzysztof Kozlowski
2016-01-11 11:45 ` [PATCH 2/2] crypto: s5p-sss - Use memcpy_toio for iomem annotated memory Krzysztof Kozlowski
2016-01-13 2:59 ` [PATCH 1/2] crypto: s5p-sss - Fix minor coding style violations Vladimir Zapolskiy
@ 2016-01-25 14:47 ` Herbert Xu
2 siblings, 0 replies; 5+ messages in thread
From: Herbert Xu @ 2016-01-25 14:47 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: David S. Miller, linux-crypto, linux-kernel
On Mon, Jan 11, 2016 at 08:45:50PM +0900, Krzysztof Kozlowski wrote:
> Improve a little bit code readability and use dev_info/err for printing
> messages.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Both 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] 5+ messages in thread
end of thread, other threads:[~2016-01-25 14:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-11 11:45 [PATCH 1/2] crypto: s5p-sss - Fix minor coding style violations Krzysztof Kozlowski
2016-01-11 11:45 ` [PATCH 2/2] crypto: s5p-sss - Use memcpy_toio for iomem annotated memory Krzysztof Kozlowski
2016-01-13 3:01 ` Vladimir Zapolskiy
2016-01-13 2:59 ` [PATCH 1/2] crypto: s5p-sss - Fix minor coding style violations Vladimir Zapolskiy
2016-01-25 14:47 ` 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.