mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
crypto: cavium - 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(). Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
cae575fc09
commit
3c181f71cd
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user