Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4db2196d authored by Marek Vasut's avatar Marek Vasut Committed by Ley Foon Tan
Browse files

nios2: Fix unused variable warning



Fix the following compiler splat by adding __maybe_unused annotation to
the variable. Using this particular annotation has the least ugly impact
on the code compared to using ifdeffery.

arch/nios2/kernel/setup.c: In function 'nios2_boot_init':
arch/nios2/kernel/setup.c:107:7: warning: unused variable 'cmdline_passed' [-Wunused-variable]
  char cmdline_passed[COMMAND_LINE_SIZE] = { 0, };
       ^

Signed-off-by: default avatarMarek Vasut <marex@denx.de>
Acked-by: default avatarLey Foon Tan <lftan@altera.com>
parent 6a13feb9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ asmlinkage void __init nios2_boot_init(unsigned r4, unsigned r5, unsigned r6,
				       unsigned r7)
{
	unsigned dtb_passed = 0;
	char cmdline_passed[COMMAND_LINE_SIZE] = { 0, };
	char cmdline_passed[COMMAND_LINE_SIZE] __maybe_unused = { 0, };

#if defined(CONFIG_NIOS2_PASS_CMDLINE)
	if (r4 == 0x534f494e) { /* r4 is magic NIOS */