From: Dan Carpenter <dan.carpenter@linaro.org>
To: Robin Murphy <robin.murphy@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Subject: [bug report] perf: Add driver for Arm NI-700 interconnect PMU
Date: Wed, 11 Sep 2024 10:35:23 +0300 [thread overview]
Message-ID: <3ef9d6a4-bb08-4496-9d20-4781fa4c8e8a@stanley.mountain> (raw)
Hello Robin Murphy,
Commit 4d5a7680f2b4 ("perf: Add driver for Arm NI-700 interconnect
PMU") from Sep 4, 2024 (linux-next), leads to the following Smatch
static checker warning:
drivers/perf/arm-ni.c:726 arm_ni_pmu_online_cpu() warn: 'cd' was set to NULL
drivers/perf/arm-ni.c:738 arm_ni_pmu_offline_cpu() warn: 'cd' was set to NULL
drivers/perf/arm-ni.c
719 static int arm_ni_pmu_online_cpu(unsigned int cpu, struct hlist_node *cpuhp_node)
720 {
721 struct arm_ni_cd *cd;
722 int node;
723
724 cd = hlist_entry_safe(cpuhp_node, struct arm_ni_cd, cpuhp_node);
725 node = dev_to_node(cd_to_ni(cd)->dev);
There isn't any point in using the _safe() version of hlist_entry() unless we're
going to check for NULL.
--> 726 if (cpu_to_node(cd->cpu) != node && cpu_to_node(cpu) == node)
727 arm_ni_pmu_migrate(cd, cpu);
728 return 0;
729 }
regards,
dan carpenter
next reply other threads:[~2024-09-11 7:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-11 7:35 Dan Carpenter [this message]
2024-09-11 12:25 ` [bug report] perf: Add driver for Arm NI-700 interconnect PMU Robin Murphy
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=3ef9d6a4-bb08-4496-9d20-4781fa4c8e8a@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=robin.murphy@arm.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