From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: James Morse <james.morse@arm.com>
Cc: linux-efi@vger.kernel.org, kvm@vger.kernel.org,
matt@codeblueprint.co.uk, catalin.marinas@arm.com,
Tyler Baicar <tbaicar@codeaurora.org>,
will.deacon@arm.com, linux-kernel@vger.kernel.org,
paul.gortmaker@windriver.com, lv.zheng@intel.com,
kvmarm@lists.cs.columbia.edu, fu.wei@linaro.org,
zjzhang@codeaurora.org, robert.moore@intel.com,
linux-acpi@vger.kernel.org, eun.taik.lee@samsung.com,
shijie.huang@arm.com, labbott@redhat.com, lenb@kernel.org,
harba@codeaurora.org, john.garry@huawei.com,
marc.zyngier@arm.com, punit.agrawal@arm.com, rostedt@goodmis.org,
nkaje@codeaurora.org, sandeepa.s.prabhu@gmail.com,
linux-arm-kernel@lists.infradead.org, devel@acpica.org,
rjw@rjwysocki.net, rruigrok@codeaurora.org, astone@redhat.com,
hanjun.guo@linaro.org, pbonzini@redhat.com,
akpm@linux-foundation.org, bristot@redhat.com,
shiju.jose@huawei.com
Subject: Re: [PATCH V10 07/10] efi: print unrecognized CPER section
Date: Wed, 22 Feb 2017 01:12:42 +0000 [thread overview]
Message-ID: <20170222011241.GX21222@n2100.armlinux.org.uk> (raw)
In-Reply-To: <58AC9093.5020303@arm.com>
On Tue, Feb 21, 2017 at 07:10:11PM +0000, James Morse wrote:
> Hi Tyler,
>
> On 15/02/17 19:51, Tyler Baicar wrote:
> > + } else {
> > + const void *unknown_err;
> > +
> > + unknown_err = acpi_hest_generic_data_payload(gdata);
> > + printk("%ssection type: %pUl\n", newpfx, sec_type);
> > + printk("%ssection length: %d\n", newpfx,
>
> Nit: please use the "%s""section... that this file consistently uses. This means
> this code will still work as expected when someone adds '%ss' support to printk!
No. That is wrong:
"%s""section" is stored in memory as bytes containing:
'%' 's' 's' 'e' 'c' 't' 'i' 'o' 'n'
whereas "%ssection" is stored in memory as bytes containing:
'%' 's' 's' 'e' 'c' 't' 'i' 'o' 'n'
They're exactly the same, so when printk() comes to parse the string, it
sees exactly the same byte sequence. So, the only thing that's happening
is code obfuscation for no good reason what so ever.
If you don't believe me, run some build tests and look at the resulting
strings... also look at the C standard. "Adjacent string literal tokens
are concatenated."
Please get rid of this obfuscation.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2017-02-22 1:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 19:51 [PATCH V10 00/10] Add UEFI 2.6 and ACPI 6.1 updates for RAS on ARM64 Tyler Baicar
2017-02-15 19:51 ` [PATCH V10 01/10] acpi: apei: read ack upon ghes record consumption Tyler Baicar
2017-02-15 19:51 ` [PATCH V10 02/10] ras: acpi/apei: cper: generic error data entry v3 per ACPI 6.1 Tyler Baicar
2017-02-16 18:25 ` Ard Biesheuvel
2017-02-15 19:51 ` [PATCH V10 03/10] efi: parse ARM processor error Tyler Baicar
[not found] ` <1487188282-2568-4-git-send-email-tbaicar-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-02-16 18:26 ` Ard Biesheuvel
2017-02-15 19:51 ` [PATCH V10 04/10] arm64: exception: handle Synchronous External Abort Tyler Baicar
2017-02-15 19:51 ` [PATCH V10 05/10] acpi: apei: handle SEA notification type for ARMv8 Tyler Baicar
2017-02-16 18:32 ` Ard Biesheuvel
2017-02-21 16:52 ` Baicar, Tyler
2017-02-15 19:51 ` [PATCH V10 06/10] acpi: apei: panic OS with fatal error status block Tyler Baicar
2017-02-15 19:51 ` [PATCH V10 07/10] efi: print unrecognized CPER section Tyler Baicar
2017-02-15 20:07 ` Joe Perches
2017-02-15 20:31 ` Baicar, Tyler
2017-02-21 19:10 ` James Morse
2017-02-21 19:39 ` Baicar, Tyler
[not found] ` <9b8aee3f-9ab6-121a-cad0-96a39743de55-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-02-22 0:30 ` Joe Perches
2017-02-22 1:12 ` Russell King - ARM Linux [this message]
2017-02-22 10:13 ` James Morse
2017-02-15 19:51 ` [PATCH V10 08/10] ras: acpi / apei: generate trace event for " Tyler Baicar
2017-02-15 19:51 ` [PATCH V10 09/10] trace, ras: add ARM processor error trace event Tyler Baicar
2017-02-15 19:51 ` [PATCH V10 10/10] arm/arm64: KVM: add guest SEA support Tyler Baicar
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=20170222011241.GX21222@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=astone@redhat.com \
--cc=bristot@redhat.com \
--cc=catalin.marinas@arm.com \
--cc=devel@acpica.org \
--cc=eun.taik.lee@samsung.com \
--cc=fu.wei@linaro.org \
--cc=hanjun.guo@linaro.org \
--cc=harba@codeaurora.org \
--cc=james.morse@arm.com \
--cc=john.garry@huawei.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=labbott@redhat.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lv.zheng@intel.com \
--cc=marc.zyngier@arm.com \
--cc=matt@codeblueprint.co.uk \
--cc=nkaje@codeaurora.org \
--cc=paul.gortmaker@windriver.com \
--cc=pbonzini@redhat.com \
--cc=punit.agrawal@arm.com \
--cc=rjw@rjwysocki.net \
--cc=robert.moore@intel.com \
--cc=rostedt@goodmis.org \
--cc=rruigrok@codeaurora.org \
--cc=sandeepa.s.prabhu@gmail.com \
--cc=shijie.huang@arm.com \
--cc=shiju.jose@huawei.com \
--cc=tbaicar@codeaurora.org \
--cc=will.deacon@arm.com \
--cc=zjzhang@codeaurora.org \
/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