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: <20130709093726.GK4898@intel.com>
Date:	Tue, 9 Jul 2013 12:37:26 +0300
From:	Mika Westerberg <mika.westerberg@...ux.intel.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Linux PCI <linux-pci@...r.kernel.org>,
	Yinghai Lu <yinghai@...nel.org>, Jiang Liu <liuj97@...il.com>
Subject: Re: [RFC][PATCH 6/8] ACPI / hotplug / PCI: Drop
 acpiphp_handle_to_bridge()

On Tue, Jul 09, 2013 at 02:20:31AM +0200, Rafael J. Wysocki wrote:
> @@ -953,37 +937,49 @@ static void acpiphp_sanitize_bus(struct
>   * ACPI event handlers
>   */
>  
> -static acpi_status
> -check_sub_bridges(acpi_handle handle, u32 lvl, void *context, void **rv)
> +static acpi_status check_sub_bridges(acpi_handle handle, u32 lvl, void *data,
> +				     void **rv)
>  {
> -	struct acpiphp_bridge *bridge;
> -	char objname[64];
> -	struct acpi_buffer buffer = { .length = sizeof(objname),
> -				      .pointer = objname };
> +	struct acpiphp_context *context = acpiphp_get_context(handle);
> +
> +	if (!context)
> +		return AE_OK;
>  
> -	bridge = acpiphp_handle_to_bridge(handle);
> -	if (bridge) {
> +	if (context->bridge) {
> +		struct acpiphp_bridge *bridge = context->bridge;
> +		char objname[64];
> +		struct acpi_buffer buffer = { .length = sizeof(objname),
> +					      .pointer = objname };
> +
> +		get_bridge(bridge);
>  		acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
> -		dbg("%s: re-enumerating slots under %s\n",
> -			__func__, objname);
> +		dbg("%s: re-enumerating slots under %s\n", __func__, objname);

Although not related to this patch directly, how about using
acpi_handle_debug() or similar here?

>  		acpiphp_check_bridge(bridge);
>  		put_bridge(bridge);
>  	}
> +	acpiphp_put_context(context);
>  	return AE_OK ;
>  }
--
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