msr: Rearrange return values.
PATCH v2 1/1 msr: Rearrange return values.
Rearrange return values in the function declaration of rdmsr.h and wrmsr.h.
--- include/grub/i386/rdmsr.h | 3 ++- include/grub/i386/wrmsr.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
include/grub/i386/rdmsr.h +2 -1
@@ -24,7 +24,8 @@* Accessing a reserved or unimplemented MSR address results in a GP#. */ -extern inline grub_uint64_t grub_msr_read (grub_uint32_t msr_id) +inline grub_uint64_t +grub_msr_read (grub_uint32_t msr_id) {grub_uint32_t low, high;
include/grub/i386/wrmsr.h +2 -1
@@ -24,7 +24,8 @@* Accessing a reserved or unimplemented MSR address results in a GP#. */ -extern inline void grub_msr_write (grub_uint32_t msr_id,grub_uint64_t msr_value) +inline void +grub_msr_write (grub_uint32_t msr_id,grub_uint64_t msr_value) {grub_uint32_t low = msr_value, high = msr_value >>32 ;
Signature · 1 line
2.17.1
CC-ing Eric.
Quoted 1 line · Jesús Diéguez Fernández
Rearrange return values in the function declaration of
rdmsr.handwrmsr.h.
The most important thing here is extern drop. By the way we do cleanup. Anyway, I can fix the commit message before push if you do not object. So, Reviewed-by: Daniel Kiper <[email protected]>
Daniel
Quoted 8 lines · Daniel Kiper
CC-ing Eric.
Quoted 1 line · Jesús Diéguez Fernández
Rearrange return values in the function declaration of
rdmsr.handwrmsr.h.The most important thing here is extern drop. By the way we do cleanup. Anyway, I can fix the commit message before push if you do not object. So, Reviewed-by: Daniel Kiper <[email protected]>
Err... Forgot to CC Eric. So, again this time with Eric address. Eric, could you test this patch?
Daniel
Quoted 7 lines · Daniel Kiper
Quoted 3 lines · Daniel Kiper
CC-ing Eric.
On Mon, Mar 25, 2019 at 07:37:29PM +0100, Jesús Diéguez Fernández wrote:
Quoted 9 lines
Quoted 5 lines
Quoted 1 line
Rearrange return values in the function declaration of
rdmsr.handwrmsr.h.The most important thing here is extern drop. By the way we do cleanup. Anyway, I can fix the commit message before push if you do not object. So, Reviewed-by: Daniel Kiper <[email protected]>
Err... Forgot to CC Eric. So, again this time with Eric address. Eric, could you test this patch?
The V1 patch compiles and builds fine.
I see compile errors with the V2 patch on OL7.6:
In file included from commands/i386/rdmsr.c:29:0:../include/grub/i386/rdmsr.h:28:1: error: no previous prototype for _grub_msr_read_ [-Werror=missing-prototypes]
grub_msr_read (grub_uint32_t msr_id)
^
In file included from commands/i386/wrmsr.c:29:0:../include/grub/i386/wrmsr.h:28:1: error: no previous prototype for _grub_msr_write_ [-Werror=missing-prototypes]
grub_msr_write (grub_uint32_t msr_id, grub_uint64_t msr_value)
^
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
Quoted 19 lines · Eric Snowberg
Quoted 5 lines · Daniel Kiper
Quoted 3 lines · Daniel Kiper
CC-ing Eric.
On Mon, Mar 25, 2019 at 07:37:29PM +0100, Jesús Diéguez Fernández wrote:
Quoted 9 lines
Quoted 5 lines
Quoted 1 line
Rearrange return values in the function declaration of
rdmsr.handwrmsr.h.The most important thing here is extern drop. By the way we do cleanup. Anyway, I can fix the commit message before push if you do not object. So, Reviewed-by: Daniel Kiper <[email protected]>
Err... Forgot to CC Eric. So, again this time with Eric address. Eric, could you test this patch?
The V1 patch compiles and builds fine.
I see compile errors with the V2 patch on OL7.6:
Quoted 10 lines
In file included from
commands/i386/rdmsr.c:29:0:../include/grub/i386/rdmsr.h:28:1: error: no previous prototype for _grub_msr_read_ [-Werror=missing-prototypes]
grub_msr_read(grub_uint32_tmsr_id)
^
In file included fromcommands/i386/wrmsr.c:29:0:../include/grub/i386/wrmsr.h:28:1: error: no previous prototype for _grub_msr_write_ [-Werror=missing-prototypes]
grub_msr_write(grub_uint32_tmsr_id,grub_uint64_tmsr_value)
^
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
Hmmm... That looks strange. Will take closer look at it.
Daniel