netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: sven.eckelmann@gmx.de
Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [PATCHv6] net: Add batman-adv meshing protocol
Date: Wed, 01 Dec 2010 10:43:14 -0800 (PST)	[thread overview]
Message-ID: <20101201.104314.112592938.davem@davemloft.net> (raw)
In-Reply-To: <1289136377-18350-1-git-send-email-sven.eckelmann@gmx.de>

From: Sven Eckelmann <sven.eckelmann@gmx.de>
Date: Sun,  7 Nov 2010 14:26:17 +0100

> +		if (seq_bits[word_num] & 1 << word_offset)
 ...
> +	seq_bits[word_num] |= 1 << word_offset;	/* turn the position on */
 ...
> +#define TYPE_OF_WORD unsigned long

"1" is an 'int' and won't get promoted to unsigned long which means
this code won't work on 64-bit, you need to explicitly say "1UL".

This seems to duplicate a lot of existing functionality, we have
properly bit set/clear/change/test routines, that operate on
"unsigned long" just as your code does.

And since you don't use the existing facilities, you end up with
bugs like this one.  Bug which are completely unnecessary.

The badman-adv code is full of duplicated functionality, and until
all of these cases are cured I refuse to integrate this code.  I
already complained about the hashing stuff, and now there's this
stuff too.

Every time I review the batman-adv code I find a bug, and the bug is
often in facilities which the kernel has already and are being
duplicated.  That is by definition a waste of my and everyone else's
time.

Probably your submission will be almost half the size that it is
currently once you take care of this issue. :-)


  reply	other threads:[~2010-12-01 18:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-07 13:26 [PATCHv6] net: Add batman-adv meshing protocol Sven Eckelmann
2010-12-01 18:43 ` David Miller [this message]
     [not found]   ` <20101201.104314.112592938.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2010-12-01 18:54     ` Sven Eckelmann
     [not found]       ` <201012011954.20275.sven.eckelmann-Mmb7MZpHnFY@public.gmane.org>
2010-12-01 18:56         ` David Miller
     [not found]           ` <20101201.105615.48506929.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2010-12-01 19:04             ` Sven Eckelmann
2010-12-01 19:12               ` David Miller
     [not found]                 ` <20101201.111205.28818479.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2010-12-01 19:48                   ` Marek Lindner
     [not found]                     ` <201012012048.47096.lindner_marek-LWAfsSFWpa4@public.gmane.org>
2010-12-01 20:18                       ` David Miller

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=20101201.104314.112592938.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=netdev@vger.kernel.org \
    --cc=sven.eckelmann@gmx.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;
as well as URLs for NNTP newsgroup(s).