[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201710151501.wEITKg97%fengguang.wu@intel.com>
Date: Sun, 15 Oct 2017 16:08:04 +0800
From: kbuild test robot <lkp@...el.com>
To: Bhumika Goyal <bhumirks@...il.com>
Cc: kbuild-all@...org, julia.lawall@...6.fr, rjw@...ysocki.net,
lenb@...nel.org, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org, Bhumika Goyal <bhumirks@...il.com>
Subject: Re: [PATCH] ACPI: configfs: make config_item_type const
Hi Bhumika,
[auto build test WARNING on pm/linux-next]
[also build test WARNING on v4.14-rc4 next-20171013]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Bhumika-Goyal/ACPI-configfs-make-config_item_type-const/20171015-153321
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-x018-201742 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
drivers/acpi/acpi_configfs.c: In function 'acpi_table_make_item':
>> drivers/acpi/acpi_configfs.c:222:48: warning: passing argument 3 of 'config_item_init_type_name' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
config_item_init_type_name(&table->cfg, name, &acpi_table_type);
^
In file included from drivers/acpi/acpi_configfs.c:15:0:
include/linux/configfs.h:73:13: note: expected 'struct config_item_type *' but argument is of type 'const struct config_item_type *'
extern void config_item_init_type_name(struct config_item *item,
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/acpi/acpi_configfs.c: At top level:
>> drivers/acpi/acpi_configfs.c:253:15: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
.ci_type = &acpi_root_group_type,
^
drivers/acpi/acpi_configfs.c: In function 'acpi_configfs_init':
>> drivers/acpi/acpi_configfs.c:271:11: warning: passing argument 3 of 'configfs_register_default_group' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
&acpi_tables_type);
^
In file included from drivers/acpi/acpi_configfs.c:15:0:
include/linux/configfs.h:262:1: note: expected 'struct config_item_type *' but argument is of type 'const struct config_item_type *'
configfs_register_default_group(struct config_group *parent_group,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +222 drivers/acpi/acpi_configfs.c
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 212
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 213 static struct config_item *acpi_table_make_item(struct config_group *group,
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 214 const char *name)
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 215 {
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 216 struct acpi_table *table;
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 217
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 218 table = kzalloc(sizeof(*table), GFP_KERNEL);
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 219 if (!table)
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 220 return ERR_PTR(-ENOMEM);
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 221
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 @222 config_item_init_type_name(&table->cfg, name, &acpi_table_type);
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 223 return &table->cfg;
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 224 }
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 225
772bf1e2 drivers/acpi/acpi_configfs.c Jan Kiszka 2017-06-09 226 static void acpi_table_drop_item(struct config_group *group,
772bf1e2 drivers/acpi/acpi_configfs.c Jan Kiszka 2017-06-09 227 struct config_item *cfg)
772bf1e2 drivers/acpi/acpi_configfs.c Jan Kiszka 2017-06-09 228 {
772bf1e2 drivers/acpi/acpi_configfs.c Jan Kiszka 2017-06-09 229 struct acpi_table *table = container_of(cfg, struct acpi_table, cfg);
772bf1e2 drivers/acpi/acpi_configfs.c Jan Kiszka 2017-06-09 230
772bf1e2 drivers/acpi/acpi_configfs.c Jan Kiszka 2017-06-09 231 ACPI_INFO(("Host-directed Dynamic ACPI Table Unload"));
772bf1e2 drivers/acpi/acpi_configfs.c Jan Kiszka 2017-06-09 232 acpi_tb_unload_table(table->index);
772bf1e2 drivers/acpi/acpi_configfs.c Jan Kiszka 2017-06-09 233 }
772bf1e2 drivers/acpi/acpi_configfs.c Jan Kiszka 2017-06-09 234
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 235 struct configfs_group_operations acpi_table_group_ops = {
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 236 .make_item = acpi_table_make_item,
772bf1e2 drivers/acpi/acpi_configfs.c Jan Kiszka 2017-06-09 237 .drop_item = acpi_table_drop_item,
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 238 };
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 239
39f59af3 drivers/acpi/acpi_configfs.c Bhumika Goyal 2017-10-12 240 static const struct config_item_type acpi_tables_type = {
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 241 .ct_owner = THIS_MODULE,
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 242 .ct_group_ops = &acpi_table_group_ops,
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 243 };
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 244
39f59af3 drivers/acpi/acpi_configfs.c Bhumika Goyal 2017-10-12 245 static const struct config_item_type acpi_root_group_type = {
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 246 .ct_owner = THIS_MODULE,
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 247 };
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 248
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 249 static struct configfs_subsystem acpi_configfs = {
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 250 .su_group = {
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 251 .cg_item = {
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 252 .ci_namebuf = "acpi",
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 @253 .ci_type = &acpi_root_group_type,
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 254 },
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 255 },
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 256 .su_mutex = __MUTEX_INITIALIZER(acpi_configfs.su_mutex),
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 257 };
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 258
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 259 static int __init acpi_configfs_init(void)
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 260 {
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 261 int ret;
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 262 struct config_group *root = &acpi_configfs.su_group;
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 263
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 264 config_group_init(root);
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 265
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 266 ret = configfs_register_subsystem(&acpi_configfs);
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 267 if (ret)
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 268 return ret;
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 269
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 270 acpi_table_group = configfs_register_default_group(root, "table",
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 @271 &acpi_tables_type);
612bd01f drivers/acpi/configfs.c Octavian Purdila 2016-07-08 272 return PTR_ERR_OR_ZERO(acpi_table_group);
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 273 }
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 274 module_init(acpi_configfs_init);
0bf54fcd drivers/acpi/configfs.c Octavian Purdila 2016-07-08 275
:::::: The code at line 222 was first introduced by commit
:::::: 612bd01fc6e04c3ce9eb59587b4a7e4ebd6aff35 ACPI: add support for loading SSDTs via configfs
:::::: TO: Octavian Purdila <octavian.purdila@...el.com>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (28026 bytes)
Powered by blists - more mailing lists