[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVBXXpv9QfttBETQAeeRQjWRvfVJnrpPNiQj-N1SB9GQw@mail.gmail.com>
Date: Tue, 30 Jan 2024 12:39:49 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc: linux-renesas-soc@...r.kernel.org, Mark Brown <broonie@...nel.org>,
linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] spi: sh-msiof: avoid integer overflow in constants
Hi Wolfram,
On Tue, Jan 30, 2024 at 12:26 PM Wolfram Sang
<wsa+renesas@...g-engineering.com> wrote:
> > What about unifying the individual SIFCTR_?FWM_[0-9]* definitions
> > into SIFCTR_xFWM_[0-9]* instead, and using the bitfield helpers in its
> > sole user?
>
> But they don't match, so we can't unify them?
>
> #define SIFCTR_TFWM_1 (7UL << 29) /* Transfer Request when 1 empty stage */
>
> vs
>
> #define SIFCTR_RFWM_1 (0 << 13) /* Transfer Request when 1 valid stages */
>
> Also, the steps don't match (1, 4, 8, 12..) vs (1, 4, 8, 16...).
I stand corrected...
/me looks envious for a brown paper bag...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68korg
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists