lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 16 Nov 2019 14:58:21 +0000
From:   Jonathan Cameron <jic23@...nel.org>
To:     YueHaibing <yuehaibing@...wei.com>
Cc:     <knaack.h@....de>, <lars@...afoo.de>, <pmeerw@...erw.net>,
        <denis.ciocca@...com>, <tglx@...utronix.de>,
        <alexios.zavras@...el.com>, <allison@...utok.net>,
        <linus.walleij@...aro.org>, <ladis@...ux-mips.org>,
        <linux-iio@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 -next] iio: st_accel: Fix unused variable warning

On Mon, 11 Nov 2019 11:21:15 +0800
YueHaibing <yuehaibing@...wei.com> 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 <ladis@...ux-mips.org>
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ