[U-Boot] [PATCH v6 4/4] usb: add USB support for Efika

Stefano Babic sbabic at denx.de
Mon Oct 31 16:23:09 CET 2011


On 10/31/2011 03:58 PM, Jana Rapava wrote:
> 
> 
> 2011/10/31 Stefano Babic <sbabic at denx.de <mailto:sbabic at denx.de>>
> 
>     > There are some issues with: [PATCH 3/4] EHCI: adjust for mx5
>     > If you have already applied it
> 
>     Jana, can you answer / fix this point ?
> 
> 
> I really don't know what happens there. Code file looks aligned, but
> when I generate a patch with git-format-patch, aligning is messed up.

Wait: this can be due to the different positions of the TAB characters,
and to the leading + to mark an added line. It is not a problem.

> So
> I fix it in git-send-email,

Do you mean you change the patch generated by git format-patch ? You
should not do it.

Take a look at your patch. Some defines are removed, and in the patch
you see them as:

-#ifdef CONFIG_MX25
-#define MX25_USB_CTRL_IP_PUE_DOWN_BIT  (1<<6)
-#define MX25_USB_CTRL_HSTD_BIT         (1<<5)
-#define MX25_USB_CTRL_USBTE_BIT                (1<<4)
-#define MX25_USB_CTRL_OCPOL_OTG_BIT    (1<<3)
-#endif

It seems that even in the original file the defines were not aligned.
But this is not true, the disalignment is introduced by the leading "-".

However, when we see some lines later, the defines are added again and
they seem aligned.

+#ifdef CONFIG_MX25
+#define MX25_USB_CTRL_IP_PUE_DOWN_BIT  (1<<6)
+#define MX25_USB_CTRL_HSTD_BIT         (1<<5)
+#define MX25_USB_CTRL_USBTE_BIT        (1<<4)
+#define MX25_USB_CTRL_OCPOL_OTG_BIT    (1<<3)
+#endif

But when we apply the patch, they defines are disaligned again. maybe
you are worrying too much: let the tools doing their work. You have to
check that your changed file is correct (without whitespace instead of
tab), and then call git-format-patch. And do not care if the result
seems producing disaligned entries, this is not true.

There are also other comments by Igor that should be fixed,
independently from this alignment problem. Please fix them and resubmit.

> but after sending  whitespace characters are
> messed up again.
> I wasn't able to find a way to fix it yet.

As I said, you want to fix the result of git-format-patch, but it is
correct. Simply do not do it.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list