From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E2DCC48BE5 for ; Wed, 23 Jun 2021 12:19:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2CBED6100B for ; Wed, 23 Jun 2021 12:19:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230384AbhFWMWL (ORCPT ); Wed, 23 Jun 2021 08:22:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230182AbhFWMWK (ORCPT ); Wed, 23 Jun 2021 08:22:10 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2179C061574 for ; Wed, 23 Jun 2021 05:19:52 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lw1r9-0005px-3E; Wed, 23 Jun 2021 14:19:47 +0200 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lw1r4-0008Rw-Dr; Wed, 23 Jun 2021 14:19:42 +0200 Date: Wed, 23 Jun 2021 14:19:42 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Kwon Tae-young Cc: Oleksij Rempel , Pengutronix Kernel Team , Shawn Guo , Sascha Hauer , Fabio Estevam , NXP Linux Team , 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 Message-ID: <20210623121942.n5vzur5rfazgjtd2@pengutronix.de> References: <20210623083643.395-1-tykwon@m2i.co.kr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6t4gwuuw3c4iudk7" Content-Disposition: inline In-Reply-To: <20210623083643.395-1-tykwon@m2i.co.kr> X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --6t4gwuuw3c4iudk7 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 *pd= ev) > platform_get_device_id(pdev)->driver_data; > =20 > /* 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=F6nig > i2c_imx->adapter.owner =3D THIS_MODULE; > i2c_imx->adapter.algo =3D &i2c_imx_algo; > i2c_imx->adapter.dev.parent =3D &pdev->dev; > --=20 > 2.17.1 >=20 >=20 >=20 --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --6t4gwuuw3c4iudk7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmDTJtsACgkQwfwUeK3K 7AkcKAf+JNnmzhVNCCViCtR6HE2gW9q9uFgU0NcJUPhf33AZ34LmL2MqFEApXR5f iWxOkJd2zBV3VKevtDIYK7E8JhrvDNokENlXdL00DBx4GYgAOGCKecTzp7WzQkaG mqBk078/wklfKIjbSI/X8xxeuW8liulhQhVzVkgJpRUmWIACuWkyiV6bkAY9V0RY Q8dgt8KwmE2pqUOOK4m8RARKxRB1upqfZwOvBQi2zcMc7vRTXgIW/jOpmK6fO4PT C6Rfw53qzoO84rhhVwM1iYfE6JUOlemltFJKUW38HzK/NfDHglQptOBw21Fe9ENb 1DtxU4f00YwR95l+HVOdC8d8rw8KNw== =+yxd -----END PGP SIGNATURE----- --6t4gwuuw3c4iudk7-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D60A1C4743C for ; Wed, 23 Jun 2021 12:22:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 95D0F61002 for ; Wed, 23 Jun 2021 12:22:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 95D0F61002 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MXF5Mcz75LTdi0i+4/54Nh8YJAyurq4OPzyHb9U7ktk=; b=fF+bi7daC0dS5HTNhpUYB053O8 yi3fEEO7G6G7Dl+Ept4H5QdCP/O1zlGYUrBye6Hr+zydlER72lr+b3lYIgS+eBGdRgeb8mP/5yqJt zKhQoJfI0uk8fVVCuzKTkepRP+TAZnyezIpd+mqg+reOoK6vA+j49esA9pcVZlPrGcyxgast2VYou LuXrfJKvCJjxUpV8QVuzdg3/hRrXkMgjTaL4p3H7O5nDeBqVkAnPuFDoh/6awwJmlSjLE6becJ4tu 3yH2OWQUa4L1nJ8zFlN+11sxu2efU2UzhU2DpqXX2RE9P7yqlk9uf1OjCZ9NYBMs/3GsNG/TX7TTN 7mXABMsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lw1rK-00AaRP-Ob; Wed, 23 Jun 2021 12:19:58 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lw1rG-00AaQf-QE for linux-arm-kernel@lists.infradead.org; Wed, 23 Jun 2021 12:19:56 +0000 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lw1r9-0005px-3E; Wed, 23 Jun 2021 14:19:47 +0200 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lw1r4-0008Rw-Dr; Wed, 23 Jun 2021 14:19:42 +0200 Date: Wed, 23 Jun 2021 14:19:42 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Kwon Tae-young Cc: Oleksij Rempel , Pengutronix Kernel Team , Shawn Guo , Sascha Hauer , Fabio Estevam , NXP Linux Team , 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 Message-ID: <20210623121942.n5vzur5rfazgjtd2@pengutronix.de> References: <20210623083643.395-1-tykwon@m2i.co.kr> MIME-Version: 1.0 In-Reply-To: <20210623083643.395-1-tykwon@m2i.co.kr> X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210623_051954_896490_A7371A70 X-CRM114-Status: GOOD ( 15.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============7948944875919805550==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============7948944875919805550== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6t4gwuuw3c4iudk7" Content-Disposition: inline --6t4gwuuw3c4iudk7 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 *pd= ev) > platform_get_device_id(pdev)->driver_data; > =20 > /* 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=F6nig > i2c_imx->adapter.owner =3D THIS_MODULE; > i2c_imx->adapter.algo =3D &i2c_imx_algo; > i2c_imx->adapter.dev.parent =3D &pdev->dev; > --=20 > 2.17.1 >=20 >=20 >=20 --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --6t4gwuuw3c4iudk7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmDTJtsACgkQwfwUeK3K 7AkcKAf+JNnmzhVNCCViCtR6HE2gW9q9uFgU0NcJUPhf33AZ34LmL2MqFEApXR5f iWxOkJd2zBV3VKevtDIYK7E8JhrvDNokENlXdL00DBx4GYgAOGCKecTzp7WzQkaG mqBk078/wklfKIjbSI/X8xxeuW8liulhQhVzVkgJpRUmWIACuWkyiV6bkAY9V0RY Q8dgt8KwmE2pqUOOK4m8RARKxRB1upqfZwOvBQi2zcMc7vRTXgIW/jOpmK6fO4PT C6Rfw53qzoO84rhhVwM1iYfE6JUOlemltFJKUW38HzK/NfDHglQptOBw21Fe9ENb 1DtxU4f00YwR95l+HVOdC8d8rw8KNw== =+yxd -----END PGP SIGNATURE----- --6t4gwuuw3c4iudk7-- --===============7948944875919805550== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============7948944875919805550==--