oxnas: 5.15: fix mangle bootargs patch compilation warning
authorChristian Marangi <ansuelsmth@gmail.com>
Sat, 6 May 2023 20:50:48 +0000 (22:50 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Fri, 12 May 2023 01:15:38 +0000 (03:15 +0200)
commitb8345bb5d492a911c2143528ca443a5c4f04a9a3
treecfbff5ef9c3cb5852af83f0082f0bed8e2f563d2
parentb786d744effff777ffa1fd478718ab9a7ab8a2e7
oxnas: 5.15: fix mangle bootargs patch compilation warning

Fix mangle bootargs patch compilation warning due to defined but not
used functions.
Fix compilation warning:
arch/arm/boot/compressed/atags_to_fdt.c:63:17: error: 'get_cell_size' defined but not used [-Werror=unused-function]
   63 | static uint32_t get_cell_size(const void *fdt)
      |                 ^~~~~~~~~~~~~
arch/arm/boot/compressed/atags_to_fdt.c:43:12: error: 'setprop_cell' defined but not used [-Werror=unused-function]
   43 | static int setprop_cell(void *fdt, const char *node_path,
      |            ^~~~~~~~~~~~
arch/arm/boot/compressed/atags_to_fdt.c:25:12: error: 'setprop' defined but not used [-Werror=unused-function]
   25 | static int setprop(void *fdt, const char *node_path, const char *property,
      |            ^~~~~~~
arch/arm/boot/compressed/atags_to_fdt.c: In function 'atags_to_fdt':
arch/arm/boot/compressed/atags_to_fdt.c:207:18: error: unused variable 'memsize' [-Werror=unused-variable]
  207 |         int ret, memsize;
      |                  ^~~~~~~
arch/arm/boot/compressed/atags_to_fdt.c:206:13: error: unused variable 'memcount' [-Werror=unused-variable]
  206 |         int memcount = 0;
      |             ^~~~~~~~
arch/arm/boot/compressed/atags_to_fdt.c:205:16: error: unused variable 'mem_reg_property' [-Werror=unused-variable]
  205 |         __be32 mem_reg_property[2 * 2 * NR_BANKS];
      |                ^~~~~~~~~~~~~~~~
arch/arm/boot/compressed/atags_to_fdt.c: At top level:
arch/arm/boot/compressed/atags_to_fdt.c:174:13: error: 'hex_str' defined but not used [-Werror=unused-function]
  174 | static void hex_str(char *out, uint32_t value)
      |             ^~~~~~~
cc1: all warnings being treated as errors

Also make some variable const to fix compilation warning:
arch/arm/boot/compressed/atags_to_fdt.c: In function 'append_rootblock':
arch/arm/boot/compressed/atags_to_fdt.c:91:13: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
   91 |         ptr = str - 1;
      |             ^

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
target/linux/oxnas/patches-5.15/996-generic-Mangle-bootloader-s-kernel-arguments.patch