]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
serial: msm-geni: fix a compile time warning from msm_serial_setbrg()
authorVladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Fri, 21 Apr 2023 17:50:38 +0000 (20:50 +0300)
committerTom Rini <trini@konsulko.com>
Tue, 2 May 2023 18:23:58 +0000 (14:23 -0400)
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 <vladimir.zapolskiy@linaro.org>
Fixes: 324df15a292e ("serial: qcom: add support for GENI serial driver")
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
drivers/serial/serial_msm_geni.c

index 55dd9188a56c3b488c647cd21b36f0dde912d731..3a200f45a6cea7493f50a1cb853f7ca6e5199893 100644 (file)
@@ -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);