lkml.org 
[lkml]   [2019]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH V2 3/3] soc: fsl: add RCPM driver
Date
Hi Pavel,

On Monday, May 20, 2019 05:39, Pavel Machek wrote:
>
> Hi!
>
>
> > +
> > +struct rcpm {
> > + unsigned int wakeup_cells;
> > + void __iomem *ippdexpcr_base;
> > + bool little_endian;
> > +};
>
> Inconsistent whitespace

OK, will make them aligned.

>
> > +static int rcpm_pm_prepare(struct device *dev) {
> > + struct device_node *np = dev->of_node;
> > + struct wakeup_source *ws;
> > + struct rcpm *rcpm;
> > + u32 value[RCPM_WAKEUP_CELL_MAX_SIZE + 1], tmp;
> > + int i, ret;
> > +
> > + rcpm = dev_get_drvdata(dev);
> > + if (!rcpm)
> > + return -EINVAL;
> > +
> > + /* Begin with first registered wakeup source */
> > + ws = wakeup_source_get_next(NULL);
> > + while (ws) {
>
> while (ws = wakeup_source_get_next(NULL)) ?

Actually, we only pass NULL to wakeup_source_get_next() at very first
call to get 1st wakeup source. Then in the while loop, we will fetch
next source but not 1st, that's different. I am afraid your suggestion
is not quite correct.

>
> > +static int rcpm_probe(struct platform_device *pdev) {
> > + struct device *dev = &pdev->dev;
> > + struct resource *r;
> > + struct rcpm *rcpm;
> > + int ret;
>
> Whitespace.

OK, will update, thanks for your review.

Regards,
Ran

\
 
 \ /
  Last update: 2019-05-20 08:48    [W:0.070 / U:23.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site