]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: init: merge split string literals in preprocessor directive
authorPaul Walmsley <paul.walmsley@sifive.com>
Thu, 17 Oct 2019 21:45:58 +0000 (14:45 -0700)
committerPaul Walmsley <paul.walmsley@sifive.com>
Mon, 28 Oct 2019 07:46:01 +0000 (00:46 -0700)
commitfe24b16d5e353ecf93042d076b90c40572e4dcad
tree71ed7254eaf86ccd416a00d670c41d2541f96b56
parent72a7abf94a601ab8bea715f390de86ab4a81c080
riscv: init: merge split string literals in preprocessor directive

sparse complains loudly when string literals associated with
preprocessor directives are split into multiple, separately quoted
strings across different lines:

arch/riscv/mm/init.c:341:9: error: Expected ; at the end of type declaration
arch/riscv/mm/init.c:341:9: error: got "not use absolute addressing."
arch/riscv/mm/init.c:358:9: error: Trying to use reserved word 'do' as identifier
arch/riscv/mm/init.c:358:9: error: Expected ; at end of declaration
[ ... ]

It turns out this doesn't compile.  The existing Linux practice for
this situation is simply to use a single long line.  So, fix by
concatenating the strings.

This patch should have no functional impact.

This version incorporates changes based on feedback from Luc Van
Oostenryck <luc.vanoostenryck@gmail.com>.

Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Reviewed-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/linux-riscv/CAAhSdy2nX2LwEEAZuMtW_ByGTkHO6KaUEvVxRnba_ENEjmFayQ@mail.gmail.com/T/#mc1a58bc864f71278123d19a7abc083a9c8e37033
Fixes: b7623f833b5b3 ("RISC-V: Always compile mm/init.c with cmodel=medany and notrace")
Cc: Anup Patel <anup.patel@wdc.com>
arch/riscv/mm/init.c