diff options
Diffstat (limited to 'drivers/irqchip/irq-stm32-exti.c')
| -rw-r--r-- | drivers/irqchip/irq-stm32-exti.c | 13 | 
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c index 6a3f7498ea8e..b5fa76ce5046 100644 --- a/drivers/irqchip/irq-stm32-exti.c +++ b/drivers/irqchip/irq-stm32-exti.c @@ -173,6 +173,16 @@ static struct irq_chip stm32_exti_h_chip_direct;  #define EXTI_INVALID_IRQ       U8_MAX  #define STM32MP1_DESC_IRQ_SIZE (ARRAY_SIZE(stm32mp1_exti_banks) * IRQS_PER_BANK) +/* + * Use some intentionally tricky logic here to initialize the whole array to + * EXTI_INVALID_IRQ, but then override certain fields, requiring us to indicate + * that we "know" that there are overrides in this structure, and we'll need to + * disable that warning from W=1 builds. + */ +__diag_push(); +__diag_ignore_all("-Woverride-init", +		  "logic to initialize all and then override some is OK"); +  static const u8 stm32mp1_desc_irq[] = {  	/* default value */  	[0 ... (STM32MP1_DESC_IRQ_SIZE - 1)] = EXTI_INVALID_IRQ, @@ -208,6 +218,7 @@ static const u8 stm32mp1_desc_irq[] = {  	[31] = 53,  	[32] = 82,  	[33] = 83, +	[46] = 151,  	[47] = 93,  	[48] = 138,  	[50] = 139, @@ -266,6 +277,8 @@ static const u8 stm32mp13_desc_irq[] = {  	[70] = 98,  }; +__diag_pop(); +  static const struct stm32_exti_drv_data stm32mp1_drv_data = {  	.exti_banks = stm32mp1_exti_banks,  	.bank_nr = ARRAY_SIZE(stm32mp1_exti_banks),  |