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:   Fri, 12 Apr 2019 16:02:11 +0530
From:   Sekhar Nori <nsekhar@...com>
To:     Bartosz Golaszewski <brgl@...ev.pl>,
        Kevin Hilman <khilman@...nel.org>,
        Alan Stern <stern@...land.harvard.edu>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC:     <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: Re: [PATCH v4 6/6] usb: ohci-da8xx: drop the vbus GPIO

Hi Bartosz,

On 11/04/19 3:00 PM, Bartosz Golaszewski wrote:
> @@ -209,9 +197,7 @@ static irqreturn_t ohci_da8xx_oc_thread(int irq, void *data)
>  	int ret;
>  
>  	if (gpiod_get_value_cansleep(da8xx_ohci->oc_gpio)) {
> -		if (da8xx_ohci->vbus_gpio) {
> -			gpiod_set_value_cansleep(da8xx_ohci->vbus_gpio, 0);
> -		} else if (da8xx_ohci->vbus_reg) {
> +		if (da8xx_ohci->vbus_reg) {
>  			ret = regulator_disable(da8xx_ohci->vbus_reg);
>  			if (ret)
>  				dev_err(dev,

You can now reduce a level of indentation here by doing

	if (gpiod_get_value_cansleep(da8xx_ohci->oc_gpio) &&
	    da8xx_ohci->vbus_reg) {
		ret = regulator_disable(da8xx_ohci->vbus_reg);
		if (ret)
			dev_err(dev, "Failed to disable regulator: %d\n",
				ret);
	}

Thanks
Sekhar

Powered by blists - more mailing lists