[PATCH 3/3] sh: dma: drop redundant size argument from strscpy in request_dma

From: Thorsten Blum

Date: Mon Apr 20 2026 - 12:19:04 EST


The strscpy() size argument is optional if the destination buffer has a
fixed length. Use the two-argument version of strscpy() to copy 'dev_id'
to simplify the code.

Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
---
arch/sh/drivers/dma/dma-api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sh/drivers/dma/dma-api.c b/arch/sh/drivers/dma/dma-api.c
index 87e5a8928873..15e2c10c9805 100644
--- a/arch/sh/drivers/dma/dma-api.c
+++ b/arch/sh/drivers/dma/dma-api.c
@@ -96,7 +96,7 @@ int request_dma(unsigned int chan, const char *dev_id)
if (atomic_xchg(&channel->busy, 1))
return -EBUSY;

- strscpy(channel->dev_id, dev_id, sizeof(channel->dev_id));
+ strscpy(channel->dev_id, dev_id);

if (info->ops->request) {
result = info->ops->request(channel);