Skip to content

Commit 435e0b2

Browse files
sfrothwellpaulusmack
authored andcommitted
[POWERPC] Trivial ps3 warning fixes
Fixes warnings: arch/powerpc/platforms/ps3/system-bus.c: In function 'ps3_map_sg': arch/powerpc/platforms/ps3/system-bus.c:278: warning: unused variable 'i' arch/powerpc/platforms/ps3/system-bus.c:277: warning: unused variable 'dev' arch/powerpc/platforms/ps3/setup.c:103: warning: 'prealloc' defined but not used Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
1 parent bff8dde commit 435e0b2

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎arch/powerpc/platforms/ps3/setup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ static void ps3_panic(char *str)
9999
while(1);
100100
}
101101

102+
#ifdef CONFIG_FB_PS3
102103
static void prealloc(struct ps3_prealloc *p)
103104
{
104105
if (!p->size)
@@ -115,7 +116,6 @@ static void prealloc(struct ps3_prealloc *p)
115116
p->address);
116117
}
117118

118-
#ifdef CONFIG_FB_PS3
119119
struct ps3_prealloc ps3fb_videomemory = {
120120
.name = "ps3fb videomemory",
121121
.size = CONFIG_FB_PS3_DEFAULT_SIZE_M*1024*1024,

‎arch/powerpc/platforms/ps3/system-bus.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,13 @@ static void ps3_unmap_single(struct device *_dev, dma_addr_t dma_addr,
274274
static int ps3_map_sg(struct device *_dev, struct scatterlist *sg, int nents,
275275
enum dma_data_direction direction)
276276
{
277-
struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
278-
int i;
279-
280277
#if defined(CONFIG_PS3_DYNAMIC_DMA)
281278
BUG_ON("do");
282279
return -EPERM;
283280
#else
281+
struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
282+
int i;
283+
284284
for (i = 0; i < nents; i++, sg++) {
285285
int result = ps3_dma_map(dev->d_region,
286286
page_to_phys(sg->page) + sg->offset, sg->length,

0 commit comments

Comments
 (0)