Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp688041ybc; Sat, 16 Nov 2019 07:00:25 -0800 (PST) X-Google-Smtp-Source: APXvYqytEQKuqBkRlGGzc2sTXcHuJZwNrG8TKKxGwtqQNR5ErxjFv0NDjRAdCjRBrf/pPv+JfeuB X-Received: by 2002:a17:906:4d99:: with SMTP id s25mr10584865eju.187.1573916425776; Sat, 16 Nov 2019 07:00:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573916425; cv=none; d=google.com; s=arc-20160816; b=sgnRRspErBGUybqcLoQPCUgHNTHELqGscoVd0fzRwaeCG5h0ba9Pt4pM1WW4uaAC6e dHTm1NRTGErqzVAQYl0+axOYZpdOMwbxww12d2cliM4btvmmSN48TC7A2YL6hAWg/Xc/ YjAPmIL5/Ud3onZ/RdMxvyJm4mCtCbwaKxnLJhafyDuRIVLFa/70QB0SpUG9EK+R8FkA tApqZTk4Lqf2ZNAA3CN0U/UKfOnKW1R8lCqmFx4K9EXALfeK3+4bX/GWipzJdWvhb2s3 nQPa/iOMBGBcLI+mhKKz0BQeMf0yhCsKB5VEuzhQkLiGubD/Tmos7TV5/J8C46XpiaEy eu7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=14tA9oobhG4Kq920k+oxTlAqC22o2lqvhfL8ptbwa+8=; b=ado3PMFXPaHuYmKcsHaaeUoi/FadpGSpyy2zlbUOqd95RXL5tmCN3p8hLDQG3te+6+ nMgaqFn1Nmb4lVYW9LKIL6aPH4ko7HIIhgNWbNOr5bbHXEuHFVyCNuqGdG/Z/iTIpyRO JpNKRfnwrnTA/DHTN0RKiZiqqIjAbDN9eOOXtSmbtrwoiykMRF7/fvm3RfvGynwbK01b 7W4xWWKnWroOjnzC81tbe4/TJC7SQgRupL5tbMP2dApAsW69dxpZbQpNYVt0mlI/Eb/H iS8kdO4Jh/rzlt9pGSoM9YlHN7MKzr9I/m+c6enZU1PGCFP+U1S1/r+ZIQeNfUWo+q2L BbBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="QVmsY/9y"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a23si8005414ejj.373.2019.11.16.06.59.48; Sat, 16 Nov 2019 07:00:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="QVmsY/9y"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727722AbfKPO62 (ORCPT + 99 others); Sat, 16 Nov 2019 09:58:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:38256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727123AbfKPO61 (ORCPT ); Sat, 16 Nov 2019 09:58:27 -0500 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B6810206E1; Sat, 16 Nov 2019 14:58:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573916306; bh=nqj7UgNe0Y4TorqsN/gXEjpreuWHhGzDviu/NK0eTGY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=QVmsY/9yc7WAqHURPRvwYQp9if/HCsbC7uuA8wgiI30LncE8VOxnkm81x4xlLGGMS +u0DVtmTf24lRld1uMYn7vx1KUwqI+pVEdpEJJ25KN1rPP4fpUZSmChFREr0EAshUh CsS4GbWha/LIQQfZe3mLqufeUIq3dN8oxL681T1Q= Date: Sat, 16 Nov 2019 14:58:21 +0000 From: Jonathan Cameron To: YueHaibing Cc: , , , , , , , , , , Subject: Re: [PATCH v2 -next] iio: st_accel: Fix unused variable warning Message-ID: <20191116145821.1ac46310@archlinux> In-Reply-To: <20191111032115.3008-1-yuehaibing@huawei.com> References: <20191101134741.25108-1-yuehaibing@huawei.com> <20191111032115.3008-1-yuehaibing@huawei.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 11 Nov 2019 11:21:15 +0800 YueHaibing wrote: > drivers/iio/accel/st_accel_core.c:1005:44: warning: > mount_matrix_ext_info defined but not used [-Wunused-const-variable=] > > Using stub helper while CONFIG_ACPI is disabled to fix it. > > Suggested-by: Ladislav Michl > Signed-off-by: YueHaibing Applied to the fixes-togreg branch of iio.git as I've now closed for new things for the coming merge window. This will go upstream after the merge window closes and probably hit around rc2. Thanks for cleaning this up. Jonathan > --- > drivers/iio/accel/st_accel_core.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c > index 7b83764..7320275 100644 > --- a/drivers/iio/accel/st_accel_core.c > +++ b/drivers/iio/accel/st_accel_core.c > @@ -992,6 +992,7 @@ static const struct iio_trigger_ops st_accel_trigger_ops = { > #define ST_ACCEL_TRIGGER_OPS NULL > #endif > > +#ifdef CONFIG_ACPI > static const struct iio_mount_matrix * > get_mount_matrix(const struct iio_dev *indio_dev, > const struct iio_chan_spec *chan) > @@ -1012,7 +1013,6 @@ static const struct iio_chan_spec_ext_info mount_matrix_ext_info[] = { > static int apply_acpi_orientation(struct iio_dev *indio_dev, > struct iio_chan_spec *channels) > { > -#ifdef CONFIG_ACPI > struct st_sensor_data *adata = iio_priv(indio_dev); > struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; > struct acpi_device *adev; > @@ -1140,10 +1140,14 @@ static int apply_acpi_orientation(struct iio_dev *indio_dev, > out: > kfree(buffer.pointer); > return ret; > +} > #else /* !CONFIG_ACPI */ > +static int apply_acpi_orientation(struct iio_dev *indio_dev, > + struct iio_chan_spec *channels) > +{ > return 0; > -#endif > } > +#endif > > /* > * st_accel_get_settings() - get sensor settings from device name