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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 83F41C7EE24 for ; Mon, 15 May 2023 19:50:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7EF4D8478A; Mon, 15 May 2023 21:50:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=timesys.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=timesys-com.20221208.gappssmtp.com header.i=@timesys-com.20221208.gappssmtp.com header.b="Bi6+FtbT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BFC22865FB; Mon, 15 May 2023 21:50:35 +0200 (CEST) Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 01D21846AF for ; Mon, 15 May 2023 21:50:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=timesys.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=nathan.morrison@timesys.com Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-76c73f7443dso473764439f.0 for ; Mon, 15 May 2023 12:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timesys-com.20221208.gappssmtp.com; s=20221208; t=1684180231; x=1686772231; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=eaGsJbbZ0HglPpK7qmB8iqeShXhS8wyeXi5CNV3vLEE=; b=Bi6+FtbTV/1Py+g83D3qR9hqDEPNgGM5G+id4ybRP/zHuMMoXJw1ECa2lvbPz3Dq6O vbrpNdgc7mJTdvfu8l+TxUcM6kGG35T9FsMIYqDzqneKpGItKuAldu5cHuR2FRubZem2 rAC5bHom1gUd+yCcuXeD7WQM1SluqgWJaJe1NwdEF7q3hwsG0necFqAPvPk3P58N0gqL 7mvrcHtRjyw81xRpQKEh+JWlqKOkgHxtE0KFFMmpcRUF55OrhHOZWMy2qP87K0mKXhf/ v3N+XJWH0YihS9YnFsCMDb1dMiEyuD4xrBirvr5LtRPEA5Zv5Nh60z0qP1sYSjknn1O6 gRWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684180231; x=1686772231; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eaGsJbbZ0HglPpK7qmB8iqeShXhS8wyeXi5CNV3vLEE=; b=al+MBAaSLQFIGTM1fRJLMnPw4I6VFmG1Fjyq8uGvVim55bjclOn+O+bDfB/VqV+z+G z3gU3cjoWa+e193D8YR/yFqw2Fpmey0MFw+ou84cBwNAySTWcMiG6JTjWBBZa9fyQkyN dJhK05rDrqqcq/1Yhd4eIcB+CLbD+5QdjjI0WuWN1+h3rY8nzOXmJXugxy5e9dXMlc0D gvpSd5kCQKW5/7q54U2rE41eVNfjYnKX1ccMgW8Z0Eai0DmUIFS8xLI43Gl6rZgHTV9w M3WKwFlP9Bs7SetSBXD4QcQMZ793HacZh5g8BkOC1bQhs9LeZc0YhS0AiVpII9yOOGKz aMNw== X-Gm-Message-State: AC+VfDznGMsE3gwt/+mJMMk7HgpgKSHugXtFqejLVE5xQnOcVF7DyGjc 8+WgaMxVnghy9A15vdfs81zVsw== X-Google-Smtp-Source: ACHHUZ7/Ss4xfBrq1JIqm6q7KCM0UfEhP9iZS8yZl04d7bDmUzgP226jBNKpNVFyrtVMcP3qTegKnA== X-Received: by 2002:a92:d482:0:b0:337:3577:2862 with SMTP id p2-20020a92d482000000b0033735772862mr6792263ilg.16.1684180231692; Mon, 15 May 2023 12:50:31 -0700 (PDT) Received: from nathan-ideapad.. (d-75-76-53-11.oh.cpe.breezeline.net. [75.76.53.11]) by smtp.gmail.com with ESMTPSA id y13-20020a92d80d000000b00326ceaf3d96sm7076604ilm.71.2023.05.15.12.50.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 12:50:31 -0700 (PDT) From: Nathan Barrett-Morrison To: Cc: nathan.morrison@timesys.com, greg.malysa@timesys.com, ryan.matthews@timesys.com, trini@konsulko.com, Lukasz Majewski , Sean Anderson , u-boot@lists.denx.de Subject: [PATCH] drivers: clk: Adjust temp var data type to properly match that of struct clk_ops Date: Mon, 15 May 2023 15:49:58 -0400 Message-Id: <20230515195005.1961495-1-nathan.morrison@timesys.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean In commit 5c5992cb90cf ("clk: Add debugging for return values"), a temporary storage variable was added around the ops->get_rate() call inside clk_get_rate(), so that the result could be passed through log_ret. This temporary variable was declared as an int, yet when we look in struct clk_ops, we can see this needs to be a ulong: ulong (*get_rate)(struct clk *clk); This was resulting in a signed to unsigned casting error on our builds, where a clock value of 0xABCDABCD was being incorrectly cast to 0xFFFFFFFFABCDABCD. Signed-off-by: Nathan Barrett-Morrison --- drivers/clk/clk-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index dc3e9d6a26..4e3e3b8537 100644 --- a/drivers/clk/clk-uclass.c +++ b/drivers/clk/clk-uclass.c @@ -471,7 +471,7 @@ void clk_free(struct clk *clk) ulong clk_get_rate(struct clk *clk) { const struct clk_ops *ops; - int ret; + ulong ret; debug("%s(clk=%p)\n", __func__, clk); if (!clk_valid(clk)) -- 2.34.1