Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2273637ybc; Sun, 17 Nov 2019 17:43:49 -0800 (PST) X-Google-Smtp-Source: APXvYqzvP8O9YXyaXMAsbsdZ68D3tJs9NyCncQrQ2jK/mEG80SJSbaA5CEeFhJOB2evxZofJ5R0N X-Received: by 2002:a17:906:53c7:: with SMTP id p7mr22490139ejo.88.1574041429510; Sun, 17 Nov 2019 17:43:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574041429; cv=none; d=google.com; s=arc-20160816; b=mair5rIA0mFlXFFxPBgG8CXjZ6g0APqfPd9i5RqsqciyHpY/QcXERl9CiQN6naJhpY 16FCrA93951i3S3h646ou1QjYgqY+pIH+2jNDUEcut3Kmu3mx3d2+mODKvPWGGRmoPzs NUFlq2QQMtVw7D98VjRN74dkHpXibOBTdbcz+R2aZUEcULy3QlMiCOWsM7rlrpfnMiTa rkqeDdlxogZNu1wiE8AWjOK6QrUxRiPXMzd++uXkikCzPYoRHjbl4DnEOzbUbEYw6dJ8 3Qx7+l1NCXSl5yw3yGEhfo1Du/+A/gmPjJ7w5puDQWlyldWh+MGMC8iW7ohjAf4MpURh +YJw== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=JpV8cuKhAVOYze0JNduiZ4I6tb7g/v2UgGZPFvKuD7Q=; b=EhX7/nYKZpv4B7B4fPQyKzkyr542cSmV5In3Q3pBojc2K5AqvOAKJyURsSzy1xPsSU G35om8K7jk2v79vHW2yDAjhhix2oumQgtPwSDhpDg38594lnjY6LG9CdTbfH8iLERjbz pDHDY485X/0jc7E+nlFTF4LO+dOTwO2SzrSRLcEdPdLm+WZEd/U0bD4/C08Wuyt5NloB gkHsHjkShQcODLZXYQbiWmgtTHkssxn11bGdEWZ7sKbNpnygWw14KjirJ0WNbl2C8miJ CapxbqHWANHyjHAhP+EUseQdGTg0tZxkuYQHK9epzamupKPST8A8KRtuNRNIx1bf8QrL Yykg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id la4si10808805ejb.297.2019.11.17.17.43.24; Sun, 17 Nov 2019 17:43:49 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726460AbfKRBls (ORCPT + 99 others); Sun, 17 Nov 2019 20:41:48 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:6686 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725905AbfKRBls (ORCPT ); Sun, 17 Nov 2019 20:41:48 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 8BC3D6CF6D2961F95314; Mon, 18 Nov 2019 09:41:40 +0800 (CST) Received: from [127.0.0.1] (10.133.213.239) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.439.0; Mon, 18 Nov 2019 09:41:38 +0800 Subject: Re: [PATCH v2 -next] iio: st_accel: Fix unused variable warning To: Jonathan Cameron References: <20191101134741.25108-1-yuehaibing@huawei.com> <20191111032115.3008-1-yuehaibing@huawei.com> <20191116145821.1ac46310@archlinux> CC: , , , , , , , , , , From: Yuehaibing Message-ID: <782ac6a6-9ee6-38fa-c599-72da7f70ffa5@huawei.com> Date: Mon, 18 Nov 2019 09:41:37 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20191116145821.1ac46310@archlinux> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/11/16 22:58, Jonathan Cameron wrote: > 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. Thanks! > > 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 > > > . >