Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp2472944rwb; Sun, 6 Aug 2023 19:55:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHQFLvlpFirnLg7gfzIISLQMBpJNgUW0MrFe2JDfiRT0crccNqvVZGxvtxQvbmcmzGZNkSv X-Received: by 2002:a05:6358:91a1:b0:135:89d6:22e9 with SMTP id j33-20020a05635891a100b0013589d622e9mr6945095rwa.13.1691376923180; Sun, 06 Aug 2023 19:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691376923; cv=none; d=google.com; s=arc-20160816; b=y+PBA/0YReaxUjNIlF/LOQ/4R1CX2yUk4R0VQZggHXj6rEdr0oymFNXywu2JiL47rQ oRUI7tHB0vuqFEMxMIudymJ52ZKj+VQinNVV9GWKK3xMrty4FbY45AEoAH6TGJOgLNky pWBxCnN4mowqkU9Mpg+sapOAKYluT65X2tqN1WnR7stJJGcOsK4aRf4xhcgGSpshAq0Q V6IxW6jf+bzOa3YNQW4Wd5VI+BdYP3zwD2MwCU+SvDRESQahPGL45husvE7qJrjjZRIg 6Jkq9mnNR5xIQG13Uc/Q6fNNQ+rrCcfi8HFvIcIMc9bwHOcQ09JFzleNjUswjfEqEN2q V1Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2tWbzG4ygxyxNO6PZJvvdH1ABkZoRrVsLh+hltX0Fe8=; fh=tYR0/3O20M2Vb127Q5PU6annTyorU6+tcRqpEXSy8nY=; b=AyLLJhqztglkNhQepKdnafzmMNewuAn382ToowRYFVqtc5a1wrLuU/k+UMv279mwzO XgFLQtdNBmrZ7751KFLCgnz+f4kpiTo/GPYusXtdy40c07ZDJtZX1MK/ceucoMrql9P3 Yo3frnM3fTPyVxvXVEwn4cNCI4QhB0I4WBs17Hb9NbVkZLVteJSgU/EZnSB6SnemVJlC +FOdBX1lZrdD9RMKloME71ToPIVegqZfbqhQgawCvK9MewzeVONR9/NEeVxv82L1cgi+ C0KHehC4AX8QRynMgNapfLzZ1NDblcTMDi+tmIFe8zfZHTeW+jS4/KNdUFmbO292tyrv mB5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cdcNIft7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020a63d043000000b00553854417e2si4747682pgi.244.2023.08.06.19.55.11; Sun, 06 Aug 2023 19:55:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cdcNIft7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229805AbjHGCeH (ORCPT + 99 others); Sun, 6 Aug 2023 22:34:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbjHGCeG (ORCPT ); Sun, 6 Aug 2023 22:34:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F081897 for ; Sun, 6 Aug 2023 19:34:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8CC8861305 for ; Mon, 7 Aug 2023 02:34:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D334C433C8; Mon, 7 Aug 2023 02:34:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691375645; bh=VAgi2CztxDruPAYpUNX48zokdXixjyqxS/hrrk1Od78=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cdcNIft7JOYsKV5VnSN916AvoJhkYFj7nDyzq3HVG5nEgzKDzqbqcm+xvtJPzgMxp /y1inm0W4e05t7rAYweMY14xzOU+lNU/vm6WJoZEDWyxEZErLZvAKDSAR8S3hMA0Pm 7/br/X8WgoZXue1WmCpJbx8pSeE+OlU93P+9LBIRtgRwB/TMkyE68Xg7uVyshDqrxg d6O2QqTgu0Gv7AbO1+M3e172SZP8JVoDglX8UaVGBa9of87hig91uPvgQ/8m5a+J8i GY4W89urt+gLNuTdG17eJ9iOG5hkYObwa0rs6pFf9rwK+VRMI+GQXUzLM6xrrkYu/8 oZJwRLKF6sgPw== Date: Mon, 7 Aug 2023 10:33:54 +0800 From: Shawn Guo To: "Peng Fan (OSS)" Cc: s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, aisheng.dong@nxp.com, alexander.stein@ew.tq-group.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan Subject: Re: [PATCH V5 3/9] firmware: imx: scu: drop return value check Message-ID: <20230807023354.GL151430@dragon> References: <20230731090449.2845997-1-peng.fan@oss.nxp.com> <20230731090449.2845997-4-peng.fan@oss.nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230731090449.2845997-4-peng.fan@oss.nxp.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 31, 2023 at 05:04:43PM +0800, Peng Fan (OSS) wrote: > From: Peng Fan > > For IMX_SC_MISC_FUNC_UNIQUE_ID, the scfw has a return value, > and the imx-scu always return 0. So drop the return value check. imx_scu_call_rpc() could fail for a few reason. Are we not want to check those possible failures? Shawn > > BTW, also initialize msg to 0. > > Signed-off-by: Peng Fan > --- > drivers/firmware/imx/imx-scu-soc.c | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) > > diff --git a/drivers/firmware/imx/imx-scu-soc.c b/drivers/firmware/imx/imx-scu-soc.c > index 2f32353de2c9..ef9103987e76 100644 > --- a/drivers/firmware/imx/imx-scu-soc.c > +++ b/drivers/firmware/imx/imx-scu-soc.c > @@ -33,20 +33,15 @@ struct imx_sc_msg_misc_get_soc_uid { > > static int imx_scu_soc_uid(u64 *soc_uid) > { > - struct imx_sc_msg_misc_get_soc_uid msg; > + struct imx_sc_msg_misc_get_soc_uid msg = { 0 }; > struct imx_sc_rpc_msg *hdr = &msg.hdr; > - int ret; > > hdr->ver = IMX_SC_RPC_VERSION; > hdr->svc = IMX_SC_RPC_SVC_MISC; > hdr->func = IMX_SC_MISC_FUNC_UNIQUE_ID; > hdr->size = 1; > > - ret = imx_scu_call_rpc(imx_sc_soc_ipc_handle, &msg, true); > - if (ret) { > - pr_err("%s: get soc uid failed, ret %d\n", __func__, ret); > - return ret; > - } > + imx_scu_call_rpc(imx_sc_soc_ipc_handle, &msg, true); > > *soc_uid = msg.uid_high; > *soc_uid <<= 32; > -- > 2.37.1 >