All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Peter Chen <peter.chen@kernel.org>
Cc: Pawel Laszczak <pawell@cadence.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	kurahul@cadence.com, sparmar@cadence.com
Subject: Re: [PATCH] usb: cdnsp: Fixes incorrect value in ISOC TRB
Date: Sat, 6 Mar 2021 09:19:13 +0100	[thread overview]
Message-ID: <YEM7AbyAPey5vn0P@kroah.com> (raw)
In-Reply-To: <20210306005342.GA1119@b29397-desktop>

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@cadence.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

  reply	other threads:[~2021-03-06  8:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05  5:10 [PATCH] usb: cdnsp: Fixes incorrect value in ISOC TRB Pawel Laszczak
2021-03-06  0:53 ` Peter Chen
2021-03-06  8:19   ` Greg KH [this message]
2021-03-08  7:37   ` Pawel Laszczak
  -- strict thread matches above, loose matches on Subject: below --
2021-03-05  5:00 Pawel Laszczak
2021-03-05  5:16 ` Pawel Laszczak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YEM7AbyAPey5vn0P@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=kurahul@cadence.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pawell@cadence.com \
    --cc=peter.chen@kernel.org \
    --cc=sparmar@cadence.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.