[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YEM7AbyAPey5vn0P@kroah.com>
Date: Sat, 6 Mar 2021 09:19:13 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Peter Chen <peter.chen@...nel.org>
Cc: Pawel Laszczak <pawell@...ence.com>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, kurahul@...ence.com,
sparmar@...ence.com
Subject: Re: [PATCH] usb: cdnsp: Fixes incorrect value in ISOC TRB
On Sat, Mar 06, 2021 at 08:53:42AM +0800, Peter Chen wrote:
> On 21-03-05 06:10:59, Pawel Laszczak wrote:
> > From: Pawel Laszczak <pawell@...ence.com>
> >
> > The value "start_cycle ? 0 : 1" in assignment caused
> > implicit truncation whole value to 1 byte.
> > To fix the issue, an explicit casting has been added.
>
> The root cause for this issue should be operator "|" priority higher
> than "? :", I think just add () for start_cycle ? 0 : 1 could fix it.
> Please double confirm it, and change the commit log if necessary
Please do not rely on this type of thing to get the code right. Spell
it out with real if () statements so that humans can read it and
understand it and maintain it for the next 10+ years.
thanks,
greg k-h
Powered by blists - more mailing lists