From 119b3aa65d33533c2f8d8822bb7a3e62aa12f860 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Wed, 9 Apr 2008 07:51:07 +1000 Subject: [PATCH 1/2] pata_sil680: Fix build on arch/ppc Commit 0f436eff54f90419ac1b8accfb3e6e17c4b49a4e breaks build on arch/ppc as it doesn't implement the machine_is() macro. This fixes it by using CONFIG_PPC_MERGE instead which represents arch/powerpc only, while CONFIG_PPC is set for both. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Jeff Garzik --- drivers/ata/pata_sil680.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c index 3988e44f4934..7c5b2dd9a1a1 100644 --- a/drivers/ata/pata_sil680.c +++ b/drivers/ata/pata_sil680.c @@ -270,7 +270,7 @@ static u8 sil680_init_chip(struct pci_dev *pdev, int *try_mmio) tmpbyte & 1, tmpbyte & 0x30); *try_mmio = 0; -#ifdef CONFIG_PPC +#ifdef CONFIG_PPC_MERGE if (machine_is(cell)) *try_mmio = (tmpbyte & 1) || pci_resource_start(pdev, 5); #endif From ac2c5bd05c88185ecbe7c114e472716f2e2d3a0c Mon Sep 17 00:00:00 2001 From: Johann Felix Soden Date: Sun, 6 Apr 2008 15:10:54 +0200 Subject: [PATCH 2/2] ata/sata_fsl: Remove unused variable in sata_fsl_probe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In sata_fsl_probe memory is allocated but never used or deallocated. Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=10404 Thanks to Daniel Marjamäki for the bug report. Reported-by: Daniel Marjamäki Signed-off-by: Johann Felix Soden Signed-off-by: Jeff Garzik --- drivers/ata/sata_fsl.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index 4c1985511548..9d1e3cad4aa9 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c @@ -1256,7 +1256,6 @@ static int sata_fsl_probe(struct of_device *ofdev, void __iomem *ssr_base = NULL; void __iomem *csr_base = NULL; struct sata_fsl_host_priv *host_priv = NULL; - struct resource *r; int irq; struct ata_host *host; @@ -1266,8 +1265,6 @@ static int sata_fsl_probe(struct of_device *ofdev, dev_printk(KERN_INFO, &ofdev->dev, "Sata FSL Platform/CSB Driver init\n"); - r = kmalloc(sizeof(struct resource), GFP_KERNEL); - hcr_base = of_iomap(ofdev->node, 0); if (!hcr_base) goto error_exit_with_cleanup;