From patchwork Fri Apr 21 17:50:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 675869 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp989419wrs; Fri, 21 Apr 2023 10:52:20 -0700 (PDT) X-Google-Smtp-Source: AKy350Z2BjaZ0bCqpwhD6WkrafpxRBt7sxtQIYHsve2zuZf8miSavzBF6FEHAw1VessW6Xa8YZSV X-Received: by 2002:a17:902:ec8c:b0:1a6:9f9b:1327 with SMTP id x12-20020a170902ec8c00b001a69f9b1327mr7171990plg.45.1682099540050; Fri, 21 Apr 2023 10:52:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682099540; cv=none; d=google.com; s=arc-20160816; b=o0KytIxe7yhwYbtTdR7ljIOYAJEVVBwfu2PfLuZZdUmP2PN8I5rCOAr3tvy+wBqABK YciJw/06nw92iMjS85NmBJRMSqoPrdSoLG2gSjPbX5AoxJZSZee+lX0S2e8US2Z/iK2q eRm55JMsfK5zKuImT77+o9xUsNb4KQoslXWG5RvSm1pntDaGd3uIO/ZQBvvaparvePt2 jbhyPzcN9ydw1ijk/DtAY/2khA13pgYLj75Mvk6v0mMNlsH+nItL910pPsKVtp6mrjjp e9HhMmxzHKp1SJNACVPZGQwC57e9EeitP192tJyflvPkXQogMkQmKIBPK0s+P7kniC7U 3eHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ic9B31eSPuTHLg5dKtybI1SMa/YD3tQdPCS7eX5J8pM=; b=xGPH4W9+pSsEphfPc98jHHRQ54X5VmAEDTRvMy8hXVSsaR058QHi56zClPnIuFUmBe mbWqsmzr7Vle26AWdYl+TXgonHvCZnupBTRcEUz3qO3SCb4EBuNmVrSVmYx258T8EYVK 9TRjM3ZY0rwKEGVqlbdPBHTa/7LwGs9RCufGz1znp8Hpog7p3pJCa8VyXwHlljg85ESu HtK8DobggseR0eawibtmQNNuRaRmxAZcTcU/Ay5GoiVxhwvQM6VPeREQ+zPs8wo6XgGm cJqdJiRLLTp7LaadZrob0L9ES3Xa6m+hkLnHEzZ41KdIge5IC9ApyegjUERHZ5GqLZP8 +u4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="TON/uoB6"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id q8-20020a170902eb8800b001a6933b3a67si4751837plg.531.2023.04.21.10.52.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:52:20 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="TON/uoB6"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6B34C863D8; Fri, 21 Apr 2023 19:51:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="TON/uoB6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9614486356; Fri, 21 Apr 2023 19:50:54 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) (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 0439186358 for ; Fri, 21 Apr 2023 19:50:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=vladimir.zapolskiy@linaro.org Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2a8a4cbe473so883381fa.1 for ; Fri, 21 Apr 2023 10:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682099451; x=1684691451; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ic9B31eSPuTHLg5dKtybI1SMa/YD3tQdPCS7eX5J8pM=; b=TON/uoB6+6C9PzR9LlR8FlOWIDwRrYQGxqfn7C16ZGYIi8e/JQRZKUWo5t9YB8kz9r L7BhPNDyTw9CqElvYSiLrcY9aI9MbS5OUd9Q90qS+CkL0MIBBe8hp/vpECP8ODIXoar8 0lvyzQQLn1OWngmW2lYa6lb1+hvu0TSijN2cwm/+rs0G4w3ejwSh3B9N2FvJttzA/+hY wYr5aHJKu8DOXSsj4hNUWWOWnGHrNuJlNgZkaaksYiHeKJlPu9Qs2Kuyz/3VG5xrO6Ze gRrGv82uOhdkthgcG7aOXGHnmffP4kRyB0S+usnTZVLn6pAWV8fcbCXem3+gFuJqAJP/ RLFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682099451; x=1684691451; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ic9B31eSPuTHLg5dKtybI1SMa/YD3tQdPCS7eX5J8pM=; b=RBESztbe1WRVG2kV9ppK3knnIJyOXVnaj3w1kSZbrKV4L0dNqbs46gC36Oz6/p+Syq 3tG+g9BeHdMUs/WaVrD5YfaVpOUXeUIJa67s09uU/8/MPMDWs1Rx5AuZWtRp0419vJan PBsRwhKVF5AG+nbdzHu2bdH0EVsNhg6wYvHv0TUjYkfKq/DsYbt78iqmlf4w49myRe+B z4avHECvxPwSDL1ENRos2ChytrQBdlHfJMO79qUxbuR55jE7aBd9hmRH/DY2ylspuHBT 5a89/DnI3BaXudMETZQkwxm1sFmJLTyTUQwlgswKs5EsTsisTVP/X0Uumw/I+FYc9gwL Mq8A== X-Gm-Message-State: AAQBX9esLFXtOiY5OC3kXV3St6zMJiQzvwc27D0J066eoEhdu4qe27FI /9UNGh869GzlOtRDcSscHVHROw== X-Received: by 2002:a2e:2a05:0:b0:2a9:efdb:4188 with SMTP id q5-20020a2e2a05000000b002a9efdb4188mr1331427ljq.3.1682099451698; Fri, 21 Apr 2023 10:50:51 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id u24-20020a2e8558000000b002a7aa25c3b6sm674256ljj.88.2023.04.21.10.50.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:50:51 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass , Ramon Fried , Dzmitry Sankouski Cc: Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v3 6/9] serial: msm-geni: fix a compile time warning from msm_serial_setbrg() Date: Fri, 21 Apr 2023 20:50:38 +0300 Message-Id: <20230421175041.275566-7-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230421175041.275566-1-vladimir.zapolskiy@linaro.org> References: <20230421175041.275566-1-vladimir.zapolskiy@linaro.org> MIME-Version: 1.0 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 A compiler warns about a missing function prototype, which is valid and fixed by converting the function into static one, also fix interleaved local variable declarations and assignments. Signed-off-by: Vladimir Zapolskiy Fixes: 324df15a292e ("serial: qcom: add support for GENI serial driver") Reviewed-by: Konrad Dybcio --- drivers/serial/serial_msm_geni.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/serial/serial_msm_geni.c b/drivers/serial/serial_msm_geni.c index 55dd9188a56c..3a200f45a6ce 100644 --- a/drivers/serial/serial_msm_geni.c +++ b/drivers/serial/serial_msm_geni.c @@ -238,13 +238,13 @@ static inline void geni_serial_baud(phys_addr_t base_address, u32 clk_div, writel(s_clk_cfg, base_address + GENI_SER_S_CLK_CFG); } -int msm_serial_setbrg(struct udevice *dev, int baud) +static int msm_serial_setbrg(struct udevice *dev, int baud) { struct msm_serial_data *priv = dev_get_priv(dev); + u64 clk_rate; + u32 clk_div; priv->baud = baud; - u32 clk_div; - u64 clk_rate; clk_rate = get_clk_div_rate(baud, UART_OVERSAMPLING, &clk_div); geni_serial_set_clock_rate(dev, clk_rate);