Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1637031

Re: [PATCH] char: random: casting prevents missing calculations

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH] char: random: casting prevents missing calculations
Date 2017-05-07 23:50 +0200
Message-ID <tECe0-30b-63@gated-at.bofh.it> (permalink)
References <tECdY-30b-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, May 7, 2017 at 2:47 PM, Karim Eshapa <karim.eshapa@gmail.com> wrote:
> Cast (long)jiffies and (long)state->last_time beacause
> they tends to unsigned long. may cause a problem specially
> when comparison happens (< 0).
>
> Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com>

I don't understand what you are saying above, and the patch does not
appear to have any effect since the destination variable is already of
type 'long'.

What problem did you observe?

       Arnd

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] char: random: casting prevents missing calculations Arnd Bergmann <arnd@arndb.de> - 2017-05-07 23:50 +0200

csiph-web