From: Thorsten Blum <thorsten.blum@linux.dev>
To: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Tom Lendacky <thomas.lendacky@amd.com>,
John Allen <john.allen@amd.com>,
Weili Qian <qianweili@huawei.com>,
Zhou Wang <wangzhou1@hisilicon.com>,
Giovanni Cabiddu <giovanni.cabiddu@intel.com>,
Srujana Challa <schalla@marvell.com>,
Bharat Bhushan <bbhushan2@marvell.com>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
qat-linux@intel.com, Thorsten Blum <thorsten.blum@linux.dev>
Subject: [PATCH v2 2/6] crypto: cavium - use 2-arg strscpy where destination size is known
Date: Sat, 6 Jun 2026 01:10:59 +0200 [thread overview]
Message-ID: <20260605231056.1622060-10-thorsten.blum@linux.dev> (raw)
In-Reply-To: <20260605231056.1622060-8-thorsten.blum@linux.dev>
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().
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
drivers/crypto/cavium/nitrox/nitrox_hal.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/cavium/nitrox/nitrox_hal.c b/drivers/crypto/cavium/nitrox/nitrox_hal.c
index 1b5abdb6cc5e..e36c1741bb78 100644
--- a/drivers/crypto/cavium/nitrox/nitrox_hal.c
+++ b/drivers/crypto/cavium/nitrox/nitrox_hal.c
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/delay.h>
+#include <linux/string.h>
#include "nitrox_dev.h"
#include "nitrox_csr.h"
@@ -647,7 +648,7 @@ void nitrox_get_hwinfo(struct nitrox_device *ndev)
ndev->hw.revision_id);
/* copy partname */
- strscpy(ndev->hw.partname, name, sizeof(ndev->hw.partname));
+ strscpy(ndev->hw.partname, name);
}
void enable_pf2vf_mbox_interrupts(struct nitrox_device *ndev)
next prev parent reply other threads:[~2026-06-05 23:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-05 23:10 [PATCH v2 0/6] crypto: use 2-arg strscpy where destination size is known Thorsten Blum
2026-06-05 23:10 ` [PATCH v2 1/6] " Thorsten Blum
2026-06-05 23:10 ` Thorsten Blum [this message]
2026-06-05 23:11 ` [PATCH v2 3/6] crypto: ccp - " Thorsten Blum
2026-06-05 23:11 ` [PATCH v2 4/6] crypto: hisilicon " Thorsten Blum
2026-06-05 23:11 ` [PATCH v2 5/6] crypto: qat " Thorsten Blum
2026-06-05 23:11 ` [PATCH v2 6/6] crypto: octeontx " Thorsten Blum
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=20260605231056.1622060-10-thorsten.blum@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=bbhushan2@marvell.com \
--cc=davem@davemloft.net \
--cc=giovanni.cabiddu@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=john.allen@amd.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=qat-linux@intel.com \
--cc=qianweili@huawei.com \
--cc=schalla@marvell.com \
--cc=thomas.lendacky@amd.com \
--cc=wangzhou1@hisilicon.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