Linux-Next discussions
 help / color / mirror / Atom feed
* linux-next: kvm tree build warning
@ 2009-07-06  1:37 Stephen Rothwell
  2009-07-06  5:28 ` Gleb Natapov
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2009-07-06  1:37 UTC (permalink / raw)
  To: Avi Kivity; +Cc: linux-next, linux-kernel, Gleb Natapov

[-- Attachment #1: Type: text/plain, Size: 440 bytes --]

Hi Avi,

Today's linux-next build (x86_64_allmodconfig) produced this warning:

arch/x86/kvm/lapic.c: In function 'apic_mmio_write':
arch/x86/kvm/lapic.c:834: warning: 'return' with no value, in function returning non-void

Introduced by commit 55b23c7377c9f9f0b4a4b90950f0e18b26ac45e8 ("KVM:
x2apic interface to lapic").

-- 
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: linux-next: kvm tree build warning
  2009-07-06  1:37 linux-next: kvm tree build warning Stephen Rothwell
@ 2009-07-06  5:28 ` Gleb Natapov
  2009-07-06  6:01   ` Stephen Rothwell
  0 siblings, 1 reply; 8+ messages in thread
From: Gleb Natapov @ 2009-07-06  5:28 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Avi Kivity, linux-next, linux-kernel

On Mon, Jul 06, 2009 at 11:37:52AM +1000, Stephen Rothwell wrote:
> Hi Avi,
> 
> Today's linux-next build (x86_64_allmodconfig) produced this warning:
> 
> arch/x86/kvm/lapic.c: In function 'apic_mmio_write':
> arch/x86/kvm/lapic.c:834: warning: 'return' with no value, in function returning non-void
> 
> Introduced by commit 55b23c7377c9f9f0b4a4b90950f0e18b26ac45e8 ("KVM:
> x2apic interface to lapic").
> 
Yes sorry. I see that Sheng Yang already posted the fix.

--
			Gleb.

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

* Re: linux-next: kvm tree build warning
  2009-07-06  5:28 ` Gleb Natapov
@ 2009-07-06  6:01   ` Stephen Rothwell
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2009-07-06  6:01 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: Avi Kivity, linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]

Hi Gleb,

On Mon, 6 Jul 2009 08:28:55 +0300 Gleb Natapov <gleb@redhat.com> wrote:
>
> Yes sorry. I see that Sheng Yang already posted the fix.

Thanks.

-- 
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

* linux-next: kvm tree build warning
@ 2010-01-11  8:25 Stephen Rothwell
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2010-01-11  8:25 UTC (permalink / raw)
  To: Avi Kivity; +Cc: linux-next, linux-kernel, Alexander Graf

[-- Attachment #1: Type: text/plain, Size: 518 bytes --]

Hi Avi,

Today's linux-next build (powerpc allyesconfig) produced this warning:

arch/powerpc/kvm/powerpc.c: In function 'kvm_arch_vcpu_ioctl_run':
arch/powerpc/kvm/powerpc.c:278: warning: 'gpr' may be used uninitialized in this function

Yes, I know it is probably a false positive.

Introduced by commit 7f31fad9aad3bb9df95793d72e037bb4d587ee83 ("KVM: PPC:
Use accessor functions for GPR access").
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* linux-next: kvm tree build warning
@ 2010-01-20  6:38 Stephen Rothwell
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2010-01-20  6:38 UTC (permalink / raw)
  Cc: linux-next, linux-kernel, Alexander Graf, ppc

[-- Attachment #1: Type: text/plain, Size: 598 bytes --]

Hi all,

Today's linux-next build (powerpc allyesconfig) produced this warning:

arch/powerpc/kvm/book3s.c: In function '__kvmppc_vcpu_run':
arch/powerpc/kvm/book3s.c:1102: warning: 'ext_bkp.vrsave' may be used uninitialized in this function

Introduced by commit 2609c1d06b6a7952273fb33b33ad32aff0628146 ("KVM: PPC:
Add support for FPU/Altivec/VSX").  This *may* be a false positive but
will be a problem for normal builds where warnings are treated as errors
in arch/powerpc.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* linux-next: kvm tree build warning
@ 2010-01-20  6:48 Stephen Rothwell
  2010-01-20 10:42 ` Alexander Graf
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2010-01-20  6:48 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti
  Cc: linux-next, linux-kernel, Alexander Graf, ppc-dev

[-- Attachment #1: Type: text/plain, Size: 670 bytes --]

[Not sure what happened to the previous versions To/CC lists, sorry]

Hi all,

Today's linux-next build (powerpc allyesconfig) produced this warning:

arch/powerpc/kvm/book3s.c: In function '__kvmppc_vcpu_run':
arch/powerpc/kvm/book3s.c:1102: warning: 'ext_bkp.vrsave' may be used uninitialized in this function

Introduced by commit 2609c1d06b6a7952273fb33b33ad32aff0628146 ("KVM: PPC:
Add support for FPU/Altivec/VSX").  This *may* be a false positive but
will be a problem for normal builds where warnings are treated as errors
in arch/powerpc.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: linux-next: kvm tree build warning
  2010-01-20  6:48 Stephen Rothwell
@ 2010-01-20 10:42 ` Alexander Graf
  2010-01-20 13:01   ` Stephen Rothwell
  0 siblings, 1 reply; 8+ messages in thread
From: Alexander Graf @ 2010-01-20 10:42 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Avi Kivity, Marcelo Tosatti, linux-next, linux-kernel, ppc-dev


On 20.01.2010, at 07:48, Stephen Rothwell wrote:

> [Not sure what happened to the previous versions To/CC lists, sorry]
> 
> Hi all,
> 
> Today's linux-next build (powerpc allyesconfig) produced this warning:
> 
> arch/powerpc/kvm/book3s.c: In function '__kvmppc_vcpu_run':
> arch/powerpc/kvm/book3s.c:1102: warning: 'ext_bkp.vrsave' may be used uninitialized in this function
> 
> Introduced by commit 2609c1d06b6a7952273fb33b33ad32aff0628146 ("KVM: PPC:
> Add support for FPU/Altivec/VSX").  This *may* be a false positive but
> will be a problem for normal builds where warnings are treated as errors
> in arch/powerpc.


This is odd. The same function saves and restores ext_bkp.vrsave under a common condition:

        if (save_vec) {
                if (current->thread.regs->msr & MSR_VEC)
                        giveup_altivec(current);
                memcpy(ext_bkp.vr, current->thread.vr, sizeof(ext_bkp.vr));
                ext_bkp.vscr = current->thread.vscr;
                ext_bkp.vrsave = current->thread.vrsave;
        }


[...]

        if (save_vec && current->thread.used_vr) {
                memcpy(current->thread.vr, ext_bkp.vr, sizeof(ext_bkp.vr));
                current->thread.vscr = ext_bkp.vscr;
                current->thread.vrsave = ext_bkp.vrsave;
        }


So there can't be a case where ext_bkp.vrsave is read, but not written to before, which is what this warning implies, right?
Also, why doesn't gcc complain about vscr too then? They're both used in the very same if statement.

Additionally, while compiling locally I looked for warnings and didn't spot any. So apparently our compiler versions / options don't match. Which version of gcc are you using? I assume a gcc bug.

$ gcc --version
gcc (SUSE Linux) 4.3.2 [gcc-4_3-branch revision 141291]


Alex

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

* Re: linux-next: kvm tree build warning
  2010-01-20 10:42 ` Alexander Graf
@ 2010-01-20 13:01   ` Stephen Rothwell
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2010-01-20 13:01 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Avi Kivity, Marcelo Tosatti, linux-next, linux-kernel, ppc-dev

[-- Attachment #1: Type: text/plain, Size: 928 bytes --]

Hi Alex,

On Wed, 20 Jan 2010 11:42:28 +0100 Alexander Graf <agraf@suse.de> wrote:
>
> This is odd. The same function saves and restores ext_bkp.vrsave under a common condition:
> 
> So there can't be a case where ext_bkp.vrsave is read, but not written to before, which is what this warning implies, right?

Right.

> Also, why doesn't gcc complain about vscr too then? They're both used in the very same if statement.

I have no idea how gcc makes these decisions. :-(

> Additionally, while compiling locally I looked for warnings and didn't spot any. So apparently our compiler versions / options don't match. Which version of gcc are you using? I assume a gcc bug.
> 
> $ gcc --version
> gcc (SUSE Linux) 4.3.2 [gcc-4_3-branch revision 141291]

I use a 4.4.0 cross compiler (I should update it).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

end of thread, other threads:[~2010-01-20 13:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-06  1:37 linux-next: kvm tree build warning Stephen Rothwell
2009-07-06  5:28 ` Gleb Natapov
2009-07-06  6:01   ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2010-01-11  8:25 Stephen Rothwell
2010-01-20  6:38 Stephen Rothwell
2010-01-20  6:48 Stephen Rothwell
2010-01-20 10:42 ` Alexander Graf
2010-01-20 13:01   ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox