The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: liujing <liujing@cmss.chinamobile.com>
Cc: thorsten.blum@toblux.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sample/acrn: Remove redundant assignment to itself
Date: Fri, 6 Dec 2024 07:22:03 +0100	[thread overview]
Message-ID: <2024120627-debtor-guise-2275@gregkh> (raw)
In-Reply-To: <20241206024127.2732-1-liujing@cmss.chinamobile.com>

On Fri, Dec 06, 2024 at 10:41:27AM +0800, liujing wrote:
> Delete the self-redundancy assignment for sig, argc, and argv.

But perhaps they are there for a reason?

> Signed-off-by: liujing <liujing@cmss.chinamobile.com>
> 
> diff --git a/samples/acrn/vm-sample.c b/samples/acrn/vm-sample.c
> index c61e0f91456e..f6d62d1659ef 100644
> --- a/samples/acrn/vm-sample.c
> +++ b/samples/acrn/vm-sample.c
> @@ -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;

If you remove these, odds are now you will have build errors/warnings,
right?  That's why someone added these.

sorry,

greg k-h

      reply	other threads:[~2024-12-06  6:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-06  2:41 [PATCH] sample/acrn: Remove redundant assignment to itself liujing
2024-12-06  6:22 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2024120627-debtor-guise-2275@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liujing@cmss.chinamobile.com \
    --cc=thorsten.blum@toblux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox