diff mbox

[1/6] powerpc/kvm: Clarify __user annotations

Message ID 1467616182-30886-1-git-send-email-dja@axtens.net (mailing list archive)
State Superseded
Headers show

Commit Message

Daniel Axtens July 4, 2016, 7:09 a.m. UTC
kvmppc_h_put_tce_indirect labels a u64 pointer as __user. It also
labelled the u64 where get_user puts the result as __user. This isn't
a pointer and so doesn't need to be labelled __user.

Split the u64 value definition onto a new line to make it clear that
it doesn't get the annotation.

Signed-off-by: Daniel Axtens <dja@axtens.net>
---
 arch/powerpc/kvm/book3s_64_vio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Andrew Donnellan July 4, 2016, 7:26 a.m. UTC | #1
On 04/07/16 17:09, Daniel Axtens wrote:
> kvmppc_h_put_tce_indirect labels a u64 pointer as __user. It also
> labelled the u64 where get_user puts the result as __user. This isn't
> a pointer and so doesn't need to be labelled __user.
>
> Split the u64 value definition onto a new line to make it clear that
> it doesn't get the annotation.
>
> Signed-off-by: Daniel Axtens <dja@axtens.net>

Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
diff mbox

Patch

diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c
index 18cf6d1f8174..c379ff5a4438 100644
--- a/arch/powerpc/kvm/book3s_64_vio.c
+++ b/arch/powerpc/kvm/book3s_64_vio.c
@@ -242,7 +242,8 @@  long kvmppc_h_put_tce_indirect(struct kvm_vcpu *vcpu,
 	struct kvmppc_spapr_tce_table *stt;
 	long i, ret = H_SUCCESS, idx;
 	unsigned long entry, ua = 0;
-	u64 __user *tces, tce;
+	u64 __user *tces;
+	u64 tce;
 
 	stt = kvmppc_find_table(vcpu, liobn);
 	if (!stt)