[U-Boot] [PATCH v4 2/4] drivers:usb:common:fsl-dt-fixup: Remove code duplication for fdt_usb_get_node_type
Sriram Dash
sriram.dash at nxp.com
Fri Mar 18 13:22:59 CET 2016
>-----Original Message-----
>From: Marek Vasut [mailto:marex at denx.de]
>Sent: Friday, March 18, 2016 5:47 PM
>To: Sriram Dash <sriram.dash at nxp.com>; u-boot at lists.denx.de
>Cc: york sun <york.sun at nxp.com>; Ramneek Mehresh
><ramneek.mehresh at nxp.com>; Rajesh Bhagat <rajesh.bhagat at nxp.com>
>Subject: Re: [PATCH v4 2/4] drivers:usb:common:fsl-dt-fixup: Remove code
>duplication for fdt_usb_get_node_type
>
>On 03/18/2016 12:58 PM, Sriram Dash wrote:
>>> -----Original Message-----
>>> From: Marek Vasut [mailto:marex at denx.de]
>>> Sent: Friday, March 18, 2016 4:51 PM
>>> To: Sriram Dash <sriram.dash at nxp.com>; u-boot at lists.denx.de
>>> Cc: york sun <york.sun at nxp.com>; Ramneek Mehresh
>>> <ramneek.mehresh at nxp.com>; Rajesh Bhagat <rajesh.bhagat at nxp.com>
>>> Subject: Re: [PATCH v4 2/4] drivers:usb:common:fsl-dt-fixup: Remove
>>> code duplication for fdt_usb_get_node_type
>>>
>>> On 03/18/2016 06:05 AM, Sriram Dash wrote:
>>>>
>>>>> -----Original Message-----
>>>>> From: Marek Vasut [mailto:marex at denx.de]
>>>>> Sent: Friday, March 11, 2016 10:14 PM
>>>>> To: Sriram Dash <sriram.dash at nxp.com>; u-boot at lists.denx.de
>>>>> Cc: york sun <york.sun at nxp.com>; Ramneek Mehresh
>>>>> <ramneek.mehresh at nxp.com>; Rajesh Bhagat <rajesh.bhagat at nxp.com>
>>>>> Subject: Re: [PATCH v4 2/4] drivers:usb:common:fsl-dt-fixup: Remove
>>>>> code duplication for fdt_usb_get_node_type
>>>>>
>>>>> On 03/11/2016 07:26 AM, Sriram Dash wrote:
>>>>>> Call fdt_usb_get_node_type() from fdt_fixup_usb_mode_phy_type() to
>>>>>> avoid code duplication.
>>>>>>
>>>>>> Signed-off-by: Sriram Dash <sriram.dash at nxp.com>
>>>>>> Signed-off-by: Rajesh Bhagat <rajesh.bhagat at nxp.com>
>>>>>> ---
>>>>>> Changes in v4:
>>>>>> - Make minimal modification to code Changes in v3:
>>>>>> - Move the duplication of code to new patch
>>>>>>
>>>>>> drivers/usb/common/fsl-dt-fixup.c | 23 ++++++-----------------
>>>>>> 1 file changed, 6 insertions(+), 17 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/usb/common/fsl-dt-fixup.c
>>>>>> b/drivers/usb/common/fsl-dt-fixup.c
>>>>>> index 92adb46..64e20d8 100644
>>>>>> --- a/drivers/usb/common/fsl-dt-fixup.c
>>>>>> +++ b/drivers/usb/common/fsl-dt-fixup.c
>>>>>> @@ -19,32 +19,21 @@
>>>>>> #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 #endif
>>>>>>
>>>>>> +static const char *fdt_usb_get_node_type(void *blob, int start_offset,
>>>>>> + int *node_offset);
>>>>>> +
>>>>>
>>>>> Why do you need this forward declaration ?
>>>>>
>>>>
>>>> The forwarded declaration is needed as the function "
>>>> fdt_usb_get_node_type " is
>>> used in " fdt_fixup_usb_mode_phy_type " but defined below "
>>> fdt_fixup_usb_mode_phy_type ".
>>>>
>>>> This was done to avoid the confusion created due to git diff, while moving the "
>>> fdt_usb_get_node_type " above " fdt_fixup_usb_mode_phy_type", in v3.
>>>
>>> Just swap those functions please.
>>>
>>
>> So, shall I change v4 back to v3, as the return type is being addressed in another
>patch v4 4/4.
>
>I took a look at the changelog from v3 to v4, it says "Make minimal modification to
>code" , so based on that, I cannot answer the question, sorry.
>
>I am just asking you to reorder the functions and get rid of the forward declaration.
>I don't think it has anything to do with the return type, does it ?
>
OK. I understand, Will swap the functions in v5.
>--
>Best regards,
>Marek Vasut
More information about the U-Boot
mailing list