From: Borislav Petkov <bp@alien8.de>
To: Li Zetao <lizetao1@huawei.com>
Cc: keescook@chromium.org, tglx@linutronix.de, mingo@redhat.com,
dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com,
kirill.shutemov@linux.intel.com, tony.luck@intel.com,
masahiroy@kernel.org, michael.roth@amd.com,
sathyanarayanan.kuppuswamy@linux.intel.com, nathan@kernel.org,
ndesaulniers@google.com, brijesh.singh@amd.com,
peterz@infradead.org, venu.busireddy@oracle.com,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH -next v4 2/2] x86/boot/compressed: Add "-Wall" flag to Makefile
Date: Mon, 17 Oct 2022 19:01:40 +0200 [thread overview]
Message-ID: <Y02KdJfTSFRlbnwn@zn.tnic> (raw)
In-Reply-To: <20221011012904.2330473-3-lizetao1@huawei.com>
On Tue, Oct 11, 2022 at 01:29:04AM +0000, Li Zetao wrote:
> This warning is disabled in the main Makefile for this reason so we
Who's "we"?
Please use passive voice in your commit message: no "we" or "I", etc,
and describe your changes in imperative mood.
Also, pls read section "2) Describe your changes" in
Documentation/process/submitting-patches.rst for more details.
Also, see section "Changelog" in
Documentation/process/maintainer-tip.rst
Bottom line is: personal pronouns are ambiguous in text, especially with
so many parties/companies/etc developing the kernel so let's avoid them
please.
In any case, it is getting there but this is not how you structure a
patchset like this. The proper order is:
1st patch: Remove unused variables
2nd patch: Fix -Wframe-address warning and explain why
3rd patch: Fix arch/x86/boot/compressed/acpi.c:23:1: warning: unused function "__efi_get_rsdp_addr" [-Wunused-function]
Btw, I also get with -Wall
In function ‘find_trampoline_placement’,
inlined from ‘paging_prepare’ at arch/x86/boot/compressed/pgtable_64.c:135:35:
arch/x86/boot/compressed/pgtable_64.c:60:30: warning: array subscript 0 is outside array bounds of ‘short unsigned int[0]’ [-Warray-bounds]
60 | ebda_start = *(unsigned short *)0x40e << 4;
| ^~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/boot/compressed/pgtable_64.c:61:30: warning: array subscript 0 is outside array bounds of ‘short unsigned int[0]’ [-Warray-bounds]
61 | bios_start = *(unsigned short *)0x413 << 10;
| ^~~~~~~~~~~~~~~~~~~~~~~~
In function ‘bios_get_rsdp_addr’,
inlined from ‘get_rsdp_addr’ at arch/x86/boot/compressed/acpi.c:163:8:
arch/x86/boot/compressed/acpi.c:130:19: warning: array subscript 0 is outside array bounds of ‘u16[0]’ {aka ‘short unsigned int[]’} [-Warray-bounds]
130 | address = *(u16 *)ACPI_EBDA_PTR_LOCATION;
That should be a separate patch too.
Nth patch(es): Fix more warnings after building at least
"allnoconfig" "defconfig" "allmodconfig" "allyesconfig"
for both 32-bit and 64-bit. A bunch of randconfigs on a big machine
would help a lot.
N + kth patch: Add -std=gnu11
X. Final patch: Add -Wall to compressed/Makefile.
In that order so that no warnings are seen when doing random builds.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
prev parent reply other threads:[~2022-10-17 17:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 8:15 [PATCH -next v2 0/2] Remove unused variables in x86/boot Li Zetao
2022-09-27 8:15 ` [PATCH -next v2 1/2] x86/boot/compressed: Add "-Wall" flag to Makefile Li Zetao
2022-09-27 8:15 ` [PATCH -next v2 2/2] x86/boot: Remove unused variables Li Zetao
2022-09-27 21:50 ` [PATCH -next v2 0/2] Remove unused variables in x86/boot Nathan Chancellor
2022-09-27 21:58 ` Nathan Chancellor
2022-09-29 2:16 ` Li Zetao
2022-09-29 16:59 ` Nathan Chancellor
2022-09-30 3:27 ` [PATCH -next v3 " Li Zetao
2022-09-30 3:27 ` [PATCH -next v3 1/2] x86/boot/compressed: Add "-Wall" flag to Makefile Li Zetao
2022-09-30 3:27 ` [PATCH -next v3 2/2] x86/boot: Remove unused variables Li Zetao
2022-10-08 13:41 ` Ping: [PATCH -next v3 0/2] Remove unused variables in x86/boot Li Zetao
2022-10-09 15:17 ` Kees Cook
2022-10-11 1:29 ` [PATCH -next v4 " Li Zetao
2022-10-11 1:29 ` [PATCH -next v4 1/2] x86/boot: Remove unused variables Li Zetao
2022-10-11 21:15 ` Nick Desaulniers
2022-10-11 21:22 ` Nick Desaulniers
2022-10-11 1:29 ` [PATCH -next v4 2/2] x86/boot/compressed: Add "-Wall" flag to Makefile Li Zetao
2022-10-11 21:20 ` Nick Desaulniers
2022-10-17 17:01 ` Borislav Petkov [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=Y02KdJfTSFRlbnwn@zn.tnic \
--to=bp@alien8.de \
--cc=akpm@linux-foundation.org \
--cc=brijesh.singh@amd.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizetao1@huawei.com \
--cc=masahiroy@kernel.org \
--cc=michael.roth@amd.com \
--cc=mingo@redhat.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=peterz@infradead.org \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=venu.busireddy@oracle.com \
--cc=x86@kernel.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