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:   Wed, 15 Jan 2020 16:55:03 -0800
From:   Guru Das Srinagesh <gurus@...eaurora.org>
To:     Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Cc:     linux-pwm@...r.kernel.org,
        Thierry Reding <thierry.reding@...il.com>,
        Subbaraman Narayanamurthy <subbaram@...eaurora.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 1/1] pwm: Convert period and duty cycle to u64

Hi Uwe,

On Tue, Jan 14, 2020 at 08:47:10AM +0100, Uwe Kleine-König wrote:
> I didn't thought about that much, but it would be great if we could
> prepare the affected drivers to work with both, int and u64 and switch
> in a separate commit. Reverting would then become cheaper.
> The conversion to 64-bit division macros could be done even without
> actually converting period and duty cycle, couldn't it?

I do agree that with such a two-step process the reverting (should the
need arise) would be much cheaper. I tried out your suggestion and saw
that this is not possible as the patch stands currently due to
compilation warning and errors that arise for various architectures:

warning: comparison of distinct pointer types lacks a cast
warning: right shift count >= width of type [-Wshift-count-overflow]
error: passing argument 1 of '__div64_32' from incompatible pointer type [-Werror=incompatible-pointer-types]
note: expected 'uint64_t *' {aka 'long long unsigned int *'} but argument is of type 'unsigned int *'
warning: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type 'unsigned int' [-Wformat=]

Could you please indicate how we should proceed further?

> This Reported-by: looks wrong. It gave some hints about what had to be
> improved in an earlier revision of this patch, but usually this means
> that the patch is a fix for an earlier commit. So I would put this in
> the text, something like:
> 
> 	The kbuild test robot helped to improve this patch series to
> 	(hopefully) catch all code sites having to be adapted.

Noted, will make this change.

> In ir-rx51.c you used DIV_ROUND_CLOSEST_ULL to replace
> DIV_ROUND_CLOSEST, here it is DIV64_U64_ROUND_CLOSEST. Maybe it is worth
> to describe the relevant difference shortly in the commit log.

Sure, will make a note of this in the commit log. In short, one is used
when only the numerator is 64-bit while the other is meant for the case
when both numerator and denominator are 64-bit.

Thank you.

Guru Das.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ