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


Groups > linux.kernel > #1568003

Re: [PATCH] scsi: srp_transport: Fix 'always false comparison' in srp_tmo_valid()

From Augusto Mecking Caringi <augustocaringi@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] scsi: srp_transport: Fix 'always false comparison' in srp_tmo_valid()
Date 2017-01-27 11:10 +0100
Message-ID <t4bDI-2M6-17@gated-at.bofh.it> (permalink)
References <t3QfT-6DK-7@gated-at.bofh.it> <t4bDI-2M6-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jan 26, 2017 at 3:11 PM, Bart Van Assche
<Bart.VanAssche@sandisk.com> wrote:
> This patch is wrong. The purpose of the dev_loss_tmo >= LONG_MAX / HZ check
> is to avoid that the expression 1UL * dev_loss_tmo * HZ further down
> overflows. Can you check whether changing the if-statement into if (1UL *
> dev_loss_tmo >= LONG_MAX / HZ) also suppresses the compiler warning?

Hi Bart,

    Right, now a I see...

    Doing your proposed change the warning go away...

    Do you want me to send a new patch for that?

-- 
Augusto Mecking Caringi

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] scsi: srp_transport: Fix 'always false comparison' in srp_tmo_valid() Augusto Mecking Caringi <augustocaringi@gmail.com> - 2017-01-26 12:20 +0100
  Re: [PATCH] scsi: srp_transport: Fix 'always false comparison' in srp_tmo_valid() Augusto Mecking Caringi <augustocaringi@gmail.com> - 2017-01-27 11:10 +0100

csiph-web