* Re: [PATCH] i2c/imx: Fix some checkpatch warnings
[not found] <20210623083643.395-1-tykwon@m2i.co.kr>
@ 2021-06-23 12:19 ` Uwe Kleine-König
2021-06-24 19:58 ` Wolfram Sang
1 sibling, 0 replies; 2+ messages in thread
From: Uwe Kleine-König @ 2021-06-23 12:19 UTC (permalink / raw)
To: Kwon Tae-young
Cc: Oleksij Rempel, Pengutronix Kernel Team, Shawn Guo, Sascha Hauer,
Fabio Estevam, NXP Linux Team, linux-kernel, linux-i2c,
linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 927 bytes --]
Hello,
On Wed, Jun 23, 2021 at 05:36:43PM +0900, Kwon Tae-young wrote:
> @@ -1395,7 +1386,7 @@ static int i2c_imx_probe(struct platform_device *pdev)
> platform_get_device_id(pdev)->driver_data;
>
> /* Setup i2c_imx driver structure */
> - strlcpy(i2c_imx->adapter.name, pdev->name, sizeof(i2c_imx->adapter.name));
> + strscpy(i2c_imx->adapter.name, pdev->name, sizeof(i2c_imx->adapter.name));
TIL about strscpy. I'm not yet sure if I like it better than strlcpy in
this case, but the usage is correct for sure.
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> i2c_imx->adapter.owner = THIS_MODULE;
> i2c_imx->adapter.algo = &i2c_imx_algo;
> i2c_imx->adapter.dev.parent = &pdev->dev;
> --
> 2.17.1
>
>
>
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] i2c/imx: Fix some checkpatch warnings
[not found] <20210623083643.395-1-tykwon@m2i.co.kr>
2021-06-23 12:19 ` [PATCH] i2c/imx: Fix some checkpatch warnings Uwe Kleine-König
@ 2021-06-24 19:58 ` Wolfram Sang
1 sibling, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2021-06-24 19:58 UTC (permalink / raw)
To: Kwon Tae-young
Cc: Oleksij Rempel, Pengutronix Kernel Team, Shawn Guo, Sascha Hauer,
Fabio Estevam, NXP Linux Team, linux-i2c, linux-arm-kernel,
linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1264 bytes --]
On Wed, Jun 23, 2021 at 05:36:43PM +0900, Kwon Tae-young wrote:
> Fix the following warnings reported by checkpatch::
> drivers/i2c/busses/i2c-imx.c:173: WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
> drivers/i2c/busses/i2c-imx.c:175: WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
> drivers/i2c/busses/i2c-imx.c:176: WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
> drivers/i2c/busses/i2c-imx.c:177: WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
> drivers/i2c/busses/i2c-imx.c:455: WARNING: Unnecessary ftrace-like logging - prefer using ftrace
> drivers/i2c/busses/i2c-imx.c:602: WARNING: Unnecessary ftrace-like logging - prefer using ftrace
> drivers/i2c/busses/i2c-imx.c:638: WARNING: Unnecessary ftrace-like logging - prefer using ftrace
> drivers/i2c/busses/i2c-imx.c:1170: WARNING: Unnecessary ftrace-like logging - prefer using ftrace
> drivers/i2c/busses/i2c-imx.c:1374: WARNING: Unnecessary ftrace-like logging - prefer using ftrace
> drivers/i2c/busses/i2c-imx.c:1398: WARNING: Prefer strscpy over strlcpy - see: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
>
> Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
Applied to for-next, thanks!
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-24 20:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20210623083643.395-1-tykwon@m2i.co.kr>
2021-06-23 12:19 ` [PATCH] i2c/imx: Fix some checkpatch warnings Uwe Kleine-König
2021-06-24 19:58 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).