From: Antonio Quartulli <ordex@autistici.org>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.org>
Cc: Marek Lindner <lindner_marek@yahoo.de>
Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: add biggest_unsigned_int(x) macro
Date: Fri, 25 Nov 2011 11:53:49 +0100 [thread overview]
Message-ID: <20111125105349.GA17321@autistici.org> (raw)
In-Reply-To: <1462592.m5CKka3Otj@sven-laptop.home.narfation.org>
On Fri, Nov 25, 2011 at 09:50:41AM +0100, Sven Eckelmann wrote:
> On Friday 25 November 2011 09:08:47 Marek Lindner wrote:
> [...]
> > > +/* Returns the biggest unsigned integer with the sizeof x */
> > > +#define biggest_unsigned_int(x) (~(x)0)
> > > +
> >
> > The final conclusion of the IRC discussion might have escaped me but wasn't
> > there supposed to be a cast somewhere ?
>
> There is a cast. The part "(x)" of "(~(x)0)" is the cast. And I don't think
> that there was a final conclusion. I am not really convinced that this should
> be part of batman-adv. Just look at include/linux/kernel.h for similar
> functionality (but with predefined types). Maybe this would be the correct
> position for such a macro? (I don't know it... just thinking out loud).
Might be a good idea to send it to the kernel ml, but as usual, I think
we should first include it in the batman-adv code (am I wrong or we are
still waiting for seq_before/after to be included somewhere?).
But I agree with you, I should also send this patch to the kerel ml.
Cheers,
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara ☭
next prev parent reply other threads:[~2011-11-25 10:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-23 10:35 [B.A.T.M.A.N.] [PATCH] batman-adv: add biggest_unsigned_int(x) macro Antonio Quartulli
2011-11-25 1:08 ` Marek Lindner
2011-11-25 8:50 ` Sven Eckelmann
2011-11-25 10:53 ` Antonio Quartulli [this message]
2012-02-11 11:03 ` Marek Lindner
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=20111125105349.GA17321@autistici.org \
--to=ordex@autistici.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=lindner_marek@yahoo.de \
/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