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, 7 May 2022 17:09:29 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Jagath Jog J <jagathjog1996@...il.com>
Cc:     dan@...obertson.com, andy.shevchenko@...il.com,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 05/10] iio: accel: bma400: Add separate channel for
 step counter

On Thu,  5 May 2022 19:00:16 +0530
Jagath Jog J <jagathjog1996@...il.com> wrote:

> Added channel for step counter which can be enable or disable
> through the sysfs interface.
> 
> Signed-off-by: Jagath Jog J <jagathjog1996@...il.com>
> ---
>  
> +static int bma400_enable_steps(struct bma400_data *data, int val)
> +{
> +	int ret;
> +
> +	if (data->steps_enabled == val)
> +		return 0;
> +
> +	ret = regmap_update_bits(data->regmap, BMA400_INT_CONFIG1_REG,
> +				 BMA400_STEP_INT_MSK,
> +				 FIELD_PREP(BMA400_STEP_INT_MSK, !!val));
This gives a dubious x & !y warning

So I've changed it to val ? 1 : 0

Jonathan

> +	if (ret)
> +		return ret;
> +	data->steps_enabled = val;
> +	return ret;
> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ