Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp748878pxj; Thu, 20 May 2021 21:49:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfxdVPOcMkUd5lVdYYsRENKx5IThuWG+iOqt4ejgS2MMfB92YYxV+zBxZATD4Xd5xpm+aG X-Received: by 2002:a92:d9d2:: with SMTP id n18mr10310020ilq.10.1621572551342; Thu, 20 May 2021 21:49:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621572551; cv=none; d=google.com; s=arc-20160816; b=Z6IqzG2tqYXwf5Tcx8X3Lp7/PsgwdLof1Hku88//xwzLl6WhT9KSq3L9q4tNcrFi4Z kFMbH9T/63Pmc2yQsfFEjKWsys1QldkX+c17STenUKTMwZyxm8nM8KfUeuy9IHBy8cka PvGiIghSauv+hZ7p+YW5Fw9natylUgi7m1Z+vN8xTTyAOaezKOcb++fGYuac50jm58fr /9Pvl0iqv3ieOW2ZShchEDJWwwcVzd0eHTSq/NOqXp9v+lUQ5kihD8+sn5L16V8WT6aI 2xnaGG9AtcXTNd8P1WcgMpKEc6EXqgcMS0TDUVAzhoPET1RwFKnhmjbjy3B8jYx4dyUe LOaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=+ZfTwF946kZl4IKngfjKLoB4xtPvaEkCXH5f5Xi8s9s=; b=KgNWZDZaiIP8ctwxRMIITqbguSujmXqfMjcNsauwil0wVZw4gMi+h+Pq7JNnrxUo9S L9WN1n57EjfamkA7YhE2/NvHV6U+Bt9GNEFmPLsnApFuUOYX5aqlNk1P+84btJw/uYhQ k4RM2yyxsO30HFgv5PqjrBFN3+9H7PrEhCZnNOs6LjJKE5CzECadcMsYYrXH7YzZv0Nc xzeGLZS76iyvZ7IDHYzZw9MzVpVL18Zdoa+yAKNLj7IirtqQ/B7JvJ6a2gIjav7Cz/6O 0PC3aEtfbIUN+Ic2VJN4/1slghc9Y2PFp6c+2dhD8JGWrj2Lsm0SNFeHAI9OI56vpY9I G36w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 5si5533816ilx.117.2021.05.20.21.48.58; Thu, 20 May 2021 21:49:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243448AbhETNHV (ORCPT + 99 others); Thu, 20 May 2021 09:07:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243416AbhETNHN (ORCPT ); Thu, 20 May 2021 09:07:13 -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 6BDFEC0610D9 for ; Thu, 20 May 2021 05:47:20 -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 1lji4v-0001Dk-Qz; Thu, 20 May 2021 14:47:05 +0200 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lji4u-0004FW-43; Thu, 20 May 2021 14:47:04 +0200 Date: Thu, 20 May 2021 14:47:03 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Lee Jones Cc: linux-kernel@vger.kernel.org, Ian Abbott , H Hartley Sweeten , Greg Kroah-Hartman , Thierry Reding , "David A. Schleef" , Mori Hess , Truxton Fulton , linux-staging@lists.linux.dev, linux-pwm@vger.kernel.org Subject: Re: [PATCH 5/6] comedi: drivers: ni_mio_common: Move 'range_ni_E_ao_ext' to where it is used Message-ID: <20210520124703.37w3r2fnw3pjsjot@pengutronix.de> References: <20210520122538.3470259-1-lee.jones@linaro.org> <20210520122538.3470259-6-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="drt6bspysws4e3wb" Content-Disposition: inline In-Reply-To: <20210520122538.3470259-6-lee.jones@linaro.org> 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 --drt6bspysws4e3wb Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Lee, On Thu, May 20, 2021 at 01:25:37PM +0100, Lee Jones wrote: > ... and mark it as __maybe_unused since not all users of the > header file reference it. >=20 > Fixes the following W=3D1 kernel build warning(s): >=20 > drivers/staging/comedi/drivers/ni_mio_common.c:163:35: warning: =E2=80= =98range_ni_E_ao_ext=E2=80=99 defined but not used [-Wunused-const-variable= =3D] >=20 > Cc: Ian Abbott > Cc: H Hartley Sweeten > Cc: Greg Kroah-Hartman > Cc: Thierry Reding > Cc: "Uwe Kleine-K=C3=B6nig" > Cc: Lee Jones > Cc: "David A. Schleef" > Cc: Mori Hess > Cc: Truxton Fulton > Cc: linux-staging@lists.linux.dev > Cc: linux-pwm@vger.kernel.org > Signed-off-by: Lee Jones > --- > drivers/comedi/drivers/ni_mio_common.c | 9 --------- > drivers/comedi/drivers/ni_stc.h | 9 ++++++++- > 2 files changed, 8 insertions(+), 10 deletions(-) >=20 > diff --git a/drivers/comedi/drivers/ni_mio_common.c b/drivers/comedi/driv= ers/ni_mio_common.c > index 4f80a4991f953..37615b4e2c10d 100644 > --- a/drivers/comedi/drivers/ni_mio_common.c > +++ b/drivers/comedi/drivers/ni_mio_common.c > @@ -160,15 +160,6 @@ static const struct comedi_lrange range_ni_M_ai_628x= =3D { > } > }; > =20 > -static const struct comedi_lrange range_ni_E_ao_ext =3D { > - 4, { > - BIP_RANGE(10), > - UNI_RANGE(10), > - RANGE_ext(-1, 1), > - RANGE_ext(0, 1) > - } > -}; > - > static const struct comedi_lrange *const ni_range_lkup[] =3D { > [ai_gain_16] =3D &range_ni_E_ai, > [ai_gain_8] =3D &range_ni_E_ai_limited, > diff --git a/drivers/comedi/drivers/ni_stc.h b/drivers/comedi/drivers/ni_= stc.h > index fbc0b753a0f59..0822e65f709dd 100644 > --- a/drivers/comedi/drivers/ni_stc.h > +++ b/drivers/comedi/drivers/ni_stc.h > @@ -1137,6 +1137,13 @@ struct ni_private { > u8 rgout0_usage; > }; > =20 > -static const struct comedi_lrange range_ni_E_ao_ext; > +static const struct comedi_lrange __maybe_unused range_ni_E_ao_ext =3D { > + 4, { > + BIP_RANGE(10), > + UNI_RANGE(10), > + RANGE_ext(-1, 1), > + RANGE_ext(0, 1) > + } > +}; When you send this patch some time ago I wrote: | I think a downside of this solution is that range_ni_E_ao_ext might be | duplicated in the object files. (Ditto for the status quo BTW.) |=20 | I think the right approach to fix the compiler warning and the | duplication is to declare range_ni_E_ao_ext external in the header and | keep the definition in ni_mio_common.c. You didn't reply to that, so maybe you missed it? Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=C3=B6nig = | Industrial Linux Solutions | https://www.pengutronix.de/ | --drt6bspysws4e3wb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmCmWkQACgkQwfwUeK3K 7Am3yQf/QDEk6FnlXWz2XZJUtFPOfRT6SFJwexcP/05uMpdcRQ6k0ibtZpQDDEYF +9VJBQs4ESJT8sZbj38q+wyLWxhQ+mbeLVz+N4wUwNti/qb0Uc71CV+MRPXLJZer eauuRTSCxwwfUnM7IVXOdOLGzN7SfGK6wDE/0cv2xr/r65/8EfcFcPKKkCEBHV7V +MJMq+y+efY9q/Q8CxCQ7TVe3SaWDbzMj529kzezj2rEtk9NOklTn4VRqATc4RV5 vRZ0E1EEy8tyROWZDSw6h+7mOtox9M22jgUAhukA28gOZauqArTsgtGWcjCI75GF qc3qPQopf5IfFWYUsmbmNn47SJqikw== =Yd+/ -----END PGP SIGNATURE----- --drt6bspysws4e3wb--