* [PATCH] Fix arch/x86/kernel/cpu/mtrr/main.c build warning
@ 2008-11-20 18:03 Richard A. Holden III
2008-11-20 18:03 ` [PATCH] Remove unused variables from the cirrusfb driver Richard A. Holden III
0 siblings, 1 reply; 8+ messages in thread
From: Richard A. Holden III @ 2008-11-20 18:03 UTC (permalink / raw)
To: linux-next; +Cc: linux-kernel
Fix
arch/x86/kernel/cpu/mtrr/main.c: In function 'mtrr_bp_init':
arch/x86/kernel/cpu/mtrr/main.c:1364: warning: 'gran_base' may be used uninitialized in this function
gran_base is only used within the if (debug_print) sections of the for loop, so combine both sections
and move the declaration to within if (debug_print). The overhead of to_size_factor may be a consideration
but the compiler should be able to optimize out the multiple calls.
Signed-off-by: Richard A. Holden III <aciddeath@gmail.com>
---
arch/x86/kernel/cpu/mtrr/main.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
index c091d06..b751e3a 100644
--- a/arch/x86/kernel/cpu/mtrr/main.c
+++ b/arch/x86/kernel/cpu/mtrr/main.c
@@ -1360,20 +1360,16 @@ static int __init mtrr_cleanup(unsigned address_bits)
memset(min_loss_pfn, 0xff, sizeof(min_loss_pfn));
memset(result, 0, sizeof(result));
for (gran_size = (1ULL<<16); gran_size < (1ULL<<32); gran_size <<= 1) {
- char gran_factor;
- unsigned long gran_base;
-
- if (debug_print)
- gran_base = to_size_factor(gran_size >> 10, &gran_factor);
for (chunk_size = gran_size; chunk_size < (1ULL<<32);
chunk_size <<= 1) {
int num_reg;
if (debug_print) {
- char chunk_factor;
- unsigned long chunk_base;
+ char gran_factor, chunk_factor;
+ unsigned long gran_base, chunk_base;
+ gran_base = to_size_factor(gran_size >> 10, &gran_factor);
chunk_base = to_size_factor(chunk_size>>10, &chunk_factor),
printk(KERN_INFO "\n");
printk(KERN_INFO "gran_size: %ld%c chunk_size: %ld%c \n",
--
1.5.6.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] Remove unused variables from the cirrusfb driver
2008-11-20 18:03 [PATCH] Fix arch/x86/kernel/cpu/mtrr/main.c build warning Richard A. Holden III
@ 2008-11-20 18:03 ` Richard A. Holden III
2008-11-20 18:03 ` [PATCH] Remove unused variable from tlv320aic23 codec Richard A. Holden III
2008-11-20 23:34 ` [PATCH] Remove unused variables from the cirrusfb driver Stephen Rothwell
0 siblings, 2 replies; 8+ messages in thread
From: Richard A. Holden III @ 2008-11-20 18:03 UTC (permalink / raw)
To: linux-next; +Cc: linux-kernel
Remove i and s vars from cirrusfb_setup as they are not used
anywhere in that function. This fixes 2 unused vars build warnings.
Signed-off-by: Richard A. Holden III <aciddeath@gmail.com>
---
drivers/video/cirrusfb.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c
index 8a87602..a2aa6dd 100644
--- a/drivers/video/cirrusfb.c
+++ b/drivers/video/cirrusfb.c
@@ -2462,8 +2462,7 @@ static int __init cirrusfb_init(void)
#ifndef MODULE
static int __init cirrusfb_setup(char *options) {
- char *this_opt, s[32];
- int i;
+ char *this_opt;
DPRINTK("ENTER\n");
--
1.5.6.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] Remove unused variable from tlv320aic23 codec
2008-11-20 18:03 ` [PATCH] Remove unused variables from the cirrusfb driver Richard A. Holden III
@ 2008-11-20 18:03 ` Richard A. Holden III
2008-11-20 18:56 ` Mark Brown
2008-11-24 13:24 ` [alsa-devel] " Takashi Iwai
2008-11-20 23:34 ` [PATCH] Remove unused variables from the cirrusfb driver Stephen Rothwell
1 sibling, 2 replies; 8+ messages in thread
From: Richard A. Holden III @ 2008-11-20 18:03 UTC (permalink / raw)
To: linux-next
Cc: linux-kernel, Jaroslav Kysela, Takashi Iwai, Liam Girdwood,
Mark Brown, alsa-devel
Remove codec var from tlv320aic23_set_dai_sysclk, it is assigned to
but never read.
Signed-off-by: Richard A. Holden III <aciddeath@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org
---
sound/soc/codecs/tlv320aic23.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c
index 44308da..45395d0 100644
--- a/sound/soc/codecs/tlv320aic23.c
+++ b/sound/soc/codecs/tlv320aic23.c
@@ -421,8 +421,6 @@ static int tlv320aic23_set_dai_fmt(struct snd_soc_dai *codec_dai,
static int tlv320aic23_set_dai_sysclk(struct snd_soc_dai *codec_dai,
int clk_id, unsigned int freq, int dir)
{
- struct snd_soc_codec *codec = codec_dai->codec;
-
switch (freq) {
case 12000000:
return 0;
--
1.5.6.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] Remove unused variable from tlv320aic23 codec
2008-11-20 18:03 ` [PATCH] Remove unused variable from tlv320aic23 codec Richard A. Holden III
@ 2008-11-20 18:56 ` Mark Brown
2008-11-24 13:24 ` [alsa-devel] " Takashi Iwai
1 sibling, 0 replies; 8+ messages in thread
From: Mark Brown @ 2008-11-20 18:56 UTC (permalink / raw)
To: Richard A. Holden III
Cc: alsa-devel, Takashi Iwai, linux-kernel, linux-next, Liam Girdwood
On Thu, Nov 20, 2008 at 11:03:23AM -0700, Richard A. Holden III wrote:
> Remove codec var from tlv320aic23_set_dai_sysclk, it is assigned to
> but never read.
This does not apply - it looks like you've generated it against code
from before commit 26df91c3 (ASoC: TLV320AIC23B Support more sample
rates) from 5th November which rewrote all this code.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Remove unused variables from the cirrusfb driver
2008-11-20 18:03 ` [PATCH] Remove unused variables from the cirrusfb driver Richard A. Holden III
2008-11-20 18:03 ` [PATCH] Remove unused variable from tlv320aic23 codec Richard A. Holden III
@ 2008-11-20 23:34 ` Stephen Rothwell
2008-11-21 6:12 ` Richard Holden
1 sibling, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2008-11-20 23:34 UTC (permalink / raw)
To: Richard A. Holden III; +Cc: linux-next, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 503 bytes --]
Hi Richard,
On Thu, 20 Nov 2008 11:03:22 -0700 "Richard A. Holden III" <aciddeath@gmail.com> wrote:
>
> Remove i and s vars from cirrusfb_setup as they are not used
> anywhere in that function. This fixes 2 unused vars build warnings.
Thanks for the patch, but this is already fixed in mainline (commit
ee11940f8e7a2f064af22d52180cb5f9643eef61 "cirrusfb: remove unused
variables").
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Remove unused variables from the cirrusfb driver
2008-11-20 23:34 ` [PATCH] Remove unused variables from the cirrusfb driver Stephen Rothwell
@ 2008-11-21 6:12 ` Richard Holden
2008-11-21 6:40 ` Stephen Rothwell
0 siblings, 1 reply; 8+ messages in thread
From: Richard Holden @ 2008-11-21 6:12 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linux-next, linux-kernel
On Nov 20, 2008, at 4:34 PM, Stephen Rothwell wrote:
> Hi Richard,
>
> On Thu, 20 Nov 2008 11:03:22 -0700 "Richard A. Holden III" <aciddeath@gmail.com
> > wrote:
>>
>> Remove i and s vars from cirrusfb_setup as they are not used
>> anywhere in that function. This fixes 2 unused vars build warnings.
>
> Thanks for the patch, but this is already fixed in mainline (commit
> ee11940f8e7a2f064af22d52180cb5f9643eef61 "cirrusfb: remove unused
> variables").
>
> --
> Cheers,
> Stephen Rothwell sfr@canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/
Am I right in assuming you pulled mainline before this commit for
next-20081120? I don't see the changelog in next and I'm getting the
build warnings still, but I can recheck this in the next version of
next.
-Richard Holden
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Remove unused variables from the cirrusfb driver
2008-11-21 6:12 ` Richard Holden
@ 2008-11-21 6:40 ` Stephen Rothwell
0 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2008-11-21 6:40 UTC (permalink / raw)
To: Richard Holden; +Cc: linux-next, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 601 bytes --]
Hi Richard,
On Thu, 20 Nov 2008 23:12:42 -0700 Richard Holden <aciddeath@gmail.com> wrote:
>
> Am I right in assuming you pulled mainline before this commit for
> next-20081120? I don't see the changelog in next and I'm getting the
> build warnings still, but I can recheck this in the next version of
> next.
Yes, I refetch all the trees before I begin building the tree each day.
That patch went to Linus yesterday so it will be in today's linux-next
when I release it.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [alsa-devel] [PATCH] Remove unused variable from tlv320aic23 codec
2008-11-20 18:03 ` [PATCH] Remove unused variable from tlv320aic23 codec Richard A. Holden III
2008-11-20 18:56 ` Mark Brown
@ 2008-11-24 13:24 ` Takashi Iwai
1 sibling, 0 replies; 8+ messages in thread
From: Takashi Iwai @ 2008-11-24 13:24 UTC (permalink / raw)
To: Richard A. Holden III
Cc: linux-next, alsa-devel, Mark Brown, linux-kernel, Liam Girdwood
At Thu, 20 Nov 2008 11:03:23 -0700,
Richard A. Holden III wrote:
>
> Remove codec var from tlv320aic23_set_dai_sysclk, it is assigned to
> but never read.
>
> Signed-off-by: Richard A. Holden III <aciddeath@gmail.com>
>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: Liam Girdwood <lrg@slimlogic.co.uk>
> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
> Cc: alsa-devel@alsa-project.org
> ---
> sound/soc/codecs/tlv320aic23.c | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
This is already fixed in the upstream, but pretty differently.
Takashi
> diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c
> index 44308da..45395d0 100644
> --- a/sound/soc/codecs/tlv320aic23.c
> +++ b/sound/soc/codecs/tlv320aic23.c
> @@ -421,8 +421,6 @@ static int tlv320aic23_set_dai_fmt(struct snd_soc_dai *codec_dai,
> static int tlv320aic23_set_dai_sysclk(struct snd_soc_dai *codec_dai,
> int clk_id, unsigned int freq, int dir)
> {
> - struct snd_soc_codec *codec = codec_dai->codec;
> -
> switch (freq) {
> case 12000000:
> return 0;
> --
> 1.5.6.4
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-11-24 13:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-20 18:03 [PATCH] Fix arch/x86/kernel/cpu/mtrr/main.c build warning Richard A. Holden III
2008-11-20 18:03 ` [PATCH] Remove unused variables from the cirrusfb driver Richard A. Holden III
2008-11-20 18:03 ` [PATCH] Remove unused variable from tlv320aic23 codec Richard A. Holden III
2008-11-20 18:56 ` Mark Brown
2008-11-24 13:24 ` [alsa-devel] " Takashi Iwai
2008-11-20 23:34 ` [PATCH] Remove unused variables from the cirrusfb driver Stephen Rothwell
2008-11-21 6:12 ` Richard Holden
2008-11-21 6:40 ` Stephen Rothwell
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).