[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANBLGczcWOYyEavx6H1Uk-KvQzTJoq2qC72f22K8ZP-TS5hSnw@mail.gmail.com>
Date: Thu, 25 Feb 2021 15:09:13 +0100
From: Emil Renner Berthing <kernel@...il.dk>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Mark Brown <broonie@...nel.org>, Heiko Stuebner <heiko@...ech.de>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Arnd Bergmann <arnd@...db.de>,
Jon Lin <jon.lin@...k-chips.com>,
Chris Ruehl <chris.ruehl@...ys.com.hk>,
Alexander Kochetkov <al.kochet@...il.com>,
Johan Jonker <jbx6244@...il.com>,
Vincent Pelletier <plr.vincent@...il.com>,
linux-spi@...r.kernel.org,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
"open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
clang-built-linux@...glegroups.com
Subject: Re: [PATCH] spi: rockchip: avoid objtool warning
On Thu, 25 Feb 2021 at 13:55, Arnd Bergmann <arnd@...nel.org> wrote:
>
> From: Arnd Bergmann <arnd@...db.de>
>
> Building this file with clang leads to a an unreachable code path
> causing a warning from objtool:
>
> drivers/spi/spi-rockchip.o: warning: objtool: rockchip_spi_transfer_one()+0x2e0: sibling call from callable instruction with modified stack frame
>
> Use BUG() instead of unreachable() to avoid the undefined behavior
> if it does happen.
>
> Fixes: 65498c6ae241 ("spi: rockchip: support 4bit words")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
Acked-by: Emil Renner Berthing <kernel@...il.dk>
> ---
> drivers/spi/spi-rockchip.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c
> index 936ef54e0903..972beac1169a 100644
> --- a/drivers/spi/spi-rockchip.c
> +++ b/drivers/spi/spi-rockchip.c
> @@ -521,7 +521,7 @@ static void rockchip_spi_config(struct rockchip_spi *rs,
> * ctlr->bits_per_word_mask, so this shouldn't
> * happen
> */
> - unreachable();
> + BUG();
> }
>
> if (use_dma) {
> --
> 2.29.2
>
Powered by blists - more mailing lists