[PATCH 3/3] sh: dma: drop redundant size argument from strscpy in request_dma
Thorsten Blum <[email protected]>
| Newsgroups | gmane.linux.ports.sh.devel,gmane.linux.kernel |
|---|---|
| Message-ID | <[email protected]> |
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. Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Thorsten Blum <[email protected]> --- 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);