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, 5 Feb 2018 18:59:06 +0100
From:   Thierry Reding <thierry.reding@...il.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        linux-gpio@...r.kernel.org,
        linux-next <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: mediatek: Explicitly include pinctrl headers

On Mon, Feb 05, 2018 at 09:42:21AM -0800, Linus Torvalds wrote:
> On Mon, Feb 5, 2018 at 4:54 AM, Thierry Reding <thierry.reding@...il.com> wrote:
> >
> > Include these headers explicitly to avoid the build failure.
> 
> I don't think you need to include *both*.
> 
> <linux/device.h> used to include just <linux/pinctrl/devinfo.h>.
> 
> I'll edit your patches to include just that.
> <linux/pinctrl/consumer.h> will come in automatically through it.

I was trying to avoid any implicit inclusion, but looking at
pinctrl/devinfo.h it has a comment right above the pinctrl/consumer.h
include that makes it clear that pinctrl/devinfo.h is the consumer of
pinctrl for the core, so I guess the implicit include is fine here.

I do question, though, if drivers have any business including this
pinctrl/devinfo.h in the first place. For the Mediatek ethernet it seems
like selecting the default state is redundant (the core should already
have taken care of that, and the driver never selects a different state
anywhere).

The same is true of drm/rockchip, which also only seems to select a
state which the pinctrl core should've selected by default already. See
arch/arm/boot/dts/rk3288.dtsi which sets up the "lcdc" state as the only
state for the LVDS output.

Anyway, I think going with the pinctrl/devinfo.h include only is fine
for now. If it turns out that the Mediatek ethernet and Rockchip LVDS
drivers can just omit the bits fiddling with struct dev_pin_info, we can
swap out the pinctrl/devinfo.h include for pinctrl/consumer.h at that
time.

LinusW: what are your thoughts on the struct dev_pin_info usage by these
drivers? Does their code seem redundant to you, too?

Thierry

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ