From patchwork Wed Apr 12 14:30:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 672641 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:184:0:0:0:0 with SMTP id p4csp370227wrx; Wed, 12 Apr 2023 07:31:31 -0700 (PDT) X-Google-Smtp-Source: AKy350a2ZLwm1VyXC/E3m5WSdjO9pW6ZMk9izqbZ9nh6Mnra6tVPMvVGO/+05EBf7XMeyWxoLBPR X-Received: by 2002:a05:622a:1452:b0:3e6:9879:afeb with SMTP id v18-20020a05622a145200b003e69879afebmr22705906qtx.48.1681309891419; Wed, 12 Apr 2023 07:31:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681309891; cv=none; d=google.com; s=arc-20160816; b=hsU9/5Ozmi2DPECnUFubUxNKwbQVggIY1aaQ5DtEUHrLW3br+1vDrpSrJQTG3C48j/ pqXjPgfpsEfTaQFZhDIOsNMFdLQs48h1EvmYB6qkPTQ/9MCyiUN8cdxHyK6ldDG5PAGQ X02TbJehKAFxAO3vTskGDRBIZ6uANHUXMyVkH9BKFanDVTG+ulULkt0xYfy0zVHLb+1D BYH9XEVIKI3NzTxQAPbdDwJn5WdzzopTpQg2TH3kIcdFgTsr49eElhEBkYMgQADp8OfQ QlHnsxHfigJIp9oLaNDAI/hEGCAxj/dd117umw3RguVQe4Sr+0oiCQF7ardlDGz26+Bq r2nA== 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=eEPdym7V/XaxCx2kzufBOXYmPHIyNg2uCsWW0tOU9Gq0RXJn23zKrDfKFBONP05VPC MXj2UkGnAIOzplnZ1hMo0nMpCA7AVfi0dJ3NgCv+HveabkVCa7PjhpEsh98ES1FcBIWm DbYosKPmE4ctMpkQ+mMyBRFUOjk9niafpseWRJSa8I4dZT9XKSBE1WBkQ8V0Nux8cqxL dT5VXZ6JcRJRgUlhab6aVCCt1LjR58w4/F6v52ofzJe1TXo6UUBYaFZBquR/QKZjFfdx wMGc6ShjfmKiHBWYCvSzNFboaTO1jUefNu0M0+yw6GOWv8Xr+TCwjrGL6KaoLeuaT2Ox nWEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M8keWTBb; 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 v4-20020a05622a188400b003a97c56d020si10571421qtc.364.2023.04.12.07.31.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:31:31 -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=M8keWTBb; 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 7751585FFE; Wed, 12 Apr 2023 16:30:45 +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="M8keWTBb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A7DFB85F95; Wed, 12 Apr 2023 16:30:21 +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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (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 78F1885F89 for ; Wed, 12 Apr 2023 16:30:17 +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-lf1-x133.google.com with SMTP id 2adb3069b0e04-4ec81439f04so197551e87.0 for ; Wed, 12 Apr 2023 07:30:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681309817; x=1683901817; 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=M8keWTBb0cO1cckeAOZBGmRc/X96Ot1hpwpQytv9pALwa6mrwx/4hmaFJC/bBdjxVE QsTcj81m9YXFz95iffVgsKE95N7xlBjHn8GyJwe2zYGiWB14IjsrYNj1Pn1hq8wQUqGc GN/oEhLmYetXst1c1oPakQ8PIxeUczWN3Ec3T04k++128Imh6oLtuEPtIgrpLbfoORp4 e0faP9mWfLN0KpXH6M7zbqrARUJYzXNhefKoonToYR5Efr+PsD/2Glsu+j+E/fY5Tih/ yQjQ7cELQF2iPy+gnnzVscrYaV+dK8c0XwkLSEjwNGNMCpJD3E0TJodrMgdiytzcLUfr iKgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681309817; x=1683901817; 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=IL5jJMQ/TC5hefFy2sB3E8pNHj69pT0z2NTuL7U3B76Jn7ju3di08opVQrOvywTTn3 G+icqIYTR/0WrBZw+9fw9Gf50L5Lo9MxbrGsVsKVjABEI67MYz73y2kmx+4pIt6dq8Xt EzG/ZWH6eilVlRVXO9K+UxiDU3YiOWCsgRpEkfn3YFgS71LJaXo13MoLFo9Xqj/FTczC H+Bz80hr/Dx0snw7RCOuGwrzDuPG/TxIYdwbwxeM+c6Xvfiu+X9V3QIezwob/9ItbCSM H33HoSDXhm3cXtg3hwLz7QRlEnCyz3PaTEw7S+KfwTbOBTbsXXs98Sd2f+xhw7pb9ns7 xEuw== X-Gm-Message-State: AAQBX9fj5Lyt2zrfxYbOovq/RW7SBfR91Qtv5iRpPNvOcqe+zmZTITej dlMPy8MvVhFaMSUAMVT1reZ6mw== X-Received: by 2002:a2e:a815:0:b0:2a7:9987:571d with SMTP id l21-20020a2ea815000000b002a79987571dmr710902ljq.0.1681309817199; Wed, 12 Apr 2023 07:30:17 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id z2-20020a2e8e82000000b002a7729eea3dsm1861054ljk.88.2023.04.12.07.30.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:30:16 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass Cc: Ramon Fried , Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v2 6/9] serial: msm-geni: fix a compile time warning from msm_serial_setbrg() Date: Wed, 12 Apr 2023 17:30:03 +0300 Message-Id: <20230412143006.80946-7-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230412143006.80946-1-vladimir.zapolskiy@linaro.org> References: <20230412143006.80946-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);