diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2010-12-20 16:50:10 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-12-21 22:56:30 -0500 |
commit | 679c489fffe1ca426de1faa1ba51f0413149d139 (patch) | |
tree | d10fa2cede8805241c8e300b785c869426637aa0 /drivers | |
parent | 7ccbefe07ea0a3570e44d1ec13a307552ee4dadd (diff) |
sisfb: eliminate unused variable compiler warning
Eliminate the following compiler warning on non-x86 platforms by limiting
the variable scope:
drivers/video/sis/sis_main.c:4108: warning: unused variable 'temp'
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/sis/sis_main.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c index 7e3370f115b6..436ae4697ceb 100644 --- a/drivers/video/sis/sis_main.c +++ b/drivers/video/sis/sis_main.c | |||
@@ -4105,7 +4105,6 @@ sisfb_find_rom(struct pci_dev *pdev) | |||
4105 | struct sis_video_info *ivideo = pci_get_drvdata(pdev); | 4105 | struct sis_video_info *ivideo = pci_get_drvdata(pdev); |
4106 | void __iomem *rom_base; | 4106 | void __iomem *rom_base; |
4107 | unsigned char *myrombase = NULL; | 4107 | unsigned char *myrombase = NULL; |
4108 | u32 temp; | ||
4109 | size_t romsize; | 4108 | size_t romsize; |
4110 | 4109 | ||
4111 | /* First, try the official pci ROM functions (except | 4110 | /* First, try the official pci ROM functions (except |
@@ -4132,26 +4131,29 @@ sisfb_find_rom(struct pci_dev *pdev) | |||
4132 | /* Otherwise do it the conventional way. */ | 4131 | /* Otherwise do it the conventional way. */ |
4133 | 4132 | ||
4134 | #if defined(__i386__) || defined(__x86_64__) | 4133 | #if defined(__i386__) || defined(__x86_64__) |
4134 | { | ||
4135 | u32 temp; | ||
4135 | 4136 | ||
4136 | for(temp = 0x000c0000; temp < 0x000f0000; temp += 0x00001000) { | 4137 | for (temp = 0x000c0000; temp < 0x000f0000; temp += 0x00001000) { |
4137 | 4138 | ||
4138 | rom_base = ioremap(temp, 65536); | 4139 | rom_base = ioremap(temp, 65536); |
4139 | if(!rom_base) | 4140 | if (!rom_base) |
4140 | continue; | 4141 | continue; |
4141 | 4142 | ||
4142 | if(!sisfb_check_rom(rom_base, ivideo)) { | 4143 | if (!sisfb_check_rom(rom_base, ivideo)) { |
4143 | iounmap(rom_base); | 4144 | iounmap(rom_base); |
4144 | continue; | 4145 | continue; |
4145 | } | 4146 | } |
4146 | 4147 | ||
4147 | if((myrombase = vmalloc(65536))) | 4148 | if ((myrombase = vmalloc(65536))) |
4148 | memcpy_fromio(myrombase, rom_base, 65536); | 4149 | memcpy_fromio(myrombase, rom_base, 65536); |
4149 | 4150 | ||
4150 | iounmap(rom_base); | 4151 | iounmap(rom_base); |
4151 | break; | 4152 | break; |
4152 | 4153 | ||
4153 | } | 4154 | } |
4154 | 4155 | ||
4156 | } | ||
4155 | #endif | 4157 | #endif |
4156 | 4158 | ||
4157 | return myrombase; | 4159 | return myrombase; |