diff mbox

libata-sff: remove dead code

Message ID 1399204229.8729.15.camel@x220
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Paul Bolle May 4, 2014, 11:50 a.m. UTC
Ever since v2.6.19 the code contains a check for CONFIG_NO_ATA_LEGACY.
But that macro has never been defined. Apparently no one ran into
problems on platforms that do not support compatibility mode. So remove
this code that has been dead for over seven years.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
Untested!

Perhaps the test should have been
    #if !defined(CONFIG_PATA_LEGACY)

I wouldn't know if that's correct. But after seven years it doesn't
matter anyhow, so I did not bother to research that.

 drivers/ata/libata-sff.c | 9 ---------
 1 file changed, 9 deletions(-)

Comments

Alan Cox May 6, 2014, 9:26 p.m. UTC | #1
On Sun, 2014-05-04 at 13:50 +0200, Paul Bolle wrote:
> Ever since v2.6.19 the code contains a check for CONFIG_NO_ATA_LEGACY.
> But that macro has never been defined. Apparently no one ran into
> problems on platforms that do not support compatibility mode.

It was needed for some of the FRV devices I belive. Please check with
David Howells if it's still relevant (even if its not used in the
default configs)

Alan


--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paul Bolle May 7, 2014, 9:23 a.m. UTC | #2
[Added David.]

On Tue, 2014-05-06 at 22:26 +0100, Alan Cox wrote:
> On Sun, 2014-05-04 at 13:50 +0200, Paul Bolle wrote:
> > Ever since v2.6.19 the code contains a check for CONFIG_NO_ATA_LEGACY.
> > But that macro has never been defined. Apparently no one ran into
> > problems on platforms that do not support compatibility mode.
> 
> It was needed for some of the FRV devices I belive. Please check with
> David Howells if it's still relevant

This code has been behind (effectively) an "#if 0" check for seven
years. So either there was no problem to begin with, the problem is
fixed somewhere else, or no one is actually using the affected devices.
So I doubt this is still relevant. But maybe David thinks otherwise...

> (even if its not used in the default configs)

It's not used (and has never been used) regardless which config one
tries.


Paul Bolle

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alan Cox May 7, 2014, 9:49 a.m. UTC | #3
> > It was needed for some of the FRV devices I belive. Please check with
> > David Howells if it's still relevant
> 
> This code has been behind (effectively) an "#if 0" check for seven
> years. So either there was no problem to begin with, the problem is
> fixed somewhere else, or no one is actually using the affected devices.
> So I doubt this is still relevant. But maybe David thinks otherwise...
> 
> > (even if its not used in the default configs)
> 
> It's not used (and has never been used) regardless which config one
> tries.

Unless you are editing the config with out of tree changes. Which is
possible which is why I said ask Dave. It's probably fine but best to be
safe.

Alan


--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paul Bolle May 7, 2014, 10 a.m. UTC | #4
On Wed, 2014-05-07 at 10:49 +0100, Alan Cox wrote:
> Unless you are editing the config with out of tree changes. Which is
> possible which is why I said ask Dave. It's probably fine but best to be
> safe.

If you mean adding a "config NO_ATA_LEGACY" entry to some Kconfig file,
and setting that symbol during "make *config", that will obviously work.

But if you mean (hand) editing the .config, that wouldn't work, as the
line for CONFIG_NO_ATA_LEGACY would be dropped during "make *config",
wouldn't it?


Paul Bolle

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index b603720b877d..1121153f1ecd 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -2433,15 +2433,6 @@  int ata_pci_sff_activate_host(struct ata_host *host,
 		mask = (1 << 2) | (1 << 0);
 		if ((tmp8 & mask) != mask)
 			legacy_mode = 1;
-#if defined(CONFIG_NO_ATA_LEGACY)
-		/* Some platforms with PCI limits cannot address compat
-		   port space. In that case we punt if their firmware has
-		   left a device in compatibility mode */
-		if (legacy_mode) {
-			printk(KERN_ERR "ata: Compatibility mode ATA is not supported on this platform, skipping.\n");
-			return -EOPNOTSUPP;
-		}
-#endif
 	}
 
 	if (!devres_open_group(dev, NULL, GFP_KERNEL))