From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4A776C4332F for ; Thu, 2 Nov 2023 11:18:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CFlJtgbVLZAxPCCAt1bjIOJgsZPd/FCIQWTJ5GqLPw0=; b=JogapJVUyStpsv D1EUqq3YuDRKmn2gSD8QVG9Ff8pwz7tbPriQ6vulH4sxbkwfA9/sT0htEphKnQA/BgJKwLg/J4VWt Cl62KYe7g2lrhW0mYkpe/1oit0YEwr1CsmkTgPUzW9lRHJgDjbj+7EXxpSEgG0mgpAuFnbmAJf1oy lE/c9ZxipZdT6CndUwjHkplAiH7x8Gs1FKRc7+B7dhkivmcm2WAvhQxD9YiltKi3Ss4YMzFGmeSZZ VbhSuUaS1VZjhOtmgzZo7BcuYvxjPzpQS3DHOnmC2b9nvpFrdsRLPCExLNKFNvDO628o7rzDnwS/w x7TwlOAxmbAnedCLUvgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qyVi5-009KoV-21; Thu, 02 Nov 2023 11:18:01 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qyVi2-009Kny-1a for linux-arm-kernel@lists.infradead.org; Thu, 02 Nov 2023 11:18:00 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 17F372F4; Thu, 2 Nov 2023 04:18:37 -0700 (PDT) Received: from bogus (unknown [10.57.82.56]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 041153F67D; Thu, 2 Nov 2023 04:17:53 -0700 (PDT) Date: Thu, 2 Nov 2023 11:16:22 +0000 From: Sudeep Holla To: "xinglong.yang" Cc: xinglong.yang@cixtech.com, cristian.marussi@arm.com, Sudeep Holla , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] firmware: arm_scmi: Remove inappropriate error log. Message-ID: <20231102111622.GC1391942@bogus> References: <20231101081726.1163042-1-xinglong.yang@cixtech.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231101081726.1163042-1-xinglong.yang@cixtech.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231102_041758_580447_3D868F74 X-CRM114-Status: GOOD ( 13.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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