Re: [PATCH v5 07/13] mips: Remove duplicated syscallnr.sh
| Newsgroups | org.kernel.vger.linux-s390 |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The MIPS kernel build fails because an empty, unquoted Make variable causes `scripts/syscallnr.sh` to misparse its arguments. -- --- Patch [7]: [PATCH v5 07/13] mips: Remove duplicated syscallnr.sh --- commit 877d5f006e4ab42c99a338fbffa9cb65343bea2e Author: André Almeida <[email protected]> mips: Remove duplicated syscallnr.sh This commit removes the MIPS-specific syscallnr.sh script and switches to using the common script in scripts/syscallnr.sh for generating syscall numbers. > diff --git a/arch/mips/kernel/syscalls/Makefile b/arch/mips/kernel/syscalls/Makefile > index 56f6f093bb88e..69adc21483edf 100644 > --- a/arch/mips/kernel/syscalls/Makefile > +++ b/arch/mips/kernel/syscalls/Makefile > @@ -5,16 +5,17 @@ uapi := arch/$(SRCARCH)/include/generated/uapi/asm > $(shell mkdir -p $(uapi) $(kapi)) > > syshdr := $(srctree)/scripts/syscallhdr.sh > -sysnr := $(src)/syscallnr.sh > +sysnr := $(srctree)/scripts/syscallnr.sh > systbl := $(srctree)/scripts/syscalltbl.sh > > quiet_cmd_syshdr = SYSHDR $@ > cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --offset __NR_Linux $< $@ > > quiet_cmd_sysnr = SYSNR $@ > - cmd_sysnr = $(CONFIG_SHELL) '$(sysnr)' '$<' '$@' \ > - '$(sysnr_abis_$(basetarget))' \ > - '$(sysnr_pfx_$(basetarget))' > + cmd_sysnr = $(CONFIG_SHELL) $(sysnr) \ > + --prefix $(sysnr_pfx_$(basetarget))_Linux_ \ > + --abis $(sysnr_abis_$(basetarget)) \ [Severity: Low] Does this break the build when $(sysnr_abis_$(basetarget)) evaluates to an empty string? Because $(sysnr_abis_$(basetarget)) is unquoted, if it is empty, the shell command becomes: --abis $< $@ This causes scripts/syscallnr.sh to consume the input file $< as the argument to --abis, leaving only the output file $@ as a positional argument. Since the script expects exactly two positional arguments, the script's parameter count check would fail and terminate with a usage error. > + $< $@ > > quiet_cmd_systbl = SYSTBL $@ > cmd_systbl = $(CONFIG_SHELL) $(systbl) $< $@ -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=7