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: <201008231618.50131.trenn@suse.de>
Date:	Mon, 23 Aug 2010 16:18:49 +0200
From:	Thomas Renninger <trenn@...e.de>
To:	"Lee, Chun-Yi" <joeyli.kernel@...il.com>
Cc:	mjg@...hat.com, linux-kernel@...r.kernel.org, gregkh@...e.de,
	jlee@...ell.com, Dennis.Jansen@....de, linux-acpi@...r.kernel.org
Subject: Re: [PATCH] Add intel drm blacklist to intel_opregion_present detect

On Monday 23 August 2010 13:40:48 Lee, Chun-Yi wrote:
> There have some machines not support by i915 drm driver, e.g. MSI U110/U150,
> there are use poulsbo chip and drm driver not support it because legal issue.
> Those machines's acpi backlight control actually work fine and don't need apply
> the intel opregion support.
> So, add intel drm blacklist to intel_opregion_present, it can enable the acpi
> brightness interface on Poulsbo/Morrestown.
> 
> Signed-off-by: Lee, Chun-Yi <jlee@...ell.com>
...
> @@ -2567,7 +2584,14 @@ static int __init intel_opregion_present(void)
>  		pci_read_config_dword(dev, 0xfc, &address);
>  		if (!address)
>  			continue;
> -		return 1;
> +		for (i = 0; intel_drm_blacklist[i].device != 0; i++) {
> +			if (dev->device == intel_drm_blacklist[i].device) {
> +				in_blacklist = 1;
> +				break;
You can just return 0 here...
> +			}
> +		}
> +		if (!in_blacklist)
> +			return 1;
and get rid of in_blacklist variable.
Makes the code a bit easier to read.

      Thomas
--
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