Skip to contentSkip to conversation

sample/acrn: fix uninitialized_var.cocci warning

PATCH In review [email protected] 2 participants 2 messages Jun 14, 2023 – Jun 15, 2023 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 sample/acrn: fix uninitialized_var.cocci warning

Fix following coccicheck warning:

samples/acrn/vm-sample.c:53:6-7: WARNING this kind of initialization is deprecated. samples/acrn/vm-sample.c:54:6-7: WARNING this kind of initialization is deprecated. samples/acrn/vm-sample.c:37:5-6: WARNING this kind of initialization is deprecated.

---
 samples/acrn/vm-sample.c | 3 ---
 1 file changed, 3 deletions(-)
samples/acrn/vm-sample.c +0 -3
index 704402c64ea3..e60b2d0b7e20 100644
@@ -34,7 +34,6 @@ int is_running = 1;
 
 void vm_exit(int sig)
 {
-    sig = sig;
 
     is_running = 0;
     ioctl(hsm_fd, ACRN_IOCTL_PAUSE_VM, vmid);
@@ -50,8 +49,6 @@ int main(int argc, char **argv)
     struct acrn_io_request *io_req;
     struct acrn_ioreq_notify __attribute__((aligned(8))) notify;
 
-    argc = argc;
-    argv = argv;
 
     ret = posix_memalign(&guest_memory, 4096, GUEST_MEMORY_SIZE);
     if (ret < 0) {
#2 lore raw
Quoted 27 lines · On Wed, Jun 14, 2023 at 04:13:35PM +0800, [email protected] wrote:

Fix following coccicheck warning:

samples/acrn/vm-sample.c:53:6-7: WARNING this kind of initialization is deprecated.
samples/acrn/vm-sample.c:54:6-7: WARNING this kind of initialization is deprecated.
samples/acrn/vm-sample.c:37:5-6: WARNING this kind of initialization is deprecated.

---
 samples/acrn/vm-sample.c | 3 ---
 1 file changed, 3 deletions(-)
samples/acrn/vm-sample.c +0 -1
index 704402c64ea3..e60b2d0b7e20 100644
@@ -34,7 +34,6 @@ int is_running = 1;
 
 void vm_exit(int sig)
 {
-    sig = sig;
 
     is_running = 0;
     ioctl(hsm_fd, ACRN_IOCTL_PAUSE_VM, vmid);

samples/acrn/vm-sample.c int main(int argc, char **argv) · line 54

Quoted 8 lines
samples/acrn/vm-sample.c +0 -2
@@ -50,8 +49,6 @@ int main(int argc, char **argv)
     struct acrn_io_request *io_req;
     struct acrn_ioreq_notify __attribute__((aligned(8))) notify;
 
-    argc = argc;
-    argv = argv;
 
     ret = posix_memalign(&guest_memory, 4096, GUEST_MEMORY_SIZE);
     if (ret < 0) {

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.

You are receiving this message because of the following common error(s) as indicated below:

- Your patch is malformed (tabs converted to spaces, linewrapped, etc.) and can not be applied. Please read the file, Documentation/process/email-clients.rst in order to fix this.

- It looks like you did not use your "real" name for the patch on either the Signed-off-by: line, or the From: line (both of which have to match). Please read the kernel file, Documentation/process/submitting-patches.rst for how to do this correctly.

If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.

thanks,

greg k-h's patch email bot