Re: [PATCH v4 03/14] pinctrl: qcom: spmi-gpio: hardcode IRQ counts
From: Brian Masney <hidden>
Date: 2019-01-15 01:14:37
Also in:
linux-arm-msm, linux-gpio, lkml
From: Brian Masney <hidden>
Date: 2019-01-15 01:14:37
Also in:
linux-arm-msm, linux-gpio, lkml
On Mon, Jan 14, 2019 at 04:34:28PM -0800, Bjorn Andersson wrote:
quoted
- 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 <redacted>
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