From: Madhavan Srinivasan <maddy@linux.ibm.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: mpe@ellerman.id.au, npiggin@gmail.com,
christophe.leroy@csgroup.eu, naveen@kernel.org,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/boot: Fix dash warning
Date: Tue, 22 Apr 2025 19:17:22 +0530 [thread overview]
Message-ID: <d14eb2c1-05d5-402b-b6b0-71d8bbd32200@linux.ibm.com> (raw)
In-Reply-To: <20250422230822.12a81c95@canb.auug.org.au>
On 4/22/25 6:38 PM, Stephen Rothwell wrote:
> Hi Madhavan,
>
> On Tue, 22 Apr 2025 17:00:23 +0530 Madhavan Srinivasan <maddy@linux.ibm.com> wrote:
>>
>> # suppress some warnings in recent ld versions
>> nowarn="-z noexecstack"
>> -if [ $(${CROSS}ld -v --no-warn-rwx-segments &>/dev/null; echo $?) -eq 0 ]; then
>> +if [ "$("${CROSS}"ld -v --no-warn-rwx-segments >/dev/null 2>&1; echo $?)" -eq 0 ]; then
>> nowarn="$nowarn --no-warn-rwx-segments"
>> fi
>
> On the way to bed, it occurred to me that the above "if" line can be
> written as:
>
> if "${CROSS}ld" -v --no-warn-rwx-segments >/dev/null 2>&1; then
if command; then
# Commands to execute if the command succeeds (exit status 0)
fi
Yeah nice, Will fix and send a v2
Maddy
>
prev parent reply other threads:[~2025-04-22 13:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 11:30 [PATCH] powerpc/boot: Fix dash warning Madhavan Srinivasan
2025-04-22 13:08 ` Stephen Rothwell
2025-04-22 13:47 ` Madhavan Srinivasan [this message]
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=d14eb2c1-05d5-402b-b6b0-71d8bbd32200@linux.ibm.com \
--to=maddy@linux.ibm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=naveen@kernel.org \
--cc=npiggin@gmail.com \
--cc=sfr@canb.auug.org.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).