Commit 313becd1 authored by Krzysztof Koz?owski's avatar Krzysztof Koz?owski Committed by Herbert Xu

crypto: s5p-sss - Fix minor coding style violations

Improve a little bit code readability and use dev_info/err for printing
messages.
Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski.k@gmail.com>
Acked-by: default avatarVladimir Zapolskiy <vz@mleia.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 718837c8
...@@ -224,6 +224,7 @@ static inline struct samsung_aes_variant *find_s5p_sss_version ...@@ -224,6 +224,7 @@ static inline struct samsung_aes_variant *find_s5p_sss_version
{ {
if (IS_ENABLED(CONFIG_OF) && (pdev->dev.of_node)) { if (IS_ENABLED(CONFIG_OF) && (pdev->dev.of_node)) {
const struct of_device_id *match; const struct of_device_id *match;
match = of_match_node(s5p_sss_dt_match, match = of_match_node(s5p_sss_dt_match,
pdev->dev.of_node); pdev->dev.of_node);
return (struct samsung_aes_variant *)match->data; return (struct samsung_aes_variant *)match->data;
...@@ -397,7 +398,6 @@ static void s5p_set_aes(struct s5p_aes_dev *dev, ...@@ -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) static void s5p_aes_crypt_start(struct s5p_aes_dev *dev, unsigned long mode)
{ {
struct ablkcipher_request *req = dev->req; struct ablkcipher_request *req = dev->req;
uint32_t aes_control; uint32_t aes_control;
int err; int err;
unsigned long flags; unsigned long flags;
...@@ -518,7 +518,7 @@ static int s5p_aes_crypt(struct ablkcipher_request *req, unsigned long mode) ...@@ -518,7 +518,7 @@ static int s5p_aes_crypt(struct ablkcipher_request *req, unsigned long mode)
struct s5p_aes_dev *dev = ctx->dev; struct s5p_aes_dev *dev = ctx->dev;
if (!IS_ALIGNED(req->nbytes, AES_BLOCK_SIZE)) { 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; return -EINVAL;
} }
...@@ -566,7 +566,7 @@ static int s5p_aes_cbc_decrypt(struct ablkcipher_request *req) ...@@ -566,7 +566,7 @@ static int s5p_aes_cbc_decrypt(struct ablkcipher_request *req)
static int s5p_aes_cra_init(struct crypto_tfm *tfm) 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; ctx->dev = s5p_dev;
tfm->crt_ablkcipher.reqsize = sizeof(struct s5p_aes_reqctx); tfm->crt_ablkcipher.reqsize = sizeof(struct s5p_aes_reqctx);
...@@ -701,7 +701,7 @@ static int s5p_aes_probe(struct platform_device *pdev) ...@@ -701,7 +701,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
goto err_algs; goto err_algs;
} }
pr_info("s5p-sss driver registered\n"); dev_info(dev, "s5p-sss driver registered\n");
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment