* [PATCH] Staging: greybus: Make string array const
@ 2017-08-21 22:15 Eames Trinh
2017-08-22 21:40 ` kbuild test robot
2017-08-22 21:42 ` kbuild test robot
0 siblings, 2 replies; 3+ messages in thread
From: Eames Trinh @ 2017-08-21 22:15 UTC (permalink / raw)
To: gregkh; +Cc: johan, elder, linux-kernel, Eames Trinh
Added const to string array.
Signed-off-by: Eames Trinh <eamestrinh@gmail.com>
---
drivers/staging/greybus/audio_manager_module.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/greybus/audio_manager_module.c b/drivers/staging/greybus/audio_manager_module.c
index adc16977452d..73a3e2decb3a 100644
--- a/drivers/staging/greybus/audio_manager_module.c
+++ b/drivers/staging/greybus/audio_manager_module.c
@@ -159,7 +159,7 @@ static void send_add_uevent(struct gb_audio_manager_module *module)
char ip_devices_string[64];
char op_devices_string[64];
- char *envp[] = {
+ const char *envp[] = {
name_string,
vid_string,
pid_string,
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Staging: greybus: Make string array const
2017-08-21 22:15 [PATCH] Staging: greybus: Make string array const Eames Trinh
@ 2017-08-22 21:40 ` kbuild test robot
2017-08-22 21:42 ` kbuild test robot
1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2017-08-22 21:40 UTC (permalink / raw)
To: Eames Trinh; +Cc: kbuild-all, gregkh, johan, elder, linux-kernel, Eames Trinh
[-- Attachment #1: Type: text/plain, Size: 4005 bytes --]
Hi Eames,
[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.13-rc6 next-20170822]
[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/Eames-Trinh/Staging-greybus-Make-string-array-const/20170823-042339
config: i386-allmodconfig (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=i386
All errors (new ones prefixed by >>):
drivers/staging/greybus/audio_manager_module.c: In function 'send_add_uevent':
>> drivers/staging/greybus/audio_manager_module.c:181:46: error: passing argument 3 of 'kobject_uevent_env' from incompatible pointer type [-Werror=incompatible-pointer-types]
kobject_uevent_env(&module->kobj, KOBJ_ADD, envp);
^~~~
In file included from drivers/staging/greybus/audio_manager.h:12:0,
from drivers/staging/greybus/audio_manager_module.c:11:
include/linux/kobject.h:218:5: note: expected 'char **' but argument is of type 'const char **'
int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/kobject_uevent_env +181 drivers/staging/greybus/audio_manager_module.c
8db00736 Svetlin Ankov 2016-01-13 152
8db00736 Svetlin Ankov 2016-01-13 153 static void send_add_uevent(struct gb_audio_manager_module *module)
8db00736 Svetlin Ankov 2016-01-13 154 {
8db00736 Svetlin Ankov 2016-01-13 155 char name_string[128];
8db00736 Svetlin Ankov 2016-01-13 156 char vid_string[64];
8db00736 Svetlin Ankov 2016-01-13 157 char pid_string[64];
d0af1bd5 Pankaj Bharadiya 2016-10-16 158 char intf_id_string[64];
a9234bfd Vaibhav Agarwal 2016-03-30 159 char ip_devices_string[64];
a9234bfd Vaibhav Agarwal 2016-03-30 160 char op_devices_string[64];
8db00736 Svetlin Ankov 2016-01-13 161
7be2c2a6 Eames Trinh 2017-08-22 162 const char *envp[] = {
8db00736 Svetlin Ankov 2016-01-13 163 name_string,
8db00736 Svetlin Ankov 2016-01-13 164 vid_string,
8db00736 Svetlin Ankov 2016-01-13 165 pid_string,
d0af1bd5 Pankaj Bharadiya 2016-10-16 166 intf_id_string,
a9234bfd Vaibhav Agarwal 2016-03-30 167 ip_devices_string,
a9234bfd Vaibhav Agarwal 2016-03-30 168 op_devices_string,
8db00736 Svetlin Ankov 2016-01-13 169 NULL
8db00736 Svetlin Ankov 2016-01-13 170 };
8db00736 Svetlin Ankov 2016-01-13 171
8db00736 Svetlin Ankov 2016-01-13 172 snprintf(name_string, 128, "NAME=%s", module->desc.name);
8db00736 Svetlin Ankov 2016-01-13 173 snprintf(vid_string, 64, "VID=%d", module->desc.vid);
8db00736 Svetlin Ankov 2016-01-13 174 snprintf(pid_string, 64, "PID=%d", module->desc.pid);
d0af1bd5 Pankaj Bharadiya 2016-10-16 175 snprintf(intf_id_string, 64, "INTF_ID=%d", module->desc.intf_id);
a9234bfd Vaibhav Agarwal 2016-03-30 176 snprintf(ip_devices_string, 64, "I/P DEVICES=0x%X",
a9234bfd Vaibhav Agarwal 2016-03-30 177 module->desc.ip_devices);
a9234bfd Vaibhav Agarwal 2016-03-30 178 snprintf(op_devices_string, 64, "O/P DEVICES=0x%X",
a9234bfd Vaibhav Agarwal 2016-03-30 179 module->desc.op_devices);
8db00736 Svetlin Ankov 2016-01-13 180
8db00736 Svetlin Ankov 2016-01-13 @181 kobject_uevent_env(&module->kobj, KOBJ_ADD, envp);
8db00736 Svetlin Ankov 2016-01-13 182 }
8db00736 Svetlin Ankov 2016-01-13 183
:::::: The code at line 181 was first introduced by commit
:::::: 8db00736d365b75d6af5dfd4a2673a1453fff4b7 greybus: audio: Add Audio Manager
:::::: TO: Svetlin Ankov <ankov_svetlin@projectara.com>
:::::: CC: Greg Kroah-Hartman <gregkh@google.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 60565 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Staging: greybus: Make string array const
2017-08-21 22:15 [PATCH] Staging: greybus: Make string array const Eames Trinh
2017-08-22 21:40 ` kbuild test robot
@ 2017-08-22 21:42 ` kbuild test robot
1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2017-08-22 21:42 UTC (permalink / raw)
To: Eames Trinh; +Cc: kbuild-all, gregkh, johan, elder, linux-kernel, Eames Trinh
[-- Attachment #1: Type: text/plain, Size: 4011 bytes --]
Hi Eames,
[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.13-rc6 next-20170822]
[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/Eames-Trinh/Staging-greybus-Make-string-array-const/20170823-042339
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=xtensa
All warnings (new ones prefixed by >>):
drivers/staging//greybus/audio_manager_module.c: In function 'send_add_uevent':
>> drivers/staging//greybus/audio_manager_module.c:181:2: warning: passing argument 3 of 'kobject_uevent_env' from incompatible pointer type
kobject_uevent_env(&module->kobj, KOBJ_ADD, envp);
^
In file included from drivers/staging//greybus/audio_manager.h:12:0,
from drivers/staging//greybus/audio_manager_module.c:11:
include/linux/kobject.h:218:5: note: expected 'char **' but argument is of type 'const char **'
int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
^
vim +/kobject_uevent_env +181 drivers/staging//greybus/audio_manager_module.c
8db00736 Svetlin Ankov 2016-01-13 152
8db00736 Svetlin Ankov 2016-01-13 153 static void send_add_uevent(struct gb_audio_manager_module *module)
8db00736 Svetlin Ankov 2016-01-13 154 {
8db00736 Svetlin Ankov 2016-01-13 155 char name_string[128];
8db00736 Svetlin Ankov 2016-01-13 156 char vid_string[64];
8db00736 Svetlin Ankov 2016-01-13 157 char pid_string[64];
d0af1bd5 Pankaj Bharadiya 2016-10-16 158 char intf_id_string[64];
a9234bfd Vaibhav Agarwal 2016-03-30 159 char ip_devices_string[64];
a9234bfd Vaibhav Agarwal 2016-03-30 160 char op_devices_string[64];
8db00736 Svetlin Ankov 2016-01-13 161
7be2c2a6 Eames Trinh 2017-08-22 162 const char *envp[] = {
8db00736 Svetlin Ankov 2016-01-13 163 name_string,
8db00736 Svetlin Ankov 2016-01-13 164 vid_string,
8db00736 Svetlin Ankov 2016-01-13 165 pid_string,
d0af1bd5 Pankaj Bharadiya 2016-10-16 166 intf_id_string,
a9234bfd Vaibhav Agarwal 2016-03-30 167 ip_devices_string,
a9234bfd Vaibhav Agarwal 2016-03-30 168 op_devices_string,
8db00736 Svetlin Ankov 2016-01-13 169 NULL
8db00736 Svetlin Ankov 2016-01-13 170 };
8db00736 Svetlin Ankov 2016-01-13 171
8db00736 Svetlin Ankov 2016-01-13 172 snprintf(name_string, 128, "NAME=%s", module->desc.name);
8db00736 Svetlin Ankov 2016-01-13 173 snprintf(vid_string, 64, "VID=%d", module->desc.vid);
8db00736 Svetlin Ankov 2016-01-13 174 snprintf(pid_string, 64, "PID=%d", module->desc.pid);
d0af1bd5 Pankaj Bharadiya 2016-10-16 175 snprintf(intf_id_string, 64, "INTF_ID=%d", module->desc.intf_id);
a9234bfd Vaibhav Agarwal 2016-03-30 176 snprintf(ip_devices_string, 64, "I/P DEVICES=0x%X",
a9234bfd Vaibhav Agarwal 2016-03-30 177 module->desc.ip_devices);
a9234bfd Vaibhav Agarwal 2016-03-30 178 snprintf(op_devices_string, 64, "O/P DEVICES=0x%X",
a9234bfd Vaibhav Agarwal 2016-03-30 179 module->desc.op_devices);
8db00736 Svetlin Ankov 2016-01-13 180
8db00736 Svetlin Ankov 2016-01-13 @181 kobject_uevent_env(&module->kobj, KOBJ_ADD, envp);
8db00736 Svetlin Ankov 2016-01-13 182 }
8db00736 Svetlin Ankov 2016-01-13 183
:::::: The code at line 181 was first introduced by commit
:::::: 8db00736d365b75d6af5dfd4a2673a1453fff4b7 greybus: audio: Add Audio Manager
:::::: TO: Svetlin Ankov <ankov_svetlin@projectara.com>
:::::: CC: Greg Kroah-Hartman <gregkh@google.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 50375 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-22 21:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-21 22:15 [PATCH] Staging: greybus: Make string array const Eames Trinh
2017-08-22 21:40 ` kbuild test robot
2017-08-22 21:42 ` kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox