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: <CAK8P3a0ueOXLFPd_C4nbqHwEmVOa5eFfSivbsMPKNCmjMiWF1Q@mail.gmail.com>
Date:   Fri, 20 Mar 2020 18:11:42 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Guru Das Srinagesh <gurus@...eaurora.org>
Cc:     Linux PWM List <linux-pwm@...r.kernel.org>,
        Thierry Reding <thierry.reding@...il.com>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        Subbaraman Narayanamurthy <subbaram@...eaurora.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Alexander Shiyan <shc_work@...l.ru>
Subject: Re: [PATCH v11 04/12] pwm: clps711x: Cast period to u32 before use as divisor

On Fri, Mar 20, 2020 at 2:41 AM Guru Das Srinagesh <gurus@...eaurora.org> wrote:
>
> Since the PWM framework is switching struct pwm_args.period's datatype
> to u64, prepare for this transition by typecasting it to u32.
>
> Also, since the dividend is still a 32-bit number, any divisor greater
> than UINT_MAX will cause the quotient to be zero, so return 0 in that
> case to efficiently skip the division.
>
> Cc: Alexander Shiyan <shc_work@...l.ru>
> Cc: Arnd Bergmann <arnd@...db.de>
>
> Signed-off-by: Guru Das Srinagesh <gurus@...eaurora.org>

Reviewed-by: Arnd Bergmann <arnd@...db.de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ