lkml.org 
[lkml]   [2022]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] platform/chrome: cros_ec_typec: Check for EC device
On Tue, Jan 25, 2022 at 8:05 PM Prashant Malani <pmalani@chromium.org> wrote:
>
> Hi Tzung-Bi,
>
> Thanks for your review.
>
> On Tue, Jan 25, 2022 at 7:46 PM Tzung-Bi Shih <tzungbi@google.com> wrote:
> >
> > On Wed, Jan 26, 2022 at 01:22:03AM +0000, Prashant Malani wrote:
> > > Fixes: fdc6b21e2444 ("platform/chrome: Add Type C connector class driver")
> > > Reported-by: Alyssa Ross <hi@alyssa.is>
> > > Signed-off-by: Prashant Malani <pmalani@chromium.org>
> >
> > With a minor comment,
> > Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>
> >
> > > @@ -1076,6 +1076,12 @@ static int cros_typec_probe(struct platform_device *pdev)
> > >
> > > typec->dev = dev;
> > > typec->ec = dev_get_drvdata(pdev->dev.parent);
> > > +
> >
> > I would prefer to remove the blank line to make it look like an integrated block.
>
> I actually prefer it as it is. typec->dev is not really part of this
> "integrated block", and I don't want to add another space there.

But on the other side the check is part of the "integrated block".
Maybe add an empty line between the two assignments if you want a
separation.

> In any case, since this is a very minor style nit, I will address it
> in case there is another version required due to other comments.
>
> >
> > > + if (!typec->ec) {
> > > + dev_err(dev, "couldn't find parent EC device\n");
> > > + return -ENODEV;
> > > + }
> > > +
>
> Best,
>
> -Prashant

\
 
 \ /
  Last update: 2022-01-26 16:34    [W:0.049 / U:0.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site