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: <CAFp+6iF=Q5twhXwRVdwUYi7mOPvqQoRBu7=RG9tS7ORxOwvS+Q@mail.gmail.com>
Date:	Mon, 4 Aug 2014 15:30:38 +0530
From:	Vivek Gautam <gautam.vivek@...sung.com>
To:	Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Kishon Vijay Abraham I <kishon@...com>,
	Felipe Balbi <balbi@...com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Linux USB Mailing List <linux-usb@...r.kernel.org>
Subject: Re: [PATCHv2 5/6] base: platform: name the device already during allocation

On Mon, Jul 14, 2014 at 8:25 PM, Greg Kroah-Hartman
<gregkh@...uxfoundation.org> wrote:
> On Mon, Jul 14, 2014 at 11:49:38AM +0530, Kishon Vijay Abraham I wrote:
>> Greg,
>>
>> On Thursday 05 June 2014 06:22 PM, Heikki Krogerus wrote:
>> > This allows resources such as GPIOs and clocks, which can be
>> > matched based on the device name when requested, to be
>> > assigned even when PLATFORM_DEVID_AUTO is used.
>>
>> Any comments on this patch?
>
> I thought I rejected it in the past, don't have my email archives
> around at the moment, sorry.
>
>
>> > Signed-off-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>

Are we planning a different approach for this ?
Since we are basing the phy-calibration patches for phy-exynos5-usbdrd
on this series
and we need to register the phy lookup table in DWC3, and get the PHYs
in xhci-plat.

The following patch in this series (which is based on this change)
help us achieve that :
[PATCHv2 6/6] usb: dwc3: host: convey the PHYs to xhci
(https://lkml.org/lkml/2014/6/5/585)

>> > Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>> > ---
>> >  drivers/base/platform.c | 77 ++++++++++++++++++++++++++++++-------------------
>> >  1 file changed, 47 insertions(+), 30 deletions(-)
>> >
>> > diff --git a/drivers/base/platform.c b/drivers/base/platform.c
>> > index 9e9227e..e856bc4 100644
>> > --- a/drivers/base/platform.c
>> > +++ b/drivers/base/platform.c
>> > @@ -177,11 +177,45 @@ struct platform_object {
>> >   */
>> >  void platform_device_put(struct platform_device *pdev)
>> >  {
>> > -   if (pdev)
>> > -           put_device(&pdev->dev);
>> > +   if (!pdev)
>> > +           return;
>> > +
>> > +   if (pdev->id_auto) {
>> > +           ida_simple_remove(&platform_devid_ida, pdev->id);
>> > +           pdev->id = PLATFORM_DEVID_AUTO;
>> > +   }
>> > +
>> > +   put_device(&pdev->dev);
>> >  }
>> >  EXPORT_SYMBOL_GPL(platform_device_put);
>
> Why would a single call to this function remove an id?  That seems
> really wrong, you should be able to call get and put on a device
> numerous times, only the "last" reference should cause the device to be
> cleaned up.
>
> Shouldn't this be in the release function instead?
>
> thanks,
>
> greg k-h
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Best Regards
Vivek Gautam
Samsung R&D Institute, Bangalore
India
--
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