linux-next/drivers/pinctrl/mediatek
Kees Cook ac6f0825e5 pinctrl: airoha: Use unsigned long for bit search
Instead of risking alignment problems and causing (false positive) array
bound warnings when casting a u32 to (64-bit) unsigned long, just use a
native unsigned long for doing bit searches. Avoids warning with GCC 15's
-Warray-bounds -fdiagnostics-details:

In file included from ../include/linux/bitmap.h:11,
                 from ../include/linux/cpumask.h:12,
                 from ../arch/x86/include/asm/paravirt.h:21,
                 from ../arch/x86/include/asm/irqflags.h:80,
                 from ../include/linux/irqflags.h:18,
                 from ../include/linux/spinlock.h:59,
                 from ../include/linux/irq.h:14,
                 from ../include/linux/irqchip/chained_irq.h:10,
                 from ../include/linux/gpio/driver.h:8,
                 from ../drivers/pinctrl/mediatek/pinctrl-airoha.c:11:
In function 'find_next_bit',
    inlined from 'airoha_irq_handler' at ../drivers/pinctrl/mediatek/pinctrl-airoha.c:2394:3:
../include/linux/find.h:65:23: error: array subscript 'long unsigned int[0]' is partly outside array bounds of 'u32[1]' {aka 'unsigned int[1]'} [-Werror=array-bounds=]
   65 |                 val = *addr & GENMASK(size - 1, offset);
      |                       ^~~~~
../drivers/pinctrl/mediatek/pinctrl-airoha.c: In function 'airoha_irq_handler':
../drivers/pinctrl/mediatek/pinctrl-airoha.c:2387:21: note: object 'status' of size 4
 2387 |                 u32 status;
      |                     ^~~~~~

Signed-off-by: Kees Cook <kees@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/20241117114534.work.292-kees@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-11-18 23:57:38 +01:00
..
Kconfig pinctrl: airoha: Add support for EN7581 SoC 2024-10-30 10:56:51 +01:00
Makefile pinctrl: airoha: Add support for EN7581 SoC 2024-10-30 10:56:51 +01:00
mtk-eint.c pinctrl: meditatek: Startup with the IRQs disabled 2022-11-22 21:05:18 +01:00
mtk-eint.h pinctrl: mediatek: Fix EINT pins input debounce time configuration 2022-11-14 14:20:41 +01:00
pinctrl-airoha.c pinctrl: airoha: Use unsigned long for bit search 2024-11-18 23:57:38 +01:00
pinctrl-moore.c pinctrl: mediatek: moore: Convert to use func member 2024-06-17 09:24:57 +02:00
pinctrl-moore.h pinctrl: mediatek: moore: Convert to use func member 2024-06-17 09:24:57 +02:00
pinctrl-mt76x8.c pinctrl: ralink: mt76x8: fix pinmux function 2024-06-17 09:23:02 +02:00
pinctrl-mt2701.c pinctrl: mediatek: Switch to use no-IRQ PM helpers 2023-12-04 15:32:42 +01:00
pinctrl-mt2712.c pinctrl: mediatek: Switch to use no-IRQ PM helpers 2023-12-04 15:32:42 +01:00
pinctrl-mt6397.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-mt6765.c pinctrl: mediatek: fix module autoloading 2024-04-17 10:43:50 +02:00
pinctrl-mt6779.c pinctrl: mediatek: fix module autoloading 2024-04-17 10:43:50 +02:00
pinctrl-mt6795.c pinctrl: mediatek: Switch to use no-IRQ PM helpers 2023-12-04 15:32:42 +01:00
pinctrl-mt6797.c pinctrl: mediatek: paris: Unify probe function by using OF match data 2022-03-17 02:06:52 +01:00
pinctrl-mt7620.c pinctrl: ralink: move to mediatek as mtmips 2023-03-19 21:47:25 +01:00
pinctrl-mt7621.c pinctrl: ralink: move to mediatek as mtmips 2023-03-19 21:47:25 +01:00
pinctrl-mt7622.c pinctrl: mediatek: moore: Provide a helper macro PINCTRL_PIN_FUNCTION() 2024-06-17 09:24:05 +02:00
pinctrl-mt7623.c pinctrl: mediatek: moore: Provide a helper macro PINCTRL_PIN_FUNCTION() 2024-06-17 09:24:05 +02:00
pinctrl-mt7629.c pinctrl: mediatek: moore: Provide a helper macro PINCTRL_PIN_FUNCTION() 2024-06-17 09:24:05 +02:00
pinctrl-mt7981.c pinctrl: mediatek: moore: Provide a helper macro PINCTRL_PIN_FUNCTION() 2024-06-17 09:24:05 +02:00
pinctrl-mt7986.c pinctrl: mediatek: moore: Provide a helper macro PINCTRL_PIN_FUNCTION() 2024-06-17 09:24:05 +02:00
pinctrl-mt8127.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-mt8135.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-mt8167.c pinctrl: mediatek: Switch to use no-IRQ PM helpers 2023-12-04 15:32:42 +01:00
pinctrl-mt8173.c pinctrl: mediatek: Switch to use no-IRQ PM helpers 2023-12-04 15:32:42 +01:00
pinctrl-mt8183.c pinctrl: mediatek: Switch to use no-IRQ PM helpers 2023-12-04 15:32:42 +01:00
pinctrl-mt8186.c pinctrl: mediatek: Drop bogus slew rate register range for MT8186 2024-02-07 11:47:49 +01:00
pinctrl-mt8188.c pinctrl: mediatek: Switch to use no-IRQ PM helpers 2023-12-04 15:32:42 +01:00
pinctrl-mt8192.c pinctrl: mediatek: Drop bogus slew rate register range for MT8192 2024-02-07 11:47:49 +01:00
pinctrl-mt8195.c pinctrl: mediatek: Switch to use no-IRQ PM helpers 2023-12-04 15:32:42 +01:00
pinctrl-mt8365.c pinctrl: mediatek: Switch to use no-IRQ PM helpers 2023-12-04 15:32:42 +01:00
pinctrl-mt8516.c pinctrl: mediatek: Switch to use no-IRQ PM helpers 2023-12-04 15:32:42 +01:00
pinctrl-mtk-common-v2.c pinctrl: mediatek: common-v2: Fix broken bias-disable for PULL_PU_PD_RSEL_TYPE 2024-08-23 18:07:14 +02:00
pinctrl-mtk-common-v2.h pinctrl: mediatek: support rsel feature 2021-10-03 00:43:36 +02:00
pinctrl-mtk-common.c pinctrl: mediatek: Use scope based of_node_put() cleanups 2024-06-26 11:58:30 +02:00
pinctrl-mtk-common.h pinctrl: mediatek: common: add mt8365_set_clr_mode() callback for broken SET/CLR modes 2022-11-07 15:42:53 +01:00
pinctrl-mtk-mt2701.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
pinctrl-mtk-mt2712.h pinctrl: mediatek: Use the correct style for SPDX License Identifier 2019-12-12 11:30:33 +01:00
pinctrl-mtk-mt6397.h pinctrl: mtk: fix check warnings. 2018-03-26 10:58:33 +02:00
pinctrl-mtk-mt6765.h pinctrl: mediatek: add MT6765 pinctrl driver 2018-09-21 09:12:55 -07:00
pinctrl-mtk-mt6779.h pinctrl: mediatek: add pinctrl support for MT6779 SoC 2020-08-04 01:29:09 +02:00
pinctrl-mtk-mt6795.h pinctrl: mediatek: Add pinctrl driver for MT6795 Helio X10 2022-05-19 15:11:15 +02:00
pinctrl-mtk-mt6797.h pinctrl: mediatek: Add initial pinctrl driver for MT6797 SoC 2018-11-15 11:05:54 +01:00
pinctrl-mtk-mt8127.h pinctrl: mtk: fix check warnings. 2018-03-26 10:58:33 +02:00
pinctrl-mtk-mt8135.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
pinctrl-mtk-mt8167.h pinctrl: mediatek: Add MT8167 Pinctrl driver 2020-09-27 11:20:09 +02:00
pinctrl-mtk-mt8173.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
pinctrl-mtk-mt8183.h pinctrl: mediatek: add MT8183 pinctrl driver 2018-09-18 14:53:29 -07:00
pinctrl-mtk-mt8186.h pinctrl: add pinctrl driver on mt8186 2022-03-15 01:00:03 +01:00
pinctrl-mtk-mt8188.h pinctrl: mediatek: add mt8188 driver 2022-08-25 14:50:44 +02:00
pinctrl-mtk-mt8192.h pinctrl: mediatek: Add pinctrl driver for mt8192 2020-08-27 10:50:57 +02:00
pinctrl-mtk-mt8195.h pinctrl: add pinctrl driver on mt8195 2021-04-22 01:53:02 +02:00
pinctrl-mtk-mt8365.h pinctrl: mediatek: add support for mt8365 SoC 2021-05-27 16:50:15 +02:00
pinctrl-mtk-mt8516.h pinctrl: mediatek: Add MT8516 Pinctrl driver 2019-05-03 07:53:13 +01:00
pinctrl-mtmips.c pinctrl: ralink: move to mediatek as mtmips 2023-03-19 21:47:25 +01:00
pinctrl-mtmips.h pinctrl: ralink: move to mediatek as mtmips 2023-03-19 21:47:25 +01:00
pinctrl-paris.c pinctrl: mediatek: Use of_property_read_bool() 2024-08-23 17:38:00 +02:00
pinctrl-paris.h pinctrl: mediatek: Convert to use grp member 2023-12-12 00:47:52 +01:00
pinctrl-rt305x.c pinctrl: ralink: move to mediatek as mtmips 2023-03-19 21:47:25 +01:00
pinctrl-rt2880.c pinctrl: ralink: move to mediatek as mtmips 2023-03-19 21:47:25 +01:00
pinctrl-rt3883.c pinctrl: ralink: move to mediatek as mtmips 2023-03-19 21:47:25 +01:00