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: <20230924181733.081917bd@jic23-huawei>
Date:   Sun, 24 Sep 2023 18:17:33 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     David Lechner <dlechner@...libre.com>
Cc:     linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Michael Hennerich <Michael.Hennerich@...log.com>,
        Nuno Sá <nuno.sa@...log.com>,
        Axel Haslam <ahaslam@...libre.com>,
        Philip Molloy <pmolloy@...libre.com>
Subject: Re: [PATCH v2 03/19] staging: iio: resolver: ad2s1210: fix
 ad2s1210_show_fault

On Thu, 21 Sep 2023 09:43:44 -0500
David Lechner <dlechner@...libre.com> wrote:

> When reading the fault attribute, an empty string was printed if the
> fault register value was non-zero.
> 
> This is fixed by checking that the return value is less than zero
> instead of not zero.
> 
> Also always print two hex digits while we are touching this line.
> 
> Signed-off-by: David Lechner <dlechner@...libre.com>
To trim this set down as quickly as possible I'll pick up anything
I can as I read through them.

Applied this one to the togreg branch of iio.git and pushed out as
testing for 0-day etc to poke it.

I doubt it's worth backporting but I don't think we mind if the bots
find it and people want to carry it in stable.

Thanks,

Jonathan

> ---
>  drivers/staging/iio/resolver/ad2s1210.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c
> index 06de5823eb8e..84743e31261a 100644
> --- a/drivers/staging/iio/resolver/ad2s1210.c
> +++ b/drivers/staging/iio/resolver/ad2s1210.c
> @@ -393,7 +393,7 @@ static ssize_t ad2s1210_show_fault(struct device *dev,
>  	ret = ad2s1210_config_read(st, AD2S1210_REG_FAULT);
>  	mutex_unlock(&st->lock);
>  
> -	return ret ? ret : sprintf(buf, "0x%x\n", ret);
> +	return (ret < 0) ? ret : sprintf(buf, "0x%02x\n", ret);
>  }
>  
>  static ssize_t ad2s1210_clear_fault(struct device *dev,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ