Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: ufs: qcom: fix platform_msi_domain_free_irqs() reference

The newly added MSI support is mostly hidden inside of an #ifdef,
except for one line that now causes a build failure when MSI
is disabled:

drivers/ufs/host/ufs-qcom.c: In function 'ufs_qcom_remove':
drivers/ufs/host/ufs-qcom.c:1698:9: error: implicit declaration of function 'platform_msi_domain_free_irqs' [-Werror=i]
1698 | platform_msi_domain_free_irqs(hba->dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Above that, the symbol that guards the other call was recently removed, so
that is all dead code at the moment.

Remove the incorrect #ifdef and instead of a Kconfig dependency to only
allow building the driver when CONFIG_GENERIC_MSI_IRQ is enabled. This
symbol is always present when PCI_MSI or ARM_GIC_V3_ITS are enabled, both
of which should be present on kernels that can run on Qualcomm SoCs.

The 'select RESET_CONTROLLER' in combination with this dependency
unfortunately causes a dependency loop and this is a user-visible symbol,
so it's better to change both to 'depends on'.

Link: https://lore.kernel.org/r/20230126211831.2274211-1-arnd@kernel.org
Fixes: 519b6274a777 ("scsi: ufs: qcom: Add MCQ ESI config vendor specific ops")
Fixes: 13e7accb81d6 ("genirq: Get rid of GENERIC_MSI_IRQ_DOMAIN")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Acked-by: Can Guo <quic_cang@quicinc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Arnd Bergmann and committed by
Martin K. Petersen
49f262bc 5adca38c

+2 -9
+2 -1
drivers/ufs/host/Kconfig
··· 57 57 config SCSI_UFS_QCOM 58 58 tristate "QCOM specific hooks to UFS controller platform driver" 59 59 depends on SCSI_UFSHCD_PLATFORM && ARCH_QCOM 60 + depends on GENERIC_MSI_IRQ 61 + depends on RESET_CONTROLLER 60 62 select QCOM_SCM if SCSI_UFS_CRYPTO 61 - select RESET_CONTROLLER 62 63 help 63 64 This selects the QCOM specific additions to UFSHCD platform driver. 64 65 UFS host on QCOM needs some vendor specific configuration before
-8
drivers/ufs/host/ufs-qcom.c
··· 1538 1538 return 0; 1539 1539 } 1540 1540 1541 - #ifdef CONFIG_GENERIC_MSI_IRQ_DOMAIN 1542 1541 static void ufs_qcom_write_msi_msg(struct msi_desc *desc, struct msi_msg *msg) 1543 1542 { 1544 1543 struct device *dev = msi_desc_to_dev(desc); ··· 1624 1625 1625 1626 return ret; 1626 1627 } 1627 - 1628 - #else 1629 - static int ufs_qcom_config_esi(struct ufs_hba *hba) 1630 - { 1631 - return -EOPNOTSUPP; 1632 - } 1633 - #endif 1634 1628 1635 1629 /* 1636 1630 * struct ufs_hba_qcom_vops - UFS QCOM specific variant operations