public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 02/16] trivial: use ARRAY_SIZE
@ 2010-06-28 11:54 Kulikov Vasiliy
  2010-06-29 18:09 ` Paul Fulghum
  2010-06-30 20:49 ` Stephen Hemminger
  0 siblings, 2 replies; 4+ messages in thread
From: Kulikov Vasiliy @ 2010-06-28 11:54 UTC (permalink / raw)
  To: trivial
  Cc: Kernel Janitors, Stephen Hemminger, Kulikov Vasiliy,
	Andrew Morton, Paul Fulghum, David S. Miller, linux-kernel

Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x).

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
 drivers/char/synclink_gt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
index 4561ce2..334cf5c 100644
--- a/drivers/char/synclink_gt.c
+++ b/drivers/char/synclink_gt.c
@@ -4845,7 +4845,7 @@ static int register_test(struct slgt_info *info)
 {
 	static unsigned short patterns[] =
 		{0x0000, 0xffff, 0xaaaa, 0x5555, 0x6969, 0x9696};
-	static unsigned int count = sizeof(patterns)/sizeof(patterns[0]);
+	static unsigned int count = ARRAY_SIZE(patterns);
 	unsigned int i;
 	int rc = 0;
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 02/16] trivial: use ARRAY_SIZE
  2010-06-28 11:54 [PATCH 02/16] trivial: use ARRAY_SIZE Kulikov Vasiliy
@ 2010-06-29 18:09 ` Paul Fulghum
  2010-07-20 15:04   ` Jiri Kosina
  2010-06-30 20:49 ` Stephen Hemminger
  1 sibling, 1 reply; 4+ messages in thread
From: Paul Fulghum @ 2010-06-29 18:09 UTC (permalink / raw)
  To: Kulikov Vasiliy
  Cc: trivial, Kernel Janitors, Stephen Hemminger, Andrew Morton,
	David S. Miller, linux-kernel

On 6/28/2010 5:54 AM, Kulikov Vasiliy wrote:
> Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x).
> 
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> ---
>  drivers/char/synclink_gt.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
> index 4561ce2..334cf5c 100644
> --- a/drivers/char/synclink_gt.c
> +++ b/drivers/char/synclink_gt.c
> @@ -4845,7 +4845,7 @@ static int register_test(struct slgt_info *info)
>  {
>  	static unsigned short patterns[] =
>  		{0x0000, 0xffff, 0xaaaa, 0x5555, 0x6969, 0x9696};
> -	static unsigned int count = sizeof(patterns)/sizeof(patterns[0]);
> +	static unsigned int count = ARRAY_SIZE(patterns);
>  	unsigned int i;
>  	int rc = 0;
>  

Acked-by: Paul Fulghum <paulkf@microgate.com>

with the exception of the trailing CR :-)

-- 
Paul Fulghum
MicroGate Systems, Ltd.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 02/16] trivial: use ARRAY_SIZE
  2010-06-28 11:54 [PATCH 02/16] trivial: use ARRAY_SIZE Kulikov Vasiliy
  2010-06-29 18:09 ` Paul Fulghum
@ 2010-06-30 20:49 ` Stephen Hemminger
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2010-06-30 20:49 UTC (permalink / raw)
  To: Kulikov Vasiliy
  Cc: trivial, Kernel Janitors, Andrew Morton, Paul Fulghum,
	David S. Miller, linux-kernel

On Mon, 28 Jun 2010 15:54:48 +0400
Kulikov Vasiliy <segooon@gmail.com> wrote:

>  	static unsigned short patterns[] =
>  		{0x0000, 0xffff, 0xaaaa, 0x5555, 0x6969, 0x9696};

Unrelated, but these patterns should be const.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 02/16] trivial: use ARRAY_SIZE
  2010-06-29 18:09 ` Paul Fulghum
@ 2010-07-20 15:04   ` Jiri Kosina
  0 siblings, 0 replies; 4+ messages in thread
From: Jiri Kosina @ 2010-07-20 15:04 UTC (permalink / raw)
  To: Paul Fulghum
  Cc: Kulikov Vasiliy, Kernel Janitors, Stephen Hemminger,
	Andrew Morton, David S. Miller, linux-kernel

On Tue, 29 Jun 2010, Paul Fulghum wrote:

> > Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x).
> > 
> > Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> > ---
> >  drivers/char/synclink_gt.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
> > index 4561ce2..334cf5c 100644
> > --- a/drivers/char/synclink_gt.c
> > +++ b/drivers/char/synclink_gt.c
> > @@ -4845,7 +4845,7 @@ static int register_test(struct slgt_info *info)
> >  {
> >  	static unsigned short patterns[] =
> >  		{0x0000, 0xffff, 0xaaaa, 0x5555, 0x6969, 0x9696};
> > -	static unsigned int count = sizeof(patterns)/sizeof(patterns[0]);
> > +	static unsigned int count = ARRAY_SIZE(patterns);
> >  	unsigned int i;
> >  	int rc = 0;
> >  
> 
> Acked-by: Paul Fulghum <paulkf@microgate.com>

The patch is not in linux-next as of today. Applied, thanks guys.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-07-20 15:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-28 11:54 [PATCH 02/16] trivial: use ARRAY_SIZE Kulikov Vasiliy
2010-06-29 18:09 ` Paul Fulghum
2010-07-20 15:04   ` Jiri Kosina
2010-06-30 20:49 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox