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]
Message-ID: <20241101163349.6b827eaa@jic23-huawei>
Date: Fri, 1 Nov 2024 16:33:49 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Julien Stephan <jstephan@...libre.com>
Cc: Mudit Sharma <muditsharma.info@...il.com>, Lars-Peter Clausen
 <lars@...afoo.de>, Anshul Dalal <anshulusr@...il.com>, Javier Carrasco
 <javier.carrasco.cruz@...il.com>, Jean-Baptiste Maneyrol
 <jean-baptiste.maneyrol@....com>, Michael Hennerich
 <Michael.Hennerich@...log.com>, Cosmin Tanislav
 <cosmin.tanislav@...log.com>, Ramona Gradinariu
 <ramona.gradinariu@...log.com>, Antoniu Miclaus
 <antoniu.miclaus@...log.com>, Dan Robertson <dan@...obertson.com>, Marcelo
 Schmitt <marcelo.schmitt@...log.com>, Matteo Martelli
 <matteomartelli3@...il.com>, Anand Ashok Dumbre
 <anand.ashok.dumbre@...inx.com>, Michal Simek <michal.simek@....com>,
 Mariel Tinaco <Mariel.Tinaco@...log.com>, Jagath Jog J
 <jagathjog1996@...il.com>, Lorenzo Bianconi <lorenzo@...nel.org>, Subhajit
 Ghosh <subhajit.ghosh@...aklogic.com>, Kevin Tsai <ktsai@...ellamicro.com>,
 Linus Walleij <linus.walleij@...aro.org>, Benson Leung
 <bleung@...omium.org>, Guenter Roeck <groeck@...omium.org>,
 linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, chrome-platform@...ts.linux.dev
Subject: Re: [PATCH v2 08/15] iio: accel: mma9551: use bool for event state

On Thu, 31 Oct 2024 16:27:03 +0100
Julien Stephan <jstephan@...libre.com> wrote:

> Since the write_event_config callback now uses a bool for the state
> parameter, update the signature of the function it calls accordingly,
> and use a bool array for event_enabled.
> 
> Signed-off-by: Julien Stephan <jstephan@...libre.com>
Applied.
> ---
>  drivers/iio/accel/mma9551.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/accel/mma9551.c b/drivers/iio/accel/mma9551.c
> index 605022f5239a6412827f4ba059aa18d490908720..6d73eec951263956f314f82542becbbae933de91 100644
> --- a/drivers/iio/accel/mma9551.c
> +++ b/drivers/iio/accel/mma9551.c
> @@ -45,7 +45,7 @@ enum mma9551_tilt_axis {
>  struct mma9551_data {
>  	struct i2c_client *client;
>  	struct mutex mutex;
> -	int event_enabled[3];
> +	bool event_enabled[3];
>  	int irqs[MMA9551_GPIO_COUNT];
>  };
>  
> @@ -162,7 +162,7 @@ static int mma9551_read_event_config(struct iio_dev *indio_dev,
>  
>  static int mma9551_config_incli_event(struct iio_dev *indio_dev,
>  				      enum iio_modifier axis,
> -				      int state)
> +				      bool state)
>  {
>  	struct mma9551_data *data = iio_priv(indio_dev);
>  	enum mma9551_tilt_axis mma_axis;
> @@ -174,7 +174,7 @@ static int mma9551_config_incli_event(struct iio_dev *indio_dev,
>  	if (data->event_enabled[mma_axis] == state)
>  		return 0;
>  
> -	if (state == 0) {
> +	if (!state) {
>  		ret = mma9551_gpio_config(data->client,
>  					  (enum mma9551_gpio_pin)mma_axis,
>  					  MMA9551_APPID_NONE, 0, 0);
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ