public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nikitas Angelinas <nikitasangelinas@gmail.com>
To: "Charles Clément" <caratorn@gmail.com>
Cc: gregkh@suse.de, more.andres@gmail.com, lieb@canonical.com,
	forest@alittletooquiet.net, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 7/8] drivers/staging/vt6656: use ARRAY_SIZE macro in channel.c
Date: Thu, 9 Sep 2010 19:56:00 +0100	[thread overview]
Message-ID: <20100909185600.GA2252@vostro.config> (raw)
In-Reply-To: <20100909092915.GA4994@air>

On Thu, Sep 09, 2010 at 11:29:35AM +0200, Charles Clément wrote:
> I think this definition is not used anywhere in the driver and thus can
> be removed.
> 
> On Wed, Sep 08, 2010 at 10:27:55PM +0100, Nikitas Angelinas wrote:
> > Replace (sizeof(ChannelRuleTab) / sizeof(ChannelRuleTab[0])) with
> > ARRAY_SIZE(ChannelRuleTab) in drivers/staging/vt6656/channel.c
> > 
> > Signed-off-by: Nikitas Angelinas <nikitasangelinas@gmail.com>
> > ---
> >  drivers/staging/vt6656/channel.c |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/staging/vt6656/channel.c b/drivers/staging/vt6656/channel.c
> > index 6ad03e4..a2460ae 100644
> > --- a/drivers/staging/vt6656/channel.c
> > +++ b/drivers/staging/vt6656/channel.c
> > @@ -34,6 +34,7 @@
> >   *
> >   */
> >  
> > +#include <linux/kernel.h>
> >  #include "country.h"
> >  #include "channel.h"
> >  #include "rf.h"
> > @@ -367,7 +368,7 @@ static  struct
> >  /*                                           1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  */
> >  };
> >  
> > -#define NUM_RULES	(sizeof(ChannelRuleTab) / sizeof(ChannelRuleTab[0]))
> > +#define NUM_RULES	ARRAY_SIZE(ChannelRuleTab)
> >  
> >  /*---------------------  Export function  -------------------------*/
> >  /************************************************************************
> > -- 
> > 1.7.2.3
> > 
> > _______________________________________________
> > devel mailing list
> > devel@linuxdriverproject.org
> > http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
> 
> -- 
> Charles Clément
Yup, doesn't seem to be used anywhere; the file also has some coding
style issues, so perhaps removing the macro can be part of a cleanup
patch for whoever may carry out that task.

In that case, I guess reverting the patch from staging-next might be an
option, but I think what's really needed is for someone to go through
the driver source and do what's necessary... At first glance, it seems
possible that the macro (NUM_RULES) may indeed have to be used as a 
replacement for the hard-coded CB_MAX_CHANNEL, but the author may not 
have gotten around to it or didn't make use of it for some other reason.

  reply	other threads:[~2010-09-09 18:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-08 20:57 [PATCH 0/8] use ARRAY_SIZE macro Nikitas Angelinas
2010-09-08 21:04 ` [PATCH 1/8] arch/ia64/xen: use ARRAY_SIZE macro in xen_pv_ops.c Nikitas Angelinas
2010-09-08 21:11 ` [PATCH 2/8] arch/parisc/include/asm: use ARRAY_SIZE macro in mmzone.h Nikitas Angelinas
2010-09-08 21:17   ` Kyle McMartin
2010-09-08 21:14 ` [PATCH 3/8] drivers/gpu/drm: use ARRAY_SIZE macro in drm_edid_modes.h Nikitas Angelinas
2010-09-08 21:17 ` [PATCH 4/8] drivers/gpu/drm/i915: use ARRAY_SIZE macro in intel_tv.c Nikitas Angelinas
2010-09-08 21:20 ` [PATCH 5/8] drivers/net/bnx2x: use ARRAY_SIZE macro in bnx2x_main.c Nikitas Angelinas
2010-09-10  4:56   ` David Miller
2010-09-08 21:25 ` [PATCH 6/8] drivers/net/wireless/ath/ath9k: use ARRAY_SIZE macro in ani.c Nikitas Angelinas
2010-09-08 21:31   ` Luis R. Rodriguez
2010-09-08 21:27 ` [PATCH 7/8] drivers/staging/vt6656: use ARRAY_SIZE macro in channel.c Nikitas Angelinas
2010-09-09  9:29   ` Charles Clément
2010-09-09 18:56     ` Nikitas Angelinas [this message]
2010-09-08 21:29 ` [PATCH 8/8] net/wireless: use ARRAY_SIZE macro in radiotap.c Nikitas Angelinas

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=20100909185600.GA2252@vostro.config \
    --to=nikitasangelinas@gmail.com \
    --cc=caratorn@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=forest@alittletooquiet.net \
    --cc=gregkh@suse.de \
    --cc=lieb@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=more.andres@gmail.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