linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Kwon Tae-young <tykwon@m2i.co.kr>
Cc: Oleksij Rempel <linux@rempel-privat.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] i2c/imx: Fix some checkpatch warnings
Date: Wed, 23 Jun 2021 14:19:42 +0200	[thread overview]
Message-ID: <20210623121942.n5vzur5rfazgjtd2@pengutronix.de> (raw)
In-Reply-To: <20210623083643.395-1-tykwon@m2i.co.kr>

[-- Attachment #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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-06-23 12:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23  8:36 [PATCH] i2c/imx: Fix some checkpatch warnings Kwon Tae-young
2021-06-23 12:19 ` Uwe Kleine-König [this message]
2021-06-24 19:58 ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210623121942.n5vzur5rfazgjtd2@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rempel-privat.de \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=tykwon@m2i.co.kr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).