lkml.org 
[lkml]   [2012]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/2] perf/probe: verify instruction/offset in perf before adding a uprobe
To verify instruction/offset in perf, before adding a uprobe we
need to use arc/x86/lib/insn.c from perf code. Since perf Makefile
enables -Wswitch-default flag it causes build warnings/failures. This
patch is to address the build warnings in insn.c.


Signed-off-by: Prashanth Nageshappa <prashanth@linux.vnet.ibm.com>
---

arch/x86/lib/insn.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/x86/lib/insn.c b/arch/x86/lib/insn.c
index 25feb1a..b9e42f1 100644
--- a/arch/x86/lib/insn.c
+++ b/arch/x86/lib/insn.c
@@ -397,6 +397,8 @@ static void __get_moffset(struct insn *insn)
insn->moffset2.value = get_next(int, insn);
insn->moffset2.nbytes = 4;
break;
+ default:
+ break;
}
insn->moffset1.got = insn->moffset2.got = 1;

@@ -417,6 +419,8 @@ static void __get_immv32(struct insn *insn)
insn->immediate.value = get_next(int, insn);
insn->immediate.nbytes = 4;
break;
+ default:
+ break;
}

err_out:
@@ -441,6 +445,8 @@ static void __get_immv(struct insn *insn)
insn->immediate2.value = get_next(int, insn);
insn->immediate2.nbytes = 4;
break;
+ default:
+ break;
}
insn->immediate1.got = insn->immediate2.got = 1;

@@ -463,6 +469,8 @@ static void __get_immptr(struct insn *insn)
case 8:
/* ptr16:64 is not exist (no segment) */
return;
+ default:
+ break;
}
insn->immediate2.value = get_next(unsigned short, insn);
insn->immediate2.nbytes = 2;


\
 
 \ /
  Last update: 2012-04-12 11:33    [W:0.072 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site