From: Pavel Machek <pavel@ucw.cz>
To: David Teigland <teigland@redhat.com>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 01/16] GFS: headers
Date: Mon, 10 Oct 2005 23:36:07 +0200 [thread overview]
Message-ID: <20051010213607.GA2475@elf.ucw.cz> (raw)
In-Reply-To: <20051010170948.GB22483@redhat.com>
Hi!
> +#ifdef WANT_GFS2_CONVERSION_FUNCTIONS
> +
> +#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...
Pavel
--
if you have sharp zaurus hardware you don't need... you know my address
prev parent reply other threads:[~2005-10-10 21:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-10 17:09 [PATCH 01/16] GFS: headers David Teigland
2005-10-10 19:05 ` Alexey Dobriyan
2005-10-11 4:23 ` Andrew Morton
2005-10-12 18:46 ` David Teigland
2005-10-10 21:36 ` Pavel Machek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051010213607.GA2475@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@osdl.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=teigland@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox