LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	linux-kernel@vger.kernel.org,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pierre Ossman <drzeus@drzeus.cx>
Subject: Re: Coding style question
Date: Fri, 09 Feb 2007 17:02:26 +0100	[thread overview]
Message-ID: <45CC9B12.7040808@s5r6.in-berlin.de> (raw)
In-Reply-To: <200702091132.09741.pisa@cmp.felk.cvut.cz>

Pavel Pisa wrote:
> There are tightly copled two macros for preparation
> and acquisition of muti-bit masked fields values
> 
> #define __val2mfld(mask,val) (((mask)&~((mask)<<1))*(val)&(mask))
> 
> #define __mfld2val(mask,val) (((val)&(mask))/((mask)&~((mask)<<1)))

The macro names are awkward.
http://lxr.linux.no/source/Documentation/CodingStyle?v=2.6.18#L133

Consider longer names (and to partially counteract column consumption,
omit the leading underscores) or at least spell their purpose out in a
short comment at the macro definitions.
-- 
Stefan Richter
-=====-=-=== --=- -=--=
http://arcgraph.de/sr/

  parent reply	other threads:[~2007-02-09 16:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-09 10:32 Pavel Pisa
2007-02-09 11:18 ` Jesper Juhl
2007-02-09 16:02 ` Stefan Richter [this message]
2007-02-09 20:46 ` Haavard Skinnemoen

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=45CC9B12.7040808@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=drzeus@drzeus.cx \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=pisa@cmp.felk.cvut.cz \
    --cc=s.hauer@pengutronix.de \
    --subject='Re: Coding style question' \
    /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

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).