lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 14 Jan 2019 20:14:32 -0500
From:   Brian Masney <masneyb@...tation.org>
To:     Bjorn Andersson <bjorn.andersson@...aro.org>
Cc:     linus.walleij@...aro.org, sboyd@...nel.org, andy.gross@...aro.org,
        marc.zyngier@....com, shawnguo@...nel.org, dianders@...omium.org,
        linux-gpio@...r.kernel.org, nicolas.dechesne@...aro.org,
        niklas.cassel@...aro.org, david.brown@...aro.org,
        robh+dt@...nel.org, mark.rutland@....com, thierry.reding@...il.com,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org
Subject: Re: [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@...aro.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ