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] [day] [month] [year] [list]
Date:	Thu, 13 Nov 2008 20:51:52 +0000
From:	Matthew Garrett <mjg59@...f.ucam.org>
To:	Matthew Wilcox <matthew@....cx>
Cc:	linux-pci@...r.kernel.org, linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] acpiphp: Identify more removable slots

On Thu, Nov 13, 2008 at 01:48:59PM -0700, Matthew Wilcox wrote:

> Why not:
> 
>  	status = acpi_get_handle(handle, "_EJ0", &tmp);
> 	if (ACPI_SUCCESS(status))
> 		return 1;
> 
> 	status = acpi_get_handle(handle, "_RMV", &tmp);
> 	if (ACPI_SUCCESS(status))
> 		return 1;
> 
> 	return 0;

Oh, yes, that'd work.

> > +	if (ACPI_SUCCESS(status) || is_dock_device(handle))
> > +		valid = 1;
> > +
> > +	if (!valid)
> >  		return AE_OK;
> 
> This looks like almost the same code as above.  New helper function?

It's not quite the same, but yes, I'll see if it can be reduced.

-- 
Matthew Garrett | mjg59@...f.ucam.org
--
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