]> git.baikalelectronics.ru Git - kernel.git/commit
i386: msr.h: be paranoid about types and parentheses
authorH. Peter Anvin <hpa@zytor.com>
Wed, 9 May 2007 07:02:11 +0000 (00:02 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 9 May 2007 19:49:33 +0000 (12:49 -0700)
commit856acd97ad48d03f45e2b5177ef2fd10c26630d7
tree69d6ebfed9c252e8689001a82dc438a74f89fd46
parentbe94672ad5bac27a6f14c06014e3170ef57820e7
i386: msr.h: be paranoid about types and parentheses

When implementing things as macros, make sure we use typecasts and
parentheses where needed.  The macros as defined were vulnerable to
surreptitious promotion causing problems.

Avoid macros where practical; e.g. wrmsr() can be an inline instead.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/asm-i386/msr.h