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: <5e22dba6543b4fc09c5c18c839eab42bd31b18f6.camel@perches.com>
Date:   Sat, 26 Sep 2020 21:16:32 -0700
From:   Joe Perches <joe@...ches.com>
To:     Ethan Zhao <haifeng.zhao@...el.com>, bhelgaas@...gle.com,
        oohall@...il.com, ruscur@...sell.cc, lukas@...ner.de,
        andriy.shevchenko@...ux.intel.com, stuart.w.hayes@...il.com,
        mr.nuke.me@...il.com, mika.westerberg@...ux.intel.com
Cc:     linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
        pei.p.jia@...el.com, ashok.raj@...ux.intel.com,
        sathyanarayanan.kuppuswamy@...el.com
Subject: Re: [PATCH 4/5 V2] PCI: only return true when dev io state is
 really changed

On Sat, 2020-09-26 at 23:28 -0400, Ethan Zhao wrote:
> simplify the pci_dev_set_io_state() function to only return true
> when dev->error_state is changed.
[]
> diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
[]
> @@ -362,35 +362,11 @@ static inline bool pci_dev_set_io_state(struct pci_dev *dev,
>  	bool changed = false;
[]
> +	if (dev->error_state == new)
> +		return changed;
> +
> +	dev->error_state = new;
> +	changed = true;
>  	return changed;
>  }

This would be simpler removing the unnecessary
changed automatic

...

	if (dev->error_state == new)
		return false;

	dev->error_state = new;

	return true;
}


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ