linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Li zeming <zeming@nfschina.com>
To: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org
Cc: linux-hyperv@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-kernel@vger.kernel.org, Li zeming <zeming@nfschina.com>
Subject: [PATCH] asm-generic: Remove unnecessary ‘0’ values from guest_id
Date: Mon, 19 Sep 2022 09:51:36 +0800	[thread overview]
Message-ID: <20220919015136.3409-1-zeming@nfschina.com> (raw)

The file variable is assigned guest_id, it does not need to be initialized.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 include/asm-generic/mshyperv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h
index c05d2ce9b6cd..cd5ce86c218a 100644
--- a/include/asm-generic/mshyperv.h
+++ b/include/asm-generic/mshyperv.h
@@ -108,7 +108,7 @@ static inline u64 hv_do_rep_hypercall(u16 code, u16 rep_count, u16 varhead_size,
 static inline  __u64 generate_guest_id(__u64 d_info1, __u64 kernel_version,
 				       __u64 d_info2)
 {
-	__u64 guest_id = 0;
+	__u64 guest_id;
 
 	guest_id = (((__u64)HV_LINUX_VENDOR_ID) << 48);
 	guest_id |= (d_info1 << 48);
-- 
2.18.2


             reply	other threads:[~2022-09-19  1:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-19  1:51 Li zeming [this message]
2022-09-19 15:33 ` [PATCH] asm-generic: Remove unnecessary ‘0’ values from guest_id Vitaly Kuznetsov
2022-09-20  1:21   ` Li zeming

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=20220919015136.3409-1-zeming@nfschina.com \
    --to=zeming@nfschina.com \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wei.liu@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).