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 842A2C6FA8F for ; Thu, 24 Aug 2023 18:44:07 +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:Date:To:Cc:From:Subject:References: In-Reply-To:MIME-Version:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t56Hjx9j2+UHynaIdDwRwVaHYcHj+pmepksx0ry7Frc=; b=XLo779lVF6kYkF OdAzVdI7/MC4gmzh8tJgXlOD1z6W/izeQLyOKw/1sKRD1Dw6hiLWdgsIa/yhKr7lkktQ+7/dEawDf /D55/vIh0LiQv2fPReg+4FTbZs/99VbDJf3toeRozeenTI8T35WsCKvsadnHejxG0oiZcHBk+Z3tj 7vInnAOHrcsVG1M6nsPpfugHWl9t/0DlWUgPPaQjb3l2JabSx1DQ6ezWp/FJOcsVCfHTnCvKrWPoZ yQ51j5KbXtUIDkF0dB3e/2Zg5nGf1wKUdxzkBVBiX6MTlgJ5VeJyCIDznx4A31+1+TGYpYJ2s8/Bt 955hKf4jW2nKgTIDoF/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qZFJ0-003cNJ-0b; Thu, 24 Aug 2023 18:43:42 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qZFIx-003cKa-2E for linux-arm-kernel@lists.infradead.org; Thu, 24 Aug 2023 18:43:40 +0000 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 9F94A61E48; Thu, 24 Aug 2023 18:43:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 044DFC433C7; Thu, 24 Aug 2023 18:43:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692902618; bh=hyPhg2lvFHq0M/FUCI5u+mGZ2jcsghXBoKYtqtflqY8=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=XPE7QR2GgWieE3RFuMbgoUJ5Qd7rMSz4Hw+UwDJ2MlzgtLcCMiWOFN1wdeYCw1I3k mz8ED62pC8TeVzCUngqa6HkAxLtoKdCYQs5MhVwKvG50T3ePIRm1AIsFYRaGMd4eCq jdGEsBqCNdy7eDs6W+qczR37s02PyODrCPFrA89fJ1FOvFlFFLYGs3P8Ir3yGdC29r lWiFQDQkbVodQUX/Oxww1RCpKdKc3LYkKs+DeKtbV0817vJiy1BiosU/L357c0nxh8 7lI218ctgcTeVIF6hgPCH3U6S8Nx5lrJ5e6VN5Y9WHlnoXngmSWbyg/n/pXUDpWmpY IYjJHqitToD8w== Message-ID: <4870d94375cfdf6c0ba4d4b5cb3b6dc3.sboyd@kernel.org> MIME-Version: 1.0 In-Reply-To: References: <20230811161446.636253-1-cristian.marussi@arm.com> <20230811161446.636253-2-cristian.marussi@arm.com> <17bd83d833b59fd4f64eec433589fa55.sboyd@kernel.org> Subject: Re: [PATCH 1/6] firmware: arm_scmi: Simplify enable/disable Clock operations From: Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, sudeep.holla@arm.com, james.quinlan@broadcom.com, f.fainelli@gmail.com, vincent.guittot@linaro.org, etienne.carriere@linaro.org, peng.fan@oss.nxp.com, chuck.cannon@nxp.com, souvik.chakravarty@arm.com, nicola.mazzucato@arm.com, Michael Turquette , linux-clk@vger.kernel.org To: Cristian Marussi Date: Thu, 24 Aug 2023 11:43:35 -0700 User-Agent: alot/0.10 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230824_114339_786358_A5976936 X-CRM114-Status: GOOD ( 15.01 ) 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 Quoting Cristian Marussi (2023-08-24 07:25:21) > On Wed, Aug 23, 2023 at 11:01:17AM -0700, Stephen Boyd wrote: > > > > Perhaps we need a local variable to make it more readable. > > > > static int scmi_clk_enable(struct clk_hw *hw) > > { > > bool can_sleep = false; > > struct scmi_clk *clk = to_scmi_clk(hw); > > > > return scmi_proto_clk_ops->enable(clk->ph, clk->id, can_sleep); > > } > > > > This let's the reader quickly understand what the parameter means. I'm > > OK with adding the function parameter, but a plain 'true' or 'false' > > doesn't help with clarity. > > Thanks for the suggestion, it would help definitely making it more > readable, maybe a local define or enum could make it without even > putting anything on the stack. > Surely the compiler can optimize that so there isn't stack local storage for a local variable used as an argument to a function call? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel