From: Denys Dmytriyenko <denis@denix.org>
To: afd@ti.com
Cc: reatmon@ti.com, Yogesh Siraswar <yogeshs@ti.com>,
Praneeth Bajjuri <praneeth@ti.com>,
Denys Dmytriyenko <denys@konsulko.com>,
meta-ti@lists.yoctoproject.org
Subject: Re: [meta-ti][dunfell][PATCH v3] machine: Add am62xx evm configuration
Date: Fri, 25 Mar 2022 16:30:57 -0400 [thread overview]
Message-ID: <20220325203057.GH23554@denix.org> (raw)
In-Reply-To: <a0625acc-3a60-a54d-655f-e4438ba1e917@ti.com>
On Thu, Mar 24, 2022 at 08:47:12PM -0500, Andrew F. Davis via lists.yoctoproject.org wrote:
> On 3/24/22 5:21 PM, Ryan Eatmon via lists.yoctoproject.org wrote:
> >@@ -167,6 +182,10 @@ ALTERNATIVE_${PN}_am64xx = "\
> > am64-main-r5f1_1-fw \
> > am64-mcu-m4f0_0-fw \
> > "
> >+ALTERNATIVE_${PN}_am62xx = "\
> >+ am62-mcu-m4f0_0-fw \
> >+ am62-main-r5f0_0-fw \
>
>
> ^^ Looks like some tabs found there way in here..
>
> Why do we have these indented so far anyway, this whole file has wacky
> indenting, needs normalized.
Some quotes from the manual for 3 different cases - shell code, python code
and multi-line statements:
===============================================
Indentation: Use spaces for indentation rather than than tabs. For shell
functions, both currently work. However, it is a policy decision of the Yocto
Project to use tabs in shell functions. Realize that some layers have a policy
to use spaces for all indentation.
Python Function Whitespace: All Python functions must now use four spaces for
indentation. Previously, an inconsistent mix of spaces and tabs existed, which
made extending these functions using _append or _prepend complicated given
that Python treats whitespace as syntactically significant. If you are
defining or extending any Python functions (e.g. populate_packages, do_unpack,
do_patch and so forth) in custom recipes or classes, you need to ensure you
are using consistent four-space indentation.
Line Continuation: \ - Use the backward slash (\) character to split a
statement over multiple lines. Place the slash character at the end of the
line that is to be continued on the next line:
VAR = "A really long \
line"
===============================================
As you can see in the final example of multi-line, it shows the second line
starting where its content begins in the previous line. But it is not required
to indent like that, especially if the left part before the assignment sign is
very long, e.g.:
ALTERNATIVE_${PN}_am62xx = "am62-mcu-m4f0_0-fw \
am62-main-r5f0_0-fw \
Instead, you could start at the beginning of the line or use minimal
indentation of few spaces (no tabs here):
ALTERNATIVE_${PN}_am62xx = " \
am62-mcu-m4f0_0-fw \
am62-main-r5f0_0-fw \
ALTERNATIVE_${PN}_am62xx = " \
am62-mcu-m4f0_0-fw \
am62-main-r5f0_0-fw \
Both are acceptable.
Tabs to be only used in shell functions, such as do_compile, do_install, etc.
And one more final comment - when making functional changes, please keep the
existing indentation as is. If indentation need to be cleaned up or changed
for a recipe, should be a separate patch just for that w/o any functionality
or code changes - don't mix them in a single patch, unless it's a one-off.
--
Regards,
Denys Dmytriyenko <denis@denix.org>
PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964
Fingerprint: 25FC E4A5 8A72 2F69 1186 6D76 4209 0272 9A92 C964
next prev parent reply other threads:[~2022-03-25 20:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-24 22:21 [meta-ti][dunfell][PATCH v3] machine: Add am62xx evm configuration Ryan Eatmon
2022-03-25 1:47 ` Andrew Davis
2022-03-25 20:30 ` Denys Dmytriyenko [this message]
2022-03-25 21:00 ` Ryan Eatmon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220325203057.GH23554@denix.org \
--to=denis@denix.org \
--cc=afd@ti.com \
--cc=denys@konsulko.com \
--cc=meta-ti@lists.yoctoproject.org \
--cc=praneeth@ti.com \
--cc=reatmon@ti.com \
--cc=yogeshs@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.