kernel_xiaomi_sm8150 icon indicating copy to clipboard operation
kernel_xiaomi_sm8150 copied to clipboard

drivers: pci: fix irq handling in pci-msm-msi.c

Open jnsc opened this issue 5 years ago • 0 comments

Here is the original reference :

From: Andrew Chant [email protected] Date: Wed, 20 Feb 2019 15:47:00 -0800 Subject: [PATCH] drivers: pci: fix irq handling in pci-msm-msi.c

Originally got this warning: drivers/pci/host/pci-msm-msi.c:507:41: error: incompatible function pointer types passing 'void (*)(struct irq_desc )' to parameter of type 'irq_flow_handler_t' (aka '_Bool ()(struct irq_desc *)') [-Werror,-Wincompatible-function-pointer-types] irq_set_chained_handler_and_data(irq, msi_handler, msi); ^~~~~~~~~~~

Warning is legit, irq_flow_handler_t has type bool. you can see from a common irq_flow_handler_t, handle_level_irq in kernel/irq/chip.c, that the return value should be true if it handled the irq, and false if otherwise.

From kernel/irq/irqdesc.c:

  • generic_handle_irq - Invoke the handler for a particular irq ...
  • returns:
  •  negative on error
    
  •  0 when the interrupt handler was not called
    
  •  1 when the interrupt handler was called
    

Bug: 124912098 Change-Id: Ib5deb99c1edfca7b9ce8c68a02b6119000afde11

jnsc avatar May 19 '20 17:05 jnsc