On 16.07.2018 07:45, Peter Xu wrote: > Fix errors like: > > x86/umip.c: In function ‘main’: > x86/umip.c:180:20: error: passing argument 1 of ‘test_umip_nogp’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] > test_umip_nogp("UMIP=0, CPL=0\n"); > > Signed-off-by: Peter Xu <peterx@xxxxxxxxxx> > --- > x86/umip.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/x86/umip.c b/x86/umip.c > index c1a40d6..cda1971 100644 > --- a/x86/umip.c > +++ b/x86/umip.c > @@ -71,7 +71,7 @@ static void do_movcr(void) > GP_ASM("mov %%cr0, %%" R "ax", , "eax"); > } > > -static void test_umip_nogp(char *msg) > +static void test_umip_nogp(const char *msg) > { > puts(msg); > > @@ -91,7 +91,7 @@ static void test_umip_nogp(char *msg) > } > } > > -static void test_umip_gp(char *msg) > +static void test_umip_gp(const char *msg) > { > puts(msg); > > @@ -113,7 +113,7 @@ static void test_umip_gp(char *msg) > > /* The ugly mode switching code */ > > -int do_ring3(void (*fn)(char *), char *arg) > +int do_ring3(void (*fn)(const char *), const char *arg) > { > static unsigned char user_stack[4096]; > int ret; > Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>