Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gcc-15: acpi: sprinkle random '__nonstring' crumbles around

This is not great: I'd much rather introduce a typedef that is a "ACPI
name byte buffer", and use that to mark these special 4-byte ACPI names
that do not use NUL termination.

But as noted in the previous commit ("gcc-15: make 'unterminated string
initialization' just a warning") gcc doesn't actually seem to support
that notion, so instead you have to just mark every single array
declaration individually.

So this is not pretty, but this gets rid of the bulk of the annoying
warnings during an allmodconfig build for me.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+5 -5
+2 -2
drivers/acpi/acpica/aclocal.h
··· 293 293 * expected_return_btypes - Allowed type(s) for the return value 294 294 */ 295 295 struct acpi_name_info { 296 - char name[ACPI_NAMESEG_SIZE]; 296 + char name[ACPI_NAMESEG_SIZE] __nonstring; 297 297 u16 argument_list; 298 298 u8 expected_btypes; 299 299 }; ··· 370 370 converted_object); 371 371 372 372 struct acpi_simple_repair_info { 373 - char name[ACPI_NAMESEG_SIZE]; 373 + char name[ACPI_NAMESEG_SIZE] __nonstring; 374 374 u32 unexpected_btypes; 375 375 u32 package_index; 376 376 acpi_object_converter object_converter;
+1 -1
drivers/acpi/acpica/nsrepair2.c
··· 25 25 return_object_ptr); 26 26 27 27 typedef struct acpi_repair_info { 28 - char name[ACPI_NAMESEG_SIZE]; 28 + char name[ACPI_NAMESEG_SIZE] __nonstring; 29 29 acpi_repair_function repair_function; 30 30 31 31 } acpi_repair_info;
+1 -1
drivers/acpi/tables.c
··· 396 396 } 397 397 398 398 /* All but ACPI_SIG_RSDP and ACPI_SIG_FACS: */ 399 - static const char table_sigs[][ACPI_NAMESEG_SIZE] __initconst = { 399 + static const char table_sigs[][ACPI_NAMESEG_SIZE] __initconst __nonstring = { 400 400 ACPI_SIG_BERT, ACPI_SIG_BGRT, ACPI_SIG_CPEP, ACPI_SIG_ECDT, 401 401 ACPI_SIG_EINJ, ACPI_SIG_ERST, ACPI_SIG_HEST, ACPI_SIG_MADT, 402 402 ACPI_SIG_MSCT, ACPI_SIG_SBST, ACPI_SIG_SLIT, ACPI_SIG_SRAT,
+1 -1
include/acpi/actbl.h
··· 66 66 ******************************************************************************/ 67 67 68 68 struct acpi_table_header { 69 - char signature[ACPI_NAMESEG_SIZE]; /* ASCII table signature */ 69 + char signature[ACPI_NAMESEG_SIZE] __nonstring; /* ASCII table signature */ 70 70 u32 length; /* Length of table in bytes, including this header */ 71 71 u8 revision; /* ACPI Specification minor version number */ 72 72 u8 checksum; /* To make sum of entire table == 0 */