Skip to content

Commit 7f2dcc7

Browse files
keeshdeller
authored andcommitted
parisc: math-emu: Avoid "fmt" macro collision
The printk "fmt" macro was colliding. Rename like the others with a "bits" suffix. Fixes a build failure: arch/parisc/math-emu/decode_exc.c: In function 'decode_fpu': arch/parisc/math-emu/decode_exc.c:49:14: error: expected identifier before numeric constant 49 | #define fmt 11 /* bits 19 & 20 */ | ^~ ./include/linux/printk.h:379:6: note: in expansion of macro 'fmt' 379 | .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \ | ^~~ ./include/linux/printk.h:417:3: note: in expansion of macro '__printk_index_emit' 417 | __printk_index_emit(_fmt, NULL, NULL); \ | ^~~~~~~~~~~~~~~~~~~ ./include/linux/printk.h:446:26: note: in expansion of macro 'printk_index_wrap' 446 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~ arch/parisc/math-emu/decode_exc.c:339:3: note: in expansion of macro 'printk' 339 | printk("%s(%d) Unknown FPU exception 0x%x\n", __FILE__, | ^~~~~~ Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com> Cc: Helge Deller <deller@gmx.de> Cc: linux-parisc@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 55b70ee commit 7f2dcc7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/parisc/math-emu/decode_exc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
#define SIGNALCODE(signal, code) ((signal) << 24 | (code))
4747
#define copropbit 1<<31-2 /* bit position 2 */
4848
#define opclass 9 /* bits 21 & 22 */
49-
#define fmt 11 /* bits 19 & 20 */
49+
#define fmtbits 11 /* bits 19 & 20 */
5050
#define df 13 /* bits 17 & 18 */
5151
#define twobits 3 /* mask low-order 2 bits */
5252
#define fivebits 31 /* mask low-order 5 bits */
@@ -57,7 +57,7 @@
5757
#define Excp_instr(index) Instructionfield(Fpu_register[index])
5858
#define Clear_excp_register(index) Allexception(Fpu_register[index]) = 0
5959
#define Excp_format() \
60-
(current_ir >> ((current_ir>>opclass & twobits)==1 ? df : fmt) & twobits)
60+
(current_ir >> ((current_ir>>opclass & twobits) == 1 ? df : fmtbits) & twobits)
6161

6262
/* Miscellaneous definitions */
6363
#define Fpu_sgl(index) Fpu_register[index*2]

0 commit comments

Comments
 (0)