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]
Message-ID: <Pine.LNX.4.44L0.1608231130330.2093-100000@iolanthe.rowland.org>
Date:   Tue, 23 Aug 2016 11:37:20 -0400 (EDT)
From:   Alan Stern <stern@...land.harvard.edu>
To:     Peter Chen <hzpeterchen@...il.com>
cc:     Peter Chen <peter.chen@....com>, <gregkh@...uxfoundation.org>,
        <ulf.hansson@...aro.org>, <broonie@...nel.org>, <sre@...nel.org>,
        <robh+dt@...nel.org>, <shawnguo@...nel.org>,
        <dbaryshkov@...il.com>, <dwmw3@...radead.org>,
        <k.kozlowski@...sung.com>, <linux-arm-kernel@...ts.infradead.org>,
        <p.zabel@...gutronix.de>, <devicetree@...r.kernel.org>,
        <pawel.moll@....com>, <mark.rutland@....com>,
        USB list <linux-usb@...r.kernel.org>, <arnd@...db.de>,
        <s.hauer@...gutronix.de>, <mail@...iej.szmigiero.name>,
        <troy.kisky@...ndarydevices.com>, <festevam@...il.com>,
        <oscar@...andei.net>, <stephen.boyd@...aro.org>,
        Linux-pm mailing list <linux-pm@...r.kernel.org>,
        <stillcompiling@...il.com>,
        Kernel development list <linux-kernel@...r.kernel.org>,
        <mka@...omium.org>
Subject: Re: [PATCH v6 4/8] usb: core: add power sequence handling for USB
 devices

On Tue, 23 Aug 2016, Peter Chen wrote:

> I will add #ifdef CONFIG_OF for related code. And put the content at
> hub_pwrseq_on at hub_probe directly, how about below?
> 
> hub_probe() {
> 
> 	...
> 
> 	if (hub_configure(hub, endpoint) >= 0) {
> #ifdef CONFIG_OF
> 		for_each_child_of_node(parent->of_node, np) {
> 			ret = generic_pwrseq_on(np, hub);
> 			if (ret)
> 				return ret;
> 		}
> #else
> 		return 0;
> #endif
> 	}

Please make this a separate subroutine like you had before, but now in 
hub.c:

#ifdef CONFIG_OF
static int hub_of_pwrseq_on(struct usb_hub *hub)
{
...
}

#else
static inline int hub_of_pwrseq_on(struct usb_hub *hub)
{
	return 0;
}
#endif /* CONFIG_OF */


Alan Stern

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ