From: Sudeep Holla <sudeep.holla@arm.com>
To: "xinglong.yang" <seanyang230@gmail.com>
Cc: xinglong.yang@cixtech.com, cristian.marussi@arm.com,
Sudeep Holla <sudeep.holla@arm.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] firmware: arm_scmi: Remove inappropriate error log.
Date: Thu, 2 Nov 2023 11:16:22 +0000 [thread overview]
Message-ID: <20231102111622.GC1391942@bogus> (raw)
In-Reply-To: <20231101081726.1163042-1-xinglong.yang@cixtech.com>
On Wed, Nov 01, 2023 at 04:17:26PM +0800, xinglong.yang wrote:
> The platform may not support fastchannel, but this is a legal
> operation.
>
> -Before this patch, when the platform not support fastchannel,
> goto err_xfer will print "Failed to ...". This log is misleading.
>
> -With this patch, when the fastchannel is not been supported,
> the "Failed to ..." log will be skipped.
>
In addition to your patch[1], I would just fix this by something like
below patch instead of this patch
Regards,
Sudeep
[1] https://lore.kernel.org/all/20231102075853.1320710-1-xinglong.yang@cixtech.com
-->8
diff --git i/drivers/firmware/arm_scmi/perf.c w/drivers/firmware/arm_scmi/perf.c
index f5a063b0b1ab..36cdcfaf4324 100644
--- i/drivers/firmware/arm_scmi/perf.c
+++ w/drivers/firmware/arm_scmi/perf.c
@@ -762,29 +762,36 @@ static void scmi_perf_domain_init_fc(const struct scmi_protocol_handle *ph,
u32 domain, struct scmi_fc_info **p_fc)
{
struct scmi_fc_info *fc;
+ struct perf_dom_info *dom;
+
+ dom = scmi_perf_domain_lookup(ph, domain);
+ if (IS_ERR(dom))
+ return;
fc = devm_kcalloc(ph->dev, PERF_FC_MAX, sizeof(*fc), GFP_KERNEL);
if (!fc)
return;
- ph->hops->fastchannel_init(ph, PERF_DESCRIBE_FASTCHANNEL,
- PERF_LEVEL_SET, 4, domain,
- &fc[PERF_FC_LEVEL].set_addr,
- &fc[PERF_FC_LEVEL].set_db);
-
ph->hops->fastchannel_init(ph, PERF_DESCRIBE_FASTCHANNEL,
PERF_LEVEL_GET, 4, domain,
&fc[PERF_FC_LEVEL].get_addr, NULL);
- ph->hops->fastchannel_init(ph, PERF_DESCRIBE_FASTCHANNEL,
- PERF_LIMITS_SET, 8, domain,
- &fc[PERF_FC_LIMIT].set_addr,
- &fc[PERF_FC_LIMIT].set_db);
-
ph->hops->fastchannel_init(ph, PERF_DESCRIBE_FASTCHANNEL,
PERF_LIMITS_GET, 8, domain,
&fc[PERF_FC_LIMIT].get_addr, NULL);
+ if (dom->info.set_perf)
+ ph->hops->fastchannel_init(ph, PERF_DESCRIBE_FASTCHANNEL,
+ PERF_LEVEL_SET, 4, domain,
+ &fc[PERF_FC_LEVEL].set_addr,
+ &fc[PERF_FC_LEVEL].set_db);
+
+ if (dom->set_limits)
+ ph->hops->fastchannel_init(ph, PERF_DESCRIBE_FASTCHANNEL,
+ PERF_LIMITS_SET, 8, domain,
+ &fc[PERF_FC_LIMIT].set_addr,
+ &fc[PERF_FC_LIMIT].set_db);
+
*p_fc = fc;
}
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-11-02 11:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-01 8:17 [PATCH] firmware: arm_scmi: Remove inappropriate error log xinglong.yang
2023-11-02 9:55 ` Fwd: " sean yang
2023-11-02 9:55 ` sean yang
2023-11-02 11:08 ` Sudeep Holla
2023-11-02 11:08 ` Sudeep Holla
2023-11-02 11:16 ` Sudeep Holla [this message]
2023-11-02 11:25 ` Cristian Marussi
2023-11-02 11:42 ` sean yang
-- strict thread matches above, loose matches on Subject: below --
2023-11-01 8:10 xinglong.yang
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=20231102111622.GC1391942@bogus \
--to=sudeep.holla@arm.com \
--cc=cristian.marussi@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=seanyang230@gmail.com \
--cc=xinglong.yang@cixtech.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.