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:	Thu, 06 Aug 2015 01:45:46 +0200
From:	"Rafael J. Wysocki" <rjw@...ysocki.net>
To:	David Daney <ddaney.cavm@...il.com>
Cc:	David Daney <ddaney@...iumnetworks.com>,
	Tomasz Nowicki <tomasz.nowicki@...aro.org>,
	linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
	Len Brown <lenb@...nel.org>,
	Robert Richter <rrichter@...ium.com>,
	David Daney <david.daney@...ium.com>
Subject: Re: [PATCH] acpi, property: Export acpi_dev_prop_read_single call.

On Thursday, August 06, 2015 01:23:06 AM Rafael J. Wysocki wrote:
> On Wednesday, August 05, 2015 01:14:49 PM David Daney wrote:
> > On 08/05/2015 10:26 AM, David Daney wrote:
> > > On 08/05/2015 06:43 AM, Tomasz Nowicki wrote:
> > >> On 05.08.2015 15:48, Rafael J. Wysocki wrote:
> > >>> On Tuesday, August 04, 2015 04:01:59 PM David Daney wrote:
> > >>>> From: Tomasz Nowicki <tomasz.nowicki@...aro.org>
> > >>>>
> > >>>> Fixes the following build error when building drivers as modules:
> > >>>>
> > >>>>   ERROR: "acpi_dev_prop_read_single" [drivers/net/phy/mdio-octeon.ko]
> > >>>> undefined!
> > >>>>   ERROR: "acpi_dev_prop_read_single"
> > >>>> [drivers/net/ethernet/cavium/thunder/thunder_bgx.ko] undefined!
> > >>>
> > >>> Can you please tell me why the drivers in question use that function
> > >>> directly, although they aren't supposed to?
> > >>>
> > >>> Clearly, their authors had not tried to build them as modules or they
> > >>> would have noticed the problem at the development stage already.
> > >>>
> > >>> What would be wrong with using the generic device properties API
> > >>> instead?
> > >>>
> > >> Yes, you are right. We should use:
> > >> int device_property_read_u64_array(struct device *dev, const char
> > >> *propname, u64 *val, size_t nval);
> > >>
> > >
> > > Thanks all, for the review and suggestions.  We we try the suggested
> > > approach and see how it goes...
> > >
> > 
> > Actually I don't think device_property_read_u64_array() will work.
> > 
> > We are traversing a reference to a different acpi_device via 
> > acpi_dev_get_property_reference(),
> 
> Why?
> 
> > so there is no struct device * 
> > available for a call to device_property_read_u64_array().  This looks 
> > like a deficiency in the device_property_* framework, so for the time 
> > being I guess we will call acpi_dev_get_property(), which is exported, 
> > and decode the thing in the driver.
> 
> Please don't.
> 
> I'd like to understand what's missing.

Moreover, even if you have no struct device, you still can use
fwnode_property_read_u64_array(), can't you?

Thanks,
Rafael

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