lkml.org 
[lkml]   [2019]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] Fix warning and undefined behavior in mmc voltage handling
On Tue, 16 Apr 2019 at 10:00, Pavel Machek <pavel@ucw.cz> wrote:
>
> 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.

Thanks!

>
> > > 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?

Sure.

>
> > > - 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;

Just send a patch on top, then I will apply it.

Kind regards
Uffe

\
 
 \ /
  Last update: 2019-04-16 11:29    [W:0.030 / U:11.052 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site