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:   Mon, 29 Aug 2022 17:54:06 +0200
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Linux ACPI <linux-acpi@...r.kernel.org>,
        Hanjun Guo <guohanjun@...wei.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Linux PM <linux-pm@...r.kernel.org>,
        "K. Y. Srinivasan" <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Wei Liu <wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>,
        Mark Brown <broonie@...nel.org>,
        Andreas Noever <andreas.noever@...il.com>,
        Michael Jamet <michael.jamet@...el.com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Yehezkel Bernat <YehezkelShB@...il.com>,
        linux-hyperv@...r.kernel.org, linux-spi@...r.kernel.org,
        linux-usb@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-arm-msm@...r.kernel.org, Will Deacon <will@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Konrad Dybcio <konrad.dybcio@...ainline.org>
Subject: Re: [PATCH v2 5/5] ACPI: Drop parent field from struct acpi_device

On Saturday, August 27, 2022 3:19:33 PM CEST Hanjun Guo wrote:
> Hi Rafael,
> 
> On 2022/8/25 0:59, Rafael J. Wysocki wrote:
> > Index: linux-pm/include/acpi/acpi_bus.h
> > ===================================================================
> > --- linux-pm.orig/include/acpi/acpi_bus.h
> > +++ linux-pm/include/acpi/acpi_bus.h
> > @@ -365,7 +365,6 @@ struct acpi_device {
> >   	int device_type;
> >   	acpi_handle handle;		/* no handle for fixed hardware */
> >   	struct fwnode_handle fwnode;
> > -	struct acpi_device *parent;
> >   	struct list_head wakeup_list;
> >   	struct list_head del_list;
> >   	struct acpi_device_status status;
> > @@ -458,6 +457,14 @@ static inline void *acpi_driver_data(str
> >   #define to_acpi_device(d)	container_of(d, struct acpi_device, dev)
> >   #define to_acpi_driver(d)	container_of(d, struct acpi_driver, drv)
> >   
> > +static inline struct acpi_device *acpi_dev_parent(struct acpi_device *adev)
> > +{
> > +	if (adev->dev.parent)
> > +		return to_acpi_device(adev->dev.parent);
> > +
> > +	return NULL;
> > +}
> > +
> >   static inline void acpi_set_device_status(struct acpi_device *adev, u32 sta)
> >   {
> >   	*((u32 *)&adev->status) = sta;
> > @@ -478,6 +485,7 @@ void acpi_initialize_hp_context(struct a
> >   /* acpi_device.dev.bus == &acpi_bus_type */
> >   extern struct bus_type acpi_bus_type;
> >   
> > +struct acpi_device *acpi_dev_parent(struct acpi_device *adev);
> 
> We have a static inline function above, is it duplicated here?
> Or did I miss some use cases?

No, you didn't, it is redundant.

I've just sent a fix for this.

Thanks!



Powered by blists - more mailing lists