Re: [PATCH 01/16] GFS: headers

From: Pavel Machek
Date: Mon Oct 10 2005 - 16:36:59 EST


> +
> +#define CPIN_08(s1, s2, member, count) {memcpy((s1->member), (s2->member), (count));}
> +#define CPOUT_08(s1, s2, member, count) {memcpy((s2->member), (s1->member), (count));}
> +#define CPIN_16(s1, s2, member) {(s1->member) = le16_to_cpu((s2->member));}
> +#define CPOUT_16(s1, s2, member) {(s2->member) = cpu_to_le16((s1->member));}
> +#define CPIN_32(s1, s2, member) {(s1->member) = le32_to_cpu((s2->member));}
> +#define CPOUT_32(s1, s2, member) {(s2->member) = cpu_to_le32((s1->member));}
> +#define CPIN_64(s1, s2, member) {(s1->member) = le64_to_cpu((s2->member));}
> +#define CPOUT_64(s1, s2, member) {(s2->member) = cpu_to_le64((s1->member));}
> +
> +#define pv(struct, member, fmt) printk(" "#member" = "fmt"\n", struct->member);
> +#define pa(struct, member, count) print_array(#member, struct->member, count);

Nice way to obfuscate code, I'd say. Can you just inline those macros?
This is very hard to read...

if you have sharp zaurus hardware you don't need... you know my address
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at