2020-04-25 14:24:22

by Tang Bin

[permalink] [raw]
Subject: [PATCH] crypto: bcm - Remove the unnecessary cast for PTR_ERR().

It's not necessary to specify 'int' casting for PTR_ERR().

Signed-off-by: Zhang Shengju <[email protected]>
Signed-off-by: Tang Bin <[email protected]>
---
drivers/crypto/bcm/cipher.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/bcm/cipher.c b/drivers/crypto/bcm/cipher.c
index 91db553e6..99ece630f 100644
--- a/drivers/crypto/bcm/cipher.c
+++ b/drivers/crypto/bcm/cipher.c
@@ -4436,7 +4436,7 @@ static int spu_mb_init(struct device *dev)
for (i = 0; i < iproc_priv.spu.num_chan; i++) {
iproc_priv.mbox[i] = mbox_request_channel(mcl, i);
if (IS_ERR(iproc_priv.mbox[i])) {
- err = (int)PTR_ERR(iproc_priv.mbox[i]);
+ err = PTR_ERR(iproc_priv.mbox[i]);
dev_err(dev,
"Mbox channel %d request failed with err %d",
i, err);
--
2.20.1.windows.1




2020-04-30 05:34:17

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] crypto: bcm - Remove the unnecessary cast for PTR_ERR().

On Sat, Apr 25, 2020 at 10:22:58PM +0800, Tang Bin wrote:
> It's not necessary to specify 'int' casting for PTR_ERR().
>
> Signed-off-by: Zhang Shengju <[email protected]>
> Signed-off-by: Tang Bin <[email protected]>
> ---
> drivers/crypto/bcm/cipher.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

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