public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: kernel list <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>,
	Trivial patch monkey <trivial@kernel.org>
Subject: Re: [PATCH] Fix warning and undefined behavior in mmc voltage handling
Date: Tue, 16 Apr 2019 10:00:24 +0200	[thread overview]
Message-ID: <20190416080024.GD14538@amd> (raw)
In-Reply-To: <CAPDyKFo2cZOqyCqBaZJzReaWfMenn6zgHcpCpf+XfegwqwNKxQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]

On Tue 2019-04-16 09:48:51, Ulf Hansson wrote:
> On Fri, 12 Apr 2019 at 11:34, Pavel Machek <pavel@ucw.cz> wrote:
> >
> > !voltage_ranges is tested for too late, allowing warning and undefined
> > behavior. Fix that.
> >
> > Signed-off-by: Pavel Machek <pavel@ucw.cz>
> 
> Pavel, thanks for your patch.
> 
> Would you mind re-posting to linux-mmc so I can get it into the
> patchtracker. Please also change the prefix of the header to "mmc:
> core:".

Done.

> > Plus I guess author should add parenthesis in the expression. a / b /
> > c is _not_ common idiom.

Can you do something about the a / b / c situation?

> > -       num_ranges = num_ranges / sizeof(*voltage_ranges) / 2;
> > +       num_ranges = num_ranges / sizeof(*voltage_ranges) / 2;

I guess it is:
       num_ranges = (num_ranges / sizeof(*voltage_ranges)) / 2;

...but...

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2019-04-16  8:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12  9:34 [PATCH] Fix warning and undefined behavior in mmc voltage handling Pavel Machek
2019-04-16  7:48 ` Ulf Hansson
2019-04-16  8:00   ` Pavel Machek [this message]
2019-04-16  9:28     ` Ulf Hansson

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=20190416080024.GD14538@amd \
    --to=pavel@ucw.cz \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@kernel.org \
    --cc=ulf.hansson@linaro.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox