Re: [PATCH 01/16] xtensa: FSF: define XCHAL_HAVE_DIV32

From: Max Filippov
Date: Wed Sep 20 2023 - 07:53:21 EST


On Tue, Sep 19, 2023 at 10:21 PM Randy Dunlap <rdunlap@xxxxxxxxxxxxx> wrote:
>
> When variant FSF is set, XCHAL_HAVE_DIV32 is not defined,
> so add the define for FSF to prevent build warnings:
>
> arch/xtensa/lib/divsi3.S:9:5: warning: "XCHAL_HAVE_DIV32" is not defined, evaluates to 0 [-Wundef]
> 9 | #if XCHAL_HAVE_DIV32
> arch/xtensa/lib/modsi3.S:9:5: warning: "XCHAL_HAVE_DIV32" is not defined, evaluates to 0 [-Wundef]
> 9 | #if XCHAL_HAVE_DIV32
>
> Fixes: 173d6681380a ("xtensa: remove extra header files")
> Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Closes: lore.kernel.org/r/202309150556.t0yCdv3g-lkp@xxxxxxxxx
> Cc: Chris Zankel <chris@xxxxxxxxxx>
> Cc: Max Filippov <jcmvbkbc@xxxxxxxxx>
> ---
> arch/xtensa/variants/fsf/include/variant/core.h | 1 +
> 1 file changed, 1 insertion(+)

If this configuration overlay doesn't define that macro then other
configurations
from that era may have similar issue. I've posted a different fix that
adds a default
definition for XCHAL_HAVE_DIV32 to asm/core.h instead.

--
Thanks.
-- Max