Re: [RFC 0/8] usb: phy: msm: various cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19 May 2016 at 01:52, Peter Chen <hzpeterchen@xxxxxxxxx> wrote:
>
>
> On Thu, May 19, 2016 at 5:24 AM, Arnd Bergmann <arnd@xxxxxxxx> wrote:
>>
>> I stumbled over this warning last week, which showed up after I had
>> removed an incorrect patch from my randconfig build setup:
>>
>> drivers/usb/phy/phy-msm-usb.c: In function 'msm_otg_probe':
>> drivers/usb/phy/phy-msm-usb.c:1735:14: error: 'regs[0].consumer' may be
>> used uninitialized in this function [-Werror=maybe-uninitialized]
>>   motg->vddcx = regs[0].consumer;
>>   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
>> drivers/usb/phy/phy-msm-usb.c:1736:14: error: 'regs[1].consumer' may be
>> used uninitialized in this function [-Werror=maybe-uninitialized]
>>   motg->v3p3  = regs[1].consumer;
>>   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
>> drivers/usb/phy/phy-msm-usb.c:1737:14: error: 'regs[2].consumer' may be
>> used uninitialized in this function [-Werror=maybe-uninitialized]
>>   motg->v1p8  = regs[2].consumer;
>>   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
>>
>> Having already fixed the same problem in the phy-qcom-8x16-usb.c
>> driver before, I tried to do the same thing here, but it turned
>> out to be somewhat different, and I ended up running into several
>> unrelated issues in the driver that I now try to fix up.
>>
>> The series is not tested beyond verifying that it no longer causes
>> randconfig warnings, and some patches are not entirely obvious.
>> In particular the ehci-msm and chipidea changes are probably a
>> good idea, but they actually change the behavior of the drivers
>> in a way that I cannot verify through inspection alone. The
>> last patch in the series probably requires some changes to the
>> devicetree files to go along with it.
>>
>> Please have a look and test this, provided the patches make sense
>> conceptually.
>>
>>
>
>
> MSM USB driver uses phy driver for dual-role (otg) switch, chipidea
> driver for peripheral function, a dedicated ehci file for host driver,
> so these three driver will access the same controller register space,
> it is not a good practice.

Agreed.  It's a huge mess.  And it is currently being reworked.

> In fact, MSM USB2 can use chipidea driver as controller driver, and its
> phy driver dedicate for USB PHY function with some changes.

Yeah I noticed with the addition of the host controller we can do this, which
was the impetus for reworking.  In the end, we'll have just the qcom-ci and
a phy.


Regards,
Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux