From: kernel test robot <yujie.liu@intel.com>
To: Kan Liang <kan.liang@linux.intel.com>
Cc: <kbuild-all@lists.01.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>
Subject: arch/x86/events/intel/uncore.c:847:4: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
Date: Thu, 25 Nov 2021 09:04:23 +0800 [thread overview]
Message-ID: <6b79948d-5e22-c8f7-74a5-37fb345b0e40@intel.com> (raw)
In-Reply-To: <202111202115.uSvWnxj7-lkp@intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a90af8f15bdc9449ee2d24e1d73fa3f7e8633f81
commit: d6c754130435ab786711bed75d04a2388a6b4da8 perf/x86/intel/uncore: Generic support for the MSR type of uncore blocks
date: 8 months ago
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> arch/x86/events/intel/uncore.c:847:4: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
sprintf(pmu->name, "uncore_type_%u", type->type_id);
^
>> arch/x86/events/intel/uncore.c:849:4: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
sprintf(pmu->name, "uncore_type_%u_%d",
^
>> arch/x86/events/intel/uncore.c:849:4: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
sprintf(pmu->name, "uncore_type_%u_%d",
^
vim +847 arch/x86/events/intel/uncore.c
314d9f63f38509 arch/x86/kernel/cpu/perf_event_intel_uncore.c Yan, Zheng 2012-09-10 836
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 837 static void uncore_get_pmu_name(struct intel_uncore_pmu *pmu)
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 838 {
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 839 struct intel_uncore_type *type = pmu->type;
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 840
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 841 /*
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 842 * No uncore block name in discovery table.
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 843 * Use uncore_type_&typeid_&boxid as name.
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 844 */
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 845 if (!type->name) {
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 846 if (type->num_boxes == 1)
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 @847 sprintf(pmu->name, "uncore_type_%u", type->type_id);
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 848 else {
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 @849 sprintf(pmu->name, "uncore_type_%u_%d",
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 850 type->type_id, type->box_ids[pmu->pmu_idx]);
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 851 }
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 852 return;
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 853 }
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 854
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 855 if (type->num_boxes == 1) {
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 856 if (strlen(type->name) > 0)
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 857 sprintf(pmu->name, "uncore_%s", type->name);
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 858 else
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 859 sprintf(pmu->name, "uncore");
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 860 } else
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 861 sprintf(pmu->name, "uncore_%s_%d", type->name, pmu->pmu_idx);
d6c754130435ab arch/x86/events/intel/uncore.c Kan Liang 2021-03-17 862
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
parent reply other threads:[~2021-11-25 1:06 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <202111202115.uSvWnxj7-lkp@intel.com>]
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=6b79948d-5e22-c8f7-74a5-37fb345b0e40@intel.com \
--to=yujie.liu@intel.com \
--cc=kan.liang@linux.intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®