linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix a compile warning in pci_32.c
       [not found] <576c3a210d014003c9d4b26f02a95099346f6716.1185982433.git.segher@kernel.crashing.org>
@ 2007-08-01 15:41 ` Segher Boessenkool
       [not found]   ` <e774fa79388836788a57b8722999effa0392a536.1185982428.git.segher@kernel.crashing.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Segher Boessenkool @ 2007-08-01 15:41 UTC (permalink / raw)
  To: linuxppc-dev

__must_check, so do so.

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
---
 arch/powerpc/kernel/pci_32.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index cd35c96..04a3109 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -581,8 +581,11 @@ pcibios_assign_resources(void)
 			if ((r->flags & IORESOURCE_UNSET) && r->end &&
 			    (!ppc_md.pcibios_enable_device_hook ||
 			     !ppc_md.pcibios_enable_device_hook(dev, 1))) {
+				int rc;
+
 				r->flags &= ~IORESOURCE_UNSET;
-				pci_assign_resource(dev, idx);
+				rc = pci_assign_resource(dev, idx);
+				BUG_ON(rc);
 			}
 		}
 
-- 
1.5.2.1.144.gabc40-dirty

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] Fix a compile warning in powermac/feature.c
       [not found]   ` <e774fa79388836788a57b8722999effa0392a536.1185982428.git.segher@kernel.crashing.org>
@ 2007-08-01 15:41     ` Segher Boessenkool
       [not found]       ` <4533e849af9996f5f9ce038e37bf67c4c9012a87.1185982410.git.segher@kernel.crashing.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Segher Boessenkool @ 2007-08-01 15:41 UTC (permalink / raw)
  To: linuxppc-dev

...by using the pci_get API instead of the deprecated old stuff.

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
---
 arch/powerpc/platforms/powermac/feature.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
index f29705f..ba931be 100644
--- a/arch/powerpc/platforms/powermac/feature.c
+++ b/arch/powerpc/platforms/powermac/feature.c
@@ -826,13 +826,15 @@ core99_ata100_enable(struct device_node *node, long value)
 
 	if (value) {
 		if (pci_device_from_OF_node(node, &pbus, &pid) == 0)
-			pdev = pci_find_slot(pbus, pid);
+			pdev = pci_get_bus_and_slot(pbus, pid);
 		if (pdev == NULL)
 			return 0;
 		rc = pci_enable_device(pdev);
+		if (rc == 0)
+			pci_set_master(pdev);
+		pci_dev_put(pdev);
 		if (rc)
 			return rc;
-		pci_set_master(pdev);
 	}
 	return 0;
 }
-- 
1.5.2.1.144.gabc40-dirty

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] Replace a few #defines with empty inline functions
       [not found]       ` <4533e849af9996f5f9ce038e37bf67c4c9012a87.1185982410.git.segher@kernel.crashing.org>
@ 2007-08-01 15:41         ` Segher Boessenkool
       [not found]           ` <a2e1409163c00627f53c305f28b6d5feb530d96c.1185982424.git.segher@kernel.crashing.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Segher Boessenkool @ 2007-08-01 15:41 UTC (permalink / raw)
  To: linuxppc-dev

...so that GCC doesn't complain about unused variables in the
callers of these.

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
---
 include/asm-powerpc/dma-mapping.h |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h
index f6bd804..22b3c40 100644
--- a/include/asm-powerpc/dma-mapping.h
+++ b/include/asm-powerpc/dma-mapping.h
@@ -249,8 +249,12 @@ dma_map_single(struct device *dev, void *ptr, size_t size,
 	return virt_to_bus(ptr);
 }
 
-/* We do nothing. */
-#define dma_unmap_single(dev, addr, size, dir)	((void)0)
+static inline void dma_unmap_single(struct device *dev, dma_addr_t dma_addr,
+				    size_t size,
+				    enum dma_data_direction direction)
+{
+	/* We do nothing. */
+}
 
 static inline dma_addr_t
 dma_map_page(struct device *dev, struct page *page,
@@ -264,8 +268,12 @@ dma_map_page(struct device *dev, struct page *page,
 	return page_to_bus(page) + offset;
 }
 
-/* We do nothing. */
-#define dma_unmap_page(dev, handle, size, dir)	((void)0)
+static inline void dma_unmap_page(struct device *dev, dma_addr_t dma_address,
+				  size_t size,
+				  enum dma_data_direction direction)
+{
+	/* We do nothing. */
+}
 
 static inline int
 dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
@@ -284,8 +292,12 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
 	return nents;
 }
 
-/* We don't do anything here. */
-#define dma_unmap_sg(dev, sg, nents, dir)	((void)0)
+static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg,
+				int nhwentries,
+				enum dma_data_direction direction)
+{
+	/* We don't do anything here. */
+}
 
 #endif /* CONFIG_PPC64 */
 
-- 
1.5.2.1.144.gabc40-dirty

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ide/ppc/pmac: Remove a few unused variables
       [not found]           ` <a2e1409163c00627f53c305f28b6d5feb530d96c.1185982424.git.segher@kernel.crashing.org>
@ 2007-08-01 15:41             ` Segher Boessenkool
  0 siblings, 0 replies; 4+ messages in thread
From: Segher Boessenkool @ 2007-08-01 15:41 UTC (permalink / raw)
  To: linuxppc-dev


Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
---
 drivers/ide/ppc/pmac.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index 33630ad..0f5a6b4 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -1810,9 +1810,7 @@ pmac_ide_dma_check(ide_drive_t *drive)
 {
 	struct hd_driveid *id = drive->id;
 	ide_hwif_t *hwif = HWIF(drive);
-	pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)hwif->hwif_data;
 	int enable = 1;
-	int map;
 	drive->using_dma = 0;
 	
 	if (drive->media == ide_floppy)
-- 
1.5.2.1.144.gabc40-dirty

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-01 15:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <576c3a210d014003c9d4b26f02a95099346f6716.1185982433.git.segher@kernel.crashing.org>
2007-08-01 15:41 ` [PATCH] Fix a compile warning in pci_32.c Segher Boessenkool
     [not found]   ` <e774fa79388836788a57b8722999effa0392a536.1185982428.git.segher@kernel.crashing.org>
2007-08-01 15:41     ` [PATCH] Fix a compile warning in powermac/feature.c Segher Boessenkool
     [not found]       ` <4533e849af9996f5f9ce038e37bf67c4c9012a87.1185982410.git.segher@kernel.crashing.org>
2007-08-01 15:41         ` [PATCH] Replace a few #defines with empty inline functions Segher Boessenkool
     [not found]           ` <a2e1409163c00627f53c305f28b6d5feb530d96c.1185982424.git.segher@kernel.crashing.org>
2007-08-01 15:41             ` [PATCH] ide/ppc/pmac: Remove a few unused variables Segher Boessenkool

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).