Commit 49f262bc authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Martin K. Petersen

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: 519b6274 ("scsi: ufs: qcom: Add MCQ ESI config vendor specific ops")
Fixes: 13e7accb ("genirq: Get rid of GENERIC_MSI_IRQ_DOMAIN")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarManivannan Sadhasivam <mani@kernel.org>
Acked-by: default avatarCan Guo <quic_cang@quicinc.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 5adca38c
...@@ -57,8 +57,9 @@ config SCSI_UFS_DWC_TC_PLATFORM ...@@ -57,8 +57,9 @@ config SCSI_UFS_DWC_TC_PLATFORM
config SCSI_UFS_QCOM config SCSI_UFS_QCOM
tristate "QCOM specific hooks to UFS controller platform driver" tristate "QCOM specific hooks to UFS controller platform driver"
depends on SCSI_UFSHCD_PLATFORM && ARCH_QCOM depends on SCSI_UFSHCD_PLATFORM && ARCH_QCOM
depends on GENERIC_MSI_IRQ
depends on RESET_CONTROLLER
select QCOM_SCM if SCSI_UFS_CRYPTO select QCOM_SCM if SCSI_UFS_CRYPTO
select RESET_CONTROLLER
help help
This selects the QCOM specific additions to UFSHCD platform driver. This selects the QCOM specific additions to UFSHCD platform driver.
UFS host on QCOM needs some vendor specific configuration before UFS host on QCOM needs some vendor specific configuration before
......
...@@ -1538,7 +1538,6 @@ static int ufs_qcom_get_outstanding_cqs(struct ufs_hba *hba, ...@@ -1538,7 +1538,6 @@ static int ufs_qcom_get_outstanding_cqs(struct ufs_hba *hba,
return 0; return 0;
} }
#ifdef CONFIG_GENERIC_MSI_IRQ_DOMAIN
static void ufs_qcom_write_msi_msg(struct msi_desc *desc, struct msi_msg *msg) static void ufs_qcom_write_msi_msg(struct msi_desc *desc, struct msi_msg *msg)
{ {
struct device *dev = msi_desc_to_dev(desc); struct device *dev = msi_desc_to_dev(desc);
...@@ -1626,13 +1625,6 @@ static int ufs_qcom_config_esi(struct ufs_hba *hba) ...@@ -1626,13 +1625,6 @@ static int ufs_qcom_config_esi(struct ufs_hba *hba)
return ret; return ret;
} }
#else
static int ufs_qcom_config_esi(struct ufs_hba *hba)
{
return -EOPNOTSUPP;
}
#endif
/* /*
* struct ufs_hba_qcom_vops - UFS QCOM specific variant operations * struct ufs_hba_qcom_vops - UFS QCOM specific variant operations
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment