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: <20121120125722.GT17774@intel.com>
Date:	Tue, 20 Nov 2012 14:57:22 +0200
From:	Mika Westerberg <mika.westerberg@...ux.intel.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Jean Delvare <khali@...ux-fr.org>, ben-linux@...ff.org,
	w.sang@...gutronix.de, linux-kernel@...r.kernel.org,
	lenb@...nel.org, rafael.j.wysocki@...el.com,
	broonie@...nsource.wolfsonmicro.com, grant.likely@...retlab.ca,
	linus.walleij@...aro.org, mathias.nyman@...ux.intel.com,
	linux-acpi@...r.kernel.org
Subject: Re: [Update 2][PATCH 2/3] ACPI / driver core: Introduce struct
 acpi_dev_node and related macros

On Tue, Nov 20, 2012 at 10:34:04AM +0100, Rafael J. Wysocki wrote:
> On Tuesday, November 20, 2012 11:10:07 AM Mika Westerberg wrote:
> > On Tue, Nov 20, 2012 at 01:59:23AM +0100, Rafael J. Wysocki wrote:
> > > Index: linux/include/linux/device.h
> > > ===================================================================
> > > --- linux.orig/include/linux/device.h
> > > +++ linux/include/linux/device.h
> > > @@ -578,6 +578,12 @@ struct device_dma_parameters {
> > >  	unsigned long segment_boundary_mask;
> > >  };
> > >  
> > > +struct acpi_dev_node {
> > > +#ifdef CONFIG_ACPI
> > > +	void	*handle;
> > > +#endif
> > > +};
> > > +
> > >  /**
> > >   * struct device - The basic device structure
> > >   * @parent:	The device's "parent" device, the device to which it is attached.
> > > @@ -683,7 +689,7 @@ struct device {
> > >  	struct dev_archdata	archdata;
> > >  
> > >  	struct device_node	*of_node; /* associated device tree node */
> > > -	void			*acpi_handle; /* associated ACPI device node */
> > > +	struct acpi_dev_node	acpi_node; /* associated ACPI device node */
> > 
> > Please update the kerneldoc comment as well.
> 
> Right, thanks for the reminder. :-)
> 
> Updated patch is appended.
> 
> Thanks,
> Rafael
> 
> 
> ---
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> Subject: ACPI / driver core: Introduce struct acpi_dev_node and related macros
> 
> To avoid adding an ACPI handle pointer to struct device on
> architectures that don't use ACPI, or generally when CONFIG_ACPI is
> not set, in which cases that pointer is useless, define struct
> acpi_dev_node that will contain the handle pointer if CONFIG_ACPI is
> set and will be empty otherwise and use it to represent the ACPI
> device node field in struct device.
> 
> In addition to that define macros for reading and setting the ACPI
> handle of a device that don't generate code when CONFIG_ACPI is
> unset.  Modify the ACPI subsystem to use those macros instead of
> referring to the given device's ACPI handle directly.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

Reviewed-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
--
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