lkml.org 
[lkml]   [2019]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 03/14] pinctrl: qcom: spmi-gpio: hardcode IRQ counts
On Mon, Jan 14, 2019 at 04:34:28PM -0800, Bjorn Andersson wrote:
> > - npins = platform_irq_count(pdev);
> > - if (!npins)
> > - return -EINVAL;
> > - if (npins < 0)
> > - return npins;
> > -
> > - BUG_ON(npins > ARRAY_SIZE(pmic_gpio_groups));
> > + npins = (u16)(uintptr_t) device_get_match_data(&pdev->dev);
>
> Why u16, afaict npins is an int? I'm pretty sure you can leave the last
> cast as implicit and as it's not actually a pointer that we're acquiring
> casting it to "unsigned long" is the idiomatic way.
>
> Apart from this the change looks good.
>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

I can change it to this:

npins = (uintptr_t) device_get_match_data(&pdev->dev);

I'll send out V5 on Wednesday evening (GMT-5) to give time for any other
reviews that may trickle in.

Thanks Bjorn, Stephen, and Linus for the reviews. This was a fun task; I
learned a lot working on it.

I'll also convert SSBI based on this series.

Brian

\
 
 \ /
  Last update: 2019-01-15 02:14    [W:0.100 / U:1.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site