Re: [RESEND PATCH 06/11] brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constant
From: Kalle Valo
Date: Sun Apr 10 2022 - 08:21:04 EST
Borislav Petkov <bp@xxxxxxxxx> wrote:
> Fix:
>
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c: In function ‘brcmf_sdio_drivestrengthinit’:
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:3798:2: error: case label does not reduce to an integer constant
> case SDIOD_DRVSTR_KEY(BRCM_CC_43143_CHIP_ID, 17):
> ^~~~
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:3809:2: error: case label does not reduce to an integer constant
> case SDIOD_DRVSTR_KEY(BRCM_CC_43362_CHIP_ID, 13):
> ^~~~
>
> See https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@xxxxxxx for the gory
> details as to why it triggers with older gccs only.
>
> Signed-off-by: Borislav Petkov <bp@xxxxxxx>
> Cc: Arend van Spriel <aspriel@xxxxxxxxx>
> Cc: Franky Lin <franky.lin@xxxxxxxxxxxx>
> Cc: Hante Meuleman <hante.meuleman@xxxxxxxxxxxx>
> Cc: Kalle Valo <kvalo@xxxxxxxxxx>
> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
> Cc: Jakub Kicinski <kuba@xxxxxxxxxx>
> Cc: brcm80211-dev-list.pdl@xxxxxxxxxxxx
> Cc: netdev@xxxxxxxxxxxxxxx
> Acked-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
Patch applied to wireless.git, thanks.
6fb3a5868b21 brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constant
--
https://patchwork.kernel.org/project/linux-wireless/patch/Ykx0iRlvtBnKqtbG@xxxxxxx/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches