summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2026-06-06 01:11:01 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2026-07-05 13:19:52 +0800
commitdea300a465ee8e1821f56fe758ab23ce2f118f75 (patch)
tree5136dbdbf7a3290f635b8daaa9124d83d5886903 /drivers
parent3c6ec632bc90dae0813df2186f681bd3bfce0983 (diff)
downloadlinux-next-dea300a465ee8e1821f56fe758ab23ce2f118f75.tar.gz
linux-next-dea300a465ee8e1821f56fe758ab23ce2f118f75.zip
crypto: hisilicon - use 2-arg strscpy where destination size is known
To simplify the code, drop explicit and hard-coded size arguments from strscpy() where the destination buffer has a fixed size and strscpy() can automatically determine it using sizeof(). Reviewed-by: Longfang Liu <liulongfang@huawei.com> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/crypto/hisilicon/qm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index a951d2ef7833..c01966a4a33f 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -2944,11 +2944,8 @@ static int qm_alloc_uacce(struct hisi_qm *qm)
.flags = UACCE_DEV_SVA,
.ops = &uacce_qm_ops,
};
- int ret;
- ret = strscpy(interface.name, dev_driver_string(&pdev->dev),
- sizeof(interface.name));
- if (ret < 0)
+ if (strscpy(interface.name, dev_driver_string(&pdev->dev)) < 0)
return -ENAMETOOLONG;
uacce = uacce_alloc(&pdev->dev, &interface);