linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arch: net: bpf_jit_comp: Fixed coding style issues.
@ 2012-02-03  0:38 Mbarek Firas
  2012-02-04 21:51 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Mbarek Firas @ 2012-02-03  0:38 UTC (permalink / raw)
  To: davem, kuznet, jmorris, yoshfuji, kaber
  Cc: tglx, mingo, hpa, x86, netdev, linux-kernel, Mbarek Firas

Fixed coding style issues.

Signed-off-by: Mbarek Firas <mbarekfiras@gmail.com>
---
 arch/x86/net/bpf_jit_comp.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
index 7b65f75..6594bd58 100644
--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -51,7 +51,7 @@ static inline u8 *emit_code(u8 *ptr, u32 bytes, unsigned int len)
 #define EMIT2(b1, b2)		EMIT((b1) + ((b2) << 8), 2)
 #define EMIT3(b1, b2, b3)	EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
 #define EMIT4(b1, b2, b3, b4)   EMIT((b1) + ((b2) << 8) + ((b3) << 16) + ((b4) << 24), 4)
-#define EMIT1_off32(b1, off)	do { EMIT1(b1); EMIT(off, 4);} while (0)
+#define EMIT1_off32(b1, off)	do { EMIT1(b1); EMIT(off, 4); } while (0)
 
 #define CLEAR_A() EMIT2(0x31, 0xc0) /* xor %eax,%eax */
 #define CLEAR_X() EMIT2(0x31, 0xdb) /* xor %ebx,%ebx */
@@ -513,14 +513,14 @@ common_load_ind:		seen |= SEEN_DATAREF | SEEN_XREG;
 				t_offset = addrs[i + K] - addrs[i];
 				EMIT_JMP(t_offset);
 				break;
-			COND_SEL(BPF_S_JMP_JGT_K, X86_JA, X86_JBE);
-			COND_SEL(BPF_S_JMP_JGE_K, X86_JAE, X86_JB);
-			COND_SEL(BPF_S_JMP_JEQ_K, X86_JE, X86_JNE);
-			COND_SEL(BPF_S_JMP_JSET_K,X86_JNE, X86_JE);
-			COND_SEL(BPF_S_JMP_JGT_X, X86_JA, X86_JBE);
-			COND_SEL(BPF_S_JMP_JGE_X, X86_JAE, X86_JB);
-			COND_SEL(BPF_S_JMP_JEQ_X, X86_JE, X86_JNE);
-			COND_SEL(BPF_S_JMP_JSET_X,X86_JNE, X86_JE);
+			COND_SEL(BPF_S_JMP_JGT_K,  X86_JA,  X86_JBE);
+			COND_SEL(BPF_S_JMP_JGE_K,  X86_JAE, X86_JB);
+			COND_SEL(BPF_S_JMP_JEQ_K,  X86_JE,  X86_JNE);
+			COND_SEL(BPF_S_JMP_JSET_K, X86_JNE, X86_JE);
+			COND_SEL(BPF_S_JMP_JGT_X,  X86_JA,  X86_JBE);
+			COND_SEL(BPF_S_JMP_JGE_X,  X86_JAE, X86_JB);
+			COND_SEL(BPF_S_JMP_JEQ_X,  X86_JE,  X86_JNE);
+			COND_SEL(BPF_S_JMP_JSET_X, X86_JNE, X86_JE);
 
 cond_branch:			f_offset = addrs[i + filter[i].jf] - addrs[i];
 				t_offset = addrs[i + filter[i].jt] - addrs[i];
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] arch: net: bpf_jit_comp: Fixed coding style issues.
  2012-02-03  0:38 [PATCH] arch: net: bpf_jit_comp: Fixed coding style issues Mbarek Firas
@ 2012-02-04 21:51 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-02-04 21:51 UTC (permalink / raw)
  To: mbarekfiras
  Cc: kuznet, jmorris, yoshfuji, kaber, tglx, mingo, hpa, x86, netdev,
	linux-kernel

From: Mbarek Firas <mbarekfiras@gmail.com>
Date: Fri,  3 Feb 2012 01:38:15 +0100

> -			COND_SEL(BPF_S_JMP_JGT_K, X86_JA, X86_JBE);
> -			COND_SEL(BPF_S_JMP_JGE_K, X86_JAE, X86_JB);
> -			COND_SEL(BPF_S_JMP_JEQ_K, X86_JE, X86_JNE);
> -			COND_SEL(BPF_S_JMP_JSET_K,X86_JNE, X86_JE);
> -			COND_SEL(BPF_S_JMP_JGT_X, X86_JA, X86_JBE);
> -			COND_SEL(BPF_S_JMP_JGE_X, X86_JAE, X86_JB);
> -			COND_SEL(BPF_S_JMP_JEQ_X, X86_JE, X86_JNE);
> -			COND_SEL(BPF_S_JMP_JSET_X,X86_JNE, X86_JE);
> +			COND_SEL(BPF_S_JMP_JGT_K,  X86_JA,  X86_JBE);
> +			COND_SEL(BPF_S_JMP_JGE_K,  X86_JAE, X86_JB);
> +			COND_SEL(BPF_S_JMP_JEQ_K,  X86_JE,  X86_JNE);
> +			COND_SEL(BPF_S_JMP_JSET_K, X86_JNE, X86_JE);

This is rediculious, it's not fixing anything.

There is no requirement that all the arguments have to line up
to the same column on every line.

I'm not applying this patch.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-04 21:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-03  0:38 [PATCH] arch: net: bpf_jit_comp: Fixed coding style issues Mbarek Firas
2012-02-04 21:51 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).