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:	Sun, 27 Apr 2008 00:10:20 +0200
From:	Rene Herman <rene.herman@...access.nl>
To:	Bjorn Helgaas <bjorn.helgaas@...com>
CC:	Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org, Adam Belay <ambx1@....rr.com>,
	Adam M Belay <abelay@....edu>,
	Li Shaohua <shaohua.li@...el.com>,
	Matthieu Castet <castet.matthieu@...e.fr>,
	Thomas Renninger <trenn@...e.de>,
	Jaroslav Kysela <perex@...ex.cz>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [patch 38/54] PNP: remove PNP_MAX_* uses

On 25-04-08 20:38, Bjorn Helgaas wrote:

> +#define set(flags)      ((flags & IORESOURCE_UNSET) == 0)
> +
>  static ssize_t pnp_show_current_resources(struct device *dmdev,
>  					  struct device_attribute *attr,
>  					  char *buf)
>  {
>  	struct pnp_dev *dev = to_pnp_dev(dmdev);
> +	struct resource *res;
>  	int i, ret;
>  	pnp_info_buffer_t *buffer;
>  
> @@ -267,50 +270,46 @@
>  	else
>  		pnp_printf(buffer, "disabled\n");
>  
> -	for (i = 0; i < PNP_MAX_PORT; i++) {
> -		if (pnp_port_valid(dev, i)) {
> +	for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_IO, i)); i++) {
> +		if (set(res->flags)) {


You've at this point already introduced the pnp_resource_valid() inline. Use 
here maybe? (also other locations here)

Rene.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ