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+6iGVGJKrKZLBAsZG5o+EBCQgQUbayhP4UiQNQf6=SVcibA@mail.gmail.com>
Date:	Thu, 18 Sep 2014 09:20:20 +0530
From:	Vivek Gautam <gautam.vivek@...sung.com>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Linux USB Mailing List <linux-usb@...r.kernel.org>,
	"linux-samsung-soc@...r.kernel.org" 
	<linux-samsung-soc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Greg KH <gregkh@...uxfoundation.org>,
	Kukjin Kim <kgene.kim@...sung.com>,
	Jingoo Han <jg1.han@...sung.com>
Subject: Re: [PATCH v3 1/2] usb: host: ehci-exynos: Remove unnecessary usb-phy support

Hi Alan,


On Wed, Sep 17, 2014 at 8:27 PM, Alan Stern <stern@...land.harvard.edu> wrote:
> On Wed, 17 Sep 2014, Vivek Gautam wrote:
>
>> Now that we have completely moved from older USB-PHY drivers
>> to newer GENERIC-PHY drivers for PHYs available with USB controllers
>> on Exynos series of SoCs, we can remove the support for the same
>> in our host drivers too.
>>
>> Signed-off-by: Vivek Gautam <gautam.vivek@...sung.com>
>
> I don't see why you made your changes in this awkward way.  For
> instance...
>
>> @@ -59,49 +54,39 @@ static int exynos_ehci_get_phy(struct device *dev,
>>  {
>>       struct device_node *child;
>>       struct phy *phy;
>> -     int phy_number;
>> -     int ret = 0;
>> +     int phy_num;
>
> Why rename this variable?  Wasn't the original name good enough?

fair enough, don't need to rename the variable.

>
>> +     int ret;
>>
>>       for_each_available_child_of_node(dev->of_node, child) {
>> -             ret = of_property_read_u32(child, "reg", &phy_number);
>> +             ret = of_property_read_u32(child, "reg", &phy_num);
>>               if (ret) {
>>                       dev_err(dev, "Failed to parse device tree\n");
>>                       of_node_put(child);
>>                       return ret;
>>               }
>>
>> -             if (phy_number >= PHY_NUMBER) {
>> +             if (phy_num >= PHY_NUMBER) {
>>                       dev_err(dev, "Invalid number of PHYs\n");
>>                       of_node_put(child);
>>                       return -EINVAL;
>>               }
>>
>> -             phy = devm_of_phy_get(dev, child, NULL);
>> +             exynos_ehci->phy[phy_num] = devm_of_phy_get(dev, child, NULL);
>> +             phy = exynos_ehci->phy[phy_num];
>
> Why make two changes, resulting in more code, when you could have made
> just one change?
>
>                 phy = devm_of_phy_get(dev, child, NULL);
> +               exynos_ehci->phy[phy_num] = phy;

Right. i don't know what state of mind i was in while making these changes.
i should have kept the changes to minimal.

>
> Also, the patch description should mention that you are adding support
> for EPROBE_DEFER.

Sure, will add that description.




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