Skip to contentSkip to conversation

: Fix section mismatch in mpt2sas

PATCH In review Prarit Bhargava 2 participants 2 messages Jul 7, 2010 – Jul 8, 2010 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : Fix section mismatch in mpt2sas

Fix section mismatch:

WARNING: drivers/scsi/mpt2sas/mpt2sas.o(.text+0xe3d4): Section mismatch in reference from the function _scsih_pci_error_detected() to the function .devexit.text:_scsih_remove() The function _scsih_pci_error_detected() references a function in an exit section.
Often the function _scsih_remove() has valid usage outside the exit section
and the fix is to remove the __devexit annotation of _scsih_remove.

by removing __devexit from _scsih_remove()

drivers/scsi/mpt2sas/mpt2sas_scsih.c +2 -2
index c5ff26a..c630aa7 100644
@@ -6290,7 +6290,7 @@ _scsih_shutdown(struct pci_dev *pdev)
  * Routine called when unloading the driver.
  * Return nothing.
  */
-static void __devexit
+static void
 _scsih_remove(struct pci_dev *pdev)
 {
 	struct Scsi_Host *shost = pci_get_drvdata(pdev);
@@ -6798,7 +6798,7 @@ static struct pci_driver scsih_driver = {
 	.name		= MPT2SAS_DRIVER_NAME,
 	.id_table	= scsih_pci_table,
 	.probe		= _scsih_probe,
-	.remove		= __devexit_p(_scsih_remove),
+	.remove		= _scsih_remove,
 	.shutdown	= _scsih_shutdown,
 	.err_handler	= &_scsih_err_handler,
 #ifdef CONFIG_PM
#1 lore raw
Quoted 29 lines · Prarit Bhargava

WARNING: drivers/scsi/mpt2sas/mpt2sas.o(.text+0xe3d4): Section mismatch in reference from the function _scsih_pci_error_detected() to the function .devexit.text:_scsih_remove()
The function _scsih_pci_error_detected() references a function in an exit section.
Often the function _scsih_remove() has valid usage outside the exit section
and the fix is to remove the __devexit annotation of _scsih_remove.

by removing __devexit from _scsih_remove()

drivers/scsi/mpt2sas/mpt2sas_scsih.c +1 -1
index c5ff26a..c630aa7 100644
@@ -6290,7 +6290,7 @@ _scsih_shutdown(struct pci_dev *pdev)
  * Routine called when unloading the driver.
  * Return nothing.
  */
-static void __devexit
+static void
 _scsih_remove(struct pci_dev *pdev)
 {
 	struct Scsi_Host *shost = pci_get_drvdata(pdev);

drivers/scsi/mpt2sas/mpt2sas_scsih.c static struct pci_driver scsih_driver = { · line 6804

Quoted 8 lines
drivers/scsi/mpt2sas/mpt2sas_scsih.c +1 -1
@@ -6798,7 +6798,7 @@ static struct pci_driver scsih_driver = {
 	.name		= MPT2SAS_DRIVER_NAME,
 	.id_table	= scsih_pci_table,
 	.probe		= _scsih_probe,
-	.remove		= __devexit_p(_scsih_remove),
+	.remove		= _scsih_remove,
 	.shutdown	= _scsih_shutdown,
 	.err_handler	= &_scsih_err_handler,
 #ifdef CONFIG_PM

NACK. This is not required after the patch I just posted. The fix is we shouldn't be calling _scsih_remove from _scsih_pci_error_detected.

Eric Moore