[PATCH][next] nfc: pn533: Avoid -Wflex-array-member-not-at-end warnings

2024-08-19 Thread Gustavo A. R. Silva
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Remove unnecessary flex-array member `data[]`, and with this fix the following warnings: drivers/nfc/pn533/usb.c:268:38: warning: structure containing a flexible array member is not at the e

Re: [PATCH v2 08/11] arm64: dts: qcom: Add SM7325 device tree

2024-08-19 Thread Konrad Dybcio
On 8.08.2024 8:40 PM, Danila Tikhonov wrote: > From: Eugene Lepshy > > The Snapdragon 778G (SM7325) / 778G+ (SM7325-AE) / 782G (SM7325-AF) > is software-wise very similar to the Snapdragon 7c+ Gen 3 (SC7280). > > It uses the Kryo670. > > Signed-off-by: Eugene Lepshy > Signed-off-by: Danila Tik

Re: [PATCH][next] rpmsg: glink: Avoid -Wflex-array-member-not-at-end warnings

2024-08-19 Thread Gustavo A. R. Silva
On 08/08/24 12:51, Kees Cook wrote: On Wed, Aug 07, 2024 at 09:19:07AM -0600, Gustavo A. R. Silva wrote: -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. So, in order to avoid ending up with a flexible-array member in the middle of mul

Re: [PATCH] pstore: replace spinlock_t by raw_spinlock_t

2024-08-19 Thread Greg KH
On Mon, Aug 19, 2024 at 10:59:45PM +0800, Wen Yang wrote: > pstore_dump() is called when both preemption and local IRQ are disabled, > and a spinlock is obtained, which is problematic for the RT kernel because > in this configuration, spinlocks are sleep locks. > > Replace the spinlock_t with raw_

[RFC PATCH 09/11] kbuild: simplify commands in --dry-run mode

2024-08-19 Thread Vegard Nossum
- $filechk is used to check if a file is up to date. - $cmd includes logic for echoing commands and deleting intermediate files on interrupt. Skip all of that in --dry-run mode and just execute the command. - $cmd_and_savecmd executes the command and echoes it into ..cmd. - $if_changed_dep e

[RFC PATCH 00/11] output a valid shell script when running 'make -n'

2024-08-19 Thread Vegard Nossum
This patch series lets 'make -n' output a shell script that can be used to build the kernel without any further use of make. For example: make defconfig # ensure some build prerequisites are built make prepare # generate build script make -n | tee build.sh # excecute bui

[RFC PATCH 07/11] kbuild: define 'make' as a no-op in --dry-run mode

2024-08-19 Thread Vegard Nossum
Output 'make() { :; }' at the start of the script in order to make all 'make' invocations in the resulting build script no-ops (GNU Make will actually execute -- and print -- all recipe lines that include $(MAKE), even when invoked with -n). Signed-off-by: Vegard Nossum --- Makefile | 6 ++

[RFC PATCH 02/11] kbuild: document some prerequisites

2024-08-19 Thread Vegard Nossum
When running 'make --dry-run', make will invoke itself recursively for recipes using $(MAKE), but otherwise not execute the other commands in a recipe. However, if a prerequisite is missing and 'make' does not how to create it (which will be the case when running 'make -n'), it will complain with

[RFC PATCH 05/11] kbuild: execute modules.order recipe in --dry-run mode

2024-08-19 Thread Vegard Nossum
modules.order is read by scripts/Makefile.modfinal to determine which modules to build, so we need this recipe to execute if we want to be able to output the recipes for building modules in dry-run mode. Signed-off-by: Vegard Nossum --- scripts/Makefile.build | 2 +- 1 file changed, 1 insertion(

[RFC PATCH 11/11] kbuild: suppress echoing of commands in --dry-run mode

2024-08-19 Thread Vegard Nossum
If the user ran 'make -n' then we will already print all commands. Signed-off-by: Vegard Nossum --- Makefile | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d08ade5791c2e..a1a3e96a10ea2 100644 --- a/Makefile +++ b/Makefile @@ -96,9 +96,10 @@ i

[RFC PATCH 10/11] kbuild: don't test for file presence in --dry-run mode

2024-08-19 Thread Vegard Nossum
I'm not really sure if this is correct as I'm not sure under which circumstances the files tested for with $(wildcard) would NOT be present. I'm not even sure if this is the right approach to take. However, it _should_ keep working the same as before for regular 'make' invocations and is necessary

[RFC PATCH 08/11] kbuild: make link-vmlinux.sh respect $dry_run

2024-08-19 Thread Vegard Nossum
Make link-vmlinux.sh print the commands it wants to run instead of actually running them when $dry_run is defined. This is needed in order for make -n/--dry-run to output a complete build script. Signed-off-by: Vegard Nossum --- scripts/Makefile.vmlinux | 15 -- scripts/link-vmlinux

[RFC PATCH 06/11] kbuild: set $dry_run when running in --dry-run mode

2024-08-19 Thread Vegard Nossum
Add a convenience variable that allows us to use 'ifdef dry_run...endif' in Makefiles or '[ -v dry_run ]' in shell scripts to test whether make was invoked with '-n'. See [1] for an explanation of this particular construction. [1]: https://www.gnu.org/software/make/manual/make.html#Testing-Flags

[RFC PATCH 04/11] kbuild: don't execute .ko recipe in --dry-run mode

2024-08-19 Thread Vegard Nossum
Prefixing a line in a make recipe with + makes that command execute even in --dry-run mode. We don't need that here; remove it. Fixes: 5f9ae91f7c0d ("kbuild: Build kernel module BTFs if BTF is enabled and pahole supports it") Cc: Andrii Nakryiko Cc: Alexei Starovoitov Signed-off-by: Vegard Noss

[RFC PATCH 03/11] kbuild: pass KERNELVERSION and LOCALVERSION explicitly to setlocalversion

2024-08-19 Thread Vegard Nossum
These environment variables are passed when invoking 'make', but if running 'make -n' we need to pass them explicitly so they become part of the printed command. Signed-off-by: Vegard Nossum --- Makefile | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile

[RFC PATCH 01/11] kbuild: ignore .config rule for make --always-make

2024-08-19 Thread Vegard Nossum
Before this patch, using 'make --always-make' would always result in the error message about the missing .config being displayed. Detect the -B/--always-make flag and leave this rule out, which allows the rest of the build to proceed. See [1] for an explanation of this particular construction. [1

[PATCH] pstore: replace spinlock_t by raw_spinlock_t

2024-08-19 Thread Wen Yang
pstore_dump() is called when both preemption and local IRQ are disabled, and a spinlock is obtained, which is problematic for the RT kernel because in this configuration, spinlocks are sleep locks. Replace the spinlock_t with raw_spinlock_t to avoid sleeping in atomic context. Signed-off-by: Wen