From: Aaro Koskinen <aaro.koskinen@iki.fi> To: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas@winischhofer.net Cc: aaro.koskinen@iki.fi Subject: [PATCH 01/13] sisfb: eliminate unused variable compiler warning Date: Mon, 20 Dec 2010 23:50:10 +0200 [thread overview] Message-ID: <1292881822-32630-2-git-send-email-aaro.koskinen@iki.fi> (raw) In-Reply-To: <1292881822-32630-1-git-send-email-aaro.koskinen@iki.fi> 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> --- 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 7e3370f..436ae46 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) struct sis_video_info *ivideo = pci_get_drvdata(pdev); void __iomem *rom_base; unsigned char *myrombase = NULL; - u32 temp; size_t romsize; /* First, try the official pci ROM functions (except @@ -4132,26 +4131,29 @@ sisfb_find_rom(struct pci_dev *pdev) /* Otherwise do it the conventional way. */ #if defined(__i386__) || defined(__x86_64__) + { + u32 temp; - for(temp = 0x000c0000; temp < 0x000f0000; temp += 0x00001000) { + for (temp = 0x000c0000; temp < 0x000f0000; temp += 0x00001000) { - rom_base = ioremap(temp, 65536); - if(!rom_base) - continue; + rom_base = ioremap(temp, 65536); + if (!rom_base) + continue; - if(!sisfb_check_rom(rom_base, ivideo)) { - iounmap(rom_base); - continue; - } + if (!sisfb_check_rom(rom_base, ivideo)) { + iounmap(rom_base); + continue; + } - if((myrombase = vmalloc(65536))) - memcpy_fromio(myrombase, rom_base, 65536); + if ((myrombase = vmalloc(65536))) + memcpy_fromio(myrombase, rom_base, 65536); - iounmap(rom_base); - break; + iounmap(rom_base); + break; - } + } + } #endif return myrombase; -- 1.5.6.5
WARNING: multiple messages have this Message-ID (diff)
From: Aaro Koskinen <aaro.koskinen@iki.fi> To: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas@winischhofer.net Cc: aaro.koskinen@iki.fi Subject: [PATCH 01/13] sisfb: eliminate unused variable compiler warning Date: Mon, 20 Dec 2010 21:50:10 +0000 [thread overview] Message-ID: <1292881822-32630-2-git-send-email-aaro.koskinen@iki.fi> (raw) In-Reply-To: <1292881822-32630-1-git-send-email-aaro.koskinen@iki.fi> 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> --- 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 7e3370f..436ae46 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) struct sis_video_info *ivideo = pci_get_drvdata(pdev); void __iomem *rom_base; unsigned char *myrombase = NULL; - u32 temp; size_t romsize; /* First, try the official pci ROM functions (except @@ -4132,26 +4131,29 @@ sisfb_find_rom(struct pci_dev *pdev) /* Otherwise do it the conventional way. */ #if defined(__i386__) || defined(__x86_64__) + { + u32 temp; - for(temp = 0x000c0000; temp < 0x000f0000; temp += 0x00001000) { + for (temp = 0x000c0000; temp < 0x000f0000; temp += 0x00001000) { - rom_base = ioremap(temp, 65536); - if(!rom_base) - continue; + rom_base = ioremap(temp, 65536); + if (!rom_base) + continue; - if(!sisfb_check_rom(rom_base, ivideo)) { - iounmap(rom_base); - continue; - } + if (!sisfb_check_rom(rom_base, ivideo)) { + iounmap(rom_base); + continue; + } - if((myrombase = vmalloc(65536))) - memcpy_fromio(myrombase, rom_base, 65536); + if ((myrombase = vmalloc(65536))) + memcpy_fromio(myrombase, rom_base, 65536); - iounmap(rom_base); - break; + iounmap(rom_base); + break; - } + } + } #endif return myrombase; -- 1.5.6.5
next prev parent reply other threads:[~2010-12-20 21:52 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-12-20 21:50 [PATCH 00/13] Further sisfb cleanups Aaro Koskinen 2010-12-20 21:50 ` Aaro Koskinen 2010-12-20 21:50 ` Aaro Koskinen [this message] 2010-12-20 21:50 ` [PATCH 01/13] sisfb: eliminate unused variable compiler warning Aaro Koskinen 2010-12-20 21:50 ` [PATCH 02/13] sisfb: delete HAVE_CONFIG_H checks Aaro Koskinen 2010-12-20 21:50 ` Aaro Koskinen 2010-12-20 21:50 ` [PATCH 03/13] sisfb: remove duplicate function declarations Aaro Koskinen 2010-12-20 21:50 ` Aaro Koskinen 2010-12-20 21:50 ` [PATCH 04/13] sisfb: change register I/O functions to use fixed size types Aaro Koskinen 2010-12-20 21:50 ` Aaro Koskinen 2010-12-20 21:50 ` [PATCH 05/13] sisfb: replace inSISREG with SiS_GetRegByte Aaro Koskinen 2010-12-20 21:50 ` Aaro Koskinen 2010-12-20 21:50 ` [PATCH 06/13] sisfb: replace outSISREG with SiS_SetRegByte Aaro Koskinen 2010-12-20 21:50 ` Aaro Koskinen 2010-12-20 21:50 ` [PATCH 07/13] sisfb: replace inSISIDXREG with SiS_GetReg Aaro Koskinen 2010-12-20 21:50 ` Aaro Koskinen 2010-12-20 21:50 ` [PATCH 08/13] sisfb: replace outSISIDXREG with SiS_SetReg Aaro Koskinen 2010-12-20 21:50 ` Aaro Koskinen 2010-12-20 21:50 ` [PATCH 09/13] sisfb: replace orSISIDXREG with SiS_SetRegOR Aaro Koskinen 2010-12-20 21:50 ` Aaro Koskinen 2010-12-20 21:50 ` [PATCH 10/13] sisfb: replace andSISIDXREG with SiS_SetRegAND Aaro Koskinen 2010-12-20 21:50 ` Aaro Koskinen 2010-12-20 21:50 ` [PATCH 11/13] sisfb: replace setSISIDXREG with SiS_SetRegANDOR Aaro Koskinen 2010-12-20 21:50 ` Aaro Koskinen 2010-12-20 21:50 ` [PATCH 12/13] sisfb: delete unused register I/O macros Aaro Koskinen 2010-12-20 21:50 ` Aaro Koskinen 2010-12-20 21:50 ` [PATCH 13/13] sisfb: eliminate compiler warnings Aaro Koskinen 2010-12-20 21:50 ` Aaro Koskinen 2010-12-22 4:00 ` [PATCH 00/13] Further sisfb cleanups Paul Mundt 2010-12-22 4:00 ` Paul Mundt
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1292881822-32630-2-git-send-email-aaro.koskinen@iki.fi \ --to=aaro.koskinen@iki.fi \ --cc=linux-fbdev@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=thomas@winischhofer.net \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.