linux_dsm_epyc7002/arch/arm/mach-omap1
Maciej Falkowski 247ec8ee0b ARM: OMAP1: Fix use of possibly uninitialized irq variable
[ Upstream commit 3c4e0147c269738a19c7d70cd32395600bcc0714 ]

The current control flow of IRQ number assignment to `irq` variable
allows a request of IRQ of unspecified value,
generating a warning under Clang compilation with omap1_defconfig on
linux-next:

arch/arm/mach-omap1/pm.c:656:11: warning: variable 'irq' is used
uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
        else if (cpu_is_omap16xx())
                 ^~~~~~~~~~~~~~~~~
./arch/arm/mach-omap1/include/mach/soc.h:123:30: note: expanded from macro
'cpu_is_omap16xx'
                                        ^~~~~~~~~~~~~
arch/arm/mach-omap1/pm.c:658:18: note: uninitialized use occurs here
        if (request_irq(irq, omap_wakeup_interrupt, 0, "peripheral wakeup",
                        ^~~
arch/arm/mach-omap1/pm.c:656:7: note: remove the 'if' if its condition is
always true
        else if (cpu_is_omap16xx())
             ^~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-omap1/pm.c:611:9: note: initialize the variable 'irq' to
silence this warning
        int irq;
               ^
                = 0
1 warning generated.

The patch provides a default value to the `irq` variable
along with a validity check.

Signed-off-by: Maciej Falkowski <maciej.falkowski9@gmail.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/1324
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-06-18 10:00:04 +02:00
..
include/mach ARM: SoC platform updates 2020-10-24 10:33:08 -07:00
ams-delta-fiq-handler.S ARM: omap1: fix building with clang IAS 2021-04-21 13:00:52 +02:00
ams-delta-fiq.c ARM: OMAP1: ams-delta FIQ: Fix a typo ("Initiaize") 2019-10-22 09:08:06 -07:00
ams-delta-fiq.h Input: ams_delta_serio: use IRQ resource 2018-07-02 23:05:14 -07:00
board-ams-delta.c media: mach-omap1: board-ams-delta.c: remove soc_camera dependencies 2020-07-04 12:18:49 +02:00
board-ams-delta.h ARM: OMAP1: ams-delta: Move AMS_DELTA_LATCH2_NGPIO to the board file 2018-11-29 12:05:34 -08:00
board-fsample.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
board-generic.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
board-h2-mmc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
board-h2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
board-h2.h ARM: OMAP: No need to include board-h2.h from hardware.h 2009-03-23 18:07:33 -07:00
board-h3-mmc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
board-h3.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
board-h3.h ARM: OMAP: No need to include board-h3.h from hardware.h 2009-03-23 18:07:33 -07:00
board-htcherald.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
board-innovator.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
board-nand.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
board-nokia770.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
board-osk.c ARM: OMAP1: OSK: fix ohci-omap breakage 2021-02-10 09:29:11 +01:00
board-palmte.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
board-palmtt.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
board-palmz71.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
board-perseus2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
board-sx1-mmc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
board-sx1.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
board-sx1.h ARM: omap1: make headers more local 2015-12-01 21:52:50 +01:00
clock_data.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
clock.c Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
clock.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
common.h mtd: rawnand: plat_nand: Pass a nand_chip object to all platform_nand_ctrl hooks 2018-10-03 11:12:25 +02:00
devices.c media: mach-omap1: board-ams-delta.c: remove soc_camera dependencies 2020-07-04 12:18:49 +02:00
dma.c ARM: OMAP: Replace HTTP links with HTTPS ones 2020-07-13 11:37:54 -07:00
fb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
flash.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
flash.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fpga.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fpga.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
gpio7xx.c ARM: OMAP: Replace HTTP links with HTTPS ones 2020-07-13 11:37:54 -07:00
gpio15xx.c ARM: OMAP: Replace HTTP links with HTTPS ones 2020-07-13 11:37:54 -07:00
gpio16xx.c ARM: OMAP: Replace HTTP links with HTTPS ones 2020-07-13 11:37:54 -07:00
i2c.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
i2c.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
id.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
io.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
iomap.h ARM: OMAP1: Remove relative includes 2012-10-31 15:37:14 -07:00
irq.c ARM: kill off set_irq_flags usage 2015-07-28 13:58:13 +02:00
Kconfig ARM: OMAP: Replace HTTP links with HTTPS ones 2020-07-13 11:37:54 -07:00
lcd_dma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Makefile ARM: SoC platform updates 2018-12-31 17:27:54 -08:00
Makefile.boot treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mcbsp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mmc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mux.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
ocpi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
opp_data.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
opp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pm_bus.c arm: omap1: remove boilerplate code and use USE_PM_CLK_RUNTIME_OPS 2015-05-12 23:55:38 +02:00
pm.c ARM: OMAP1: Fix use of possibly uninitialized irq variable 2021-06-18 10:00:04 +02:00
pm.h ARM: 6649/1: omap: use fncpy to copy the PM code functions to SRAM 2011-02-04 14:26:08 +00:00
reset.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
serial.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sleep.S ARM: OMAP1: Remove relative includes 2012-10-31 15:37:14 -07:00
soc.h ARM: OMAP1: Remove relative includes 2012-10-31 15:37:14 -07:00
sram-init.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sram.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sram.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
time.c ARM: OMAP: replace setup_irq() by request_irq() 2020-03-04 08:30:30 -08:00
timer32k.c ARM: OMAP: replace setup_irq() by request_irq() 2020-03-04 08:30:30 -08:00
timer.c ARM: OMAP: Replace HTTP links with HTTPS ones 2020-07-13 11:37:54 -07:00
usb.c ARM/omap1: switch to use dma_direct_set_offset for lbus DMA offsets 2020-09-25 06:15:32 +02:00