All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Xin Li <xin@zytor.com>
Cc: xen-devel@lists.xenproject.org
Subject: [bug report] x86/xen/msr: Remove calling native_{read,write}_msr{,_safe}() in pmu_msr_{read,write}()
Date: Thu, 8 May 2025 09:20:19 +0300	[thread overview]
Message-ID: <aBxNI_Q0-MhtBSZG@stanley.mountain> (raw)

Hello Xin Li (Intel),

Commit 0cb6f4128a7d ("x86/xen/msr: Remove calling
native_{read,write}_msr{,_safe}() in pmu_msr_{read,write}()") from
Apr 27, 2025 (linux-next), leads to the following Smatch static
checker warning:

	arch/x86/xen/enlighten_pv.c:1168 xen_read_msr_safe()
	error: uninitialized symbol 'err'.

arch/x86/xen/enlighten_pv.c
    1163 static int xen_read_msr_safe(u32 msr, u64 *val)
    1164 {
    1165         int err;
    1166 
    1167         *val = xen_do_read_msr(msr, &err);
                                              ^^^
The first return in xen_do_read_msr() doesn't set *err.

--> 1168         return err;
    1169 }

regards,
dan carpenter


                 reply	other threads:[~2025-05-08  6:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=aBxNI_Q0-MhtBSZG@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=xin@zytor.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.