diff mbox series

[2/2] ACPI: sysfs: apply ACPI_NONSTRING annotation

Message ID dcc3a018fb28899b277df2e154740d59d4e404af.1743754416.git.x0rw3ll@gmail.com
State New
Headers show
Series ACPI: apply ACPI_NONSTRING annotations | expand

Commit Message

Ahmed Salem April 4, 2025, 8:25 a.m. UTC
Mark ACPI_COPY_NAMESEG() destination char arrays with the ACPI_NONSTRING
annotation.

Signed-off-by: Ahmed Salem <x0rw3ll@gmail.com>

Comments

kernel test robot April 5, 2025, 7:04 a.m. UTC | #1
Hi Ahmed,

kernel test robot noticed the following build errors:

[auto build test ERROR on b3c623b9a94f7f798715c87e7a75ceeecf15292f]

url:    https://github.com/intel-lab-lkp/linux/commits/Ahmed-Salem/ACPI-PRM-apply-ACPI_NONSTRING-annotation/20250404-162651
base:   b3c623b9a94f7f798715c87e7a75ceeecf15292f
patch link:    https://lore.kernel.org/r/dcc3a018fb28899b277df2e154740d59d4e404af.1743754416.git.x0rw3ll%40gmail.com
patch subject: [PATCH 2/2] ACPI: sysfs: apply ACPI_NONSTRING annotation
config: i386-buildonly-randconfig-004-20250405 (https://download.01.org/0day-ci/archive/20250405/202504051453.3rcptolF-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250405/202504051453.3rcptolF-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504051453.3rcptolF-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/acpi/sysfs.c:310:30: error: expected ';' at end of declaration list
     310 |         char name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING;
         |                                     ^
         |                                     ;
   drivers/acpi/sysfs.c:312:49: error: expected ';' at end of declaration list
     312 |         char filename[ACPI_NAMESEG_SIZE+ACPI_INST_SIZE] ACPI_NONSTRING;
         |                                                        ^
         |                                                        ;
   2 errors generated.


vim +310 drivers/acpi/sysfs.c

   307	
   308	struct acpi_table_attr {
   309		struct bin_attribute attr;
 > 310		char name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING;
   311		int instance;
   312		char filename[ACPI_NAMESEG_SIZE+ACPI_INST_SIZE] ACPI_NONSTRING;
   313		struct list_head node;
   314	};
   315
diff mbox series

Patch

diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
index a48ebbf768f9..8a5af261129a 100644
--- a/drivers/acpi/sysfs.c
+++ b/drivers/acpi/sysfs.c
@@ -307,9 +307,9 @@  static struct kobject *hotplug_kobj;
 
 struct acpi_table_attr {
 	struct bin_attribute attr;
-	char name[ACPI_NAMESEG_SIZE];
+	char name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING;
 	int instance;
-	char filename[ACPI_NAMESEG_SIZE+ACPI_INST_SIZE];
+	char filename[ACPI_NAMESEG_SIZE+ACPI_INST_SIZE] ACPI_NONSTRING;
 	struct list_head node;
 };