[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210623121942.n5vzur5rfazgjtd2@pengutronix.de>
Date: Wed, 23 Jun 2021 14:19:42 +0200
From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To: Kwon Tae-young <tykwon@....co.kr>
Cc: Oleksij Rempel <linux@...pel-privat.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] i2c/imx: Fix some checkpatch warnings
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@...gutronix.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/ |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists