mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 01/16] trivial: use ARRAY_SIZE
@ 2010-06-28 11:54 Kulikov Vasiliy
  2010-06-28 19:05 ` Miller, Mike (OS Dev)
  0 siblings, 1 reply; 3+ messages in thread
From: Kulikov Vasiliy @ 2010-06-28 11:54 UTC (permalink / raw)
  To: trivial
  Cc: Kernel Janitors, Mike Miller, Jens Axboe, Stephen M. Cameron,
	Andrew Morton, Andrew Patterson, iss_storagedev, linux-kernel

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

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

diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 51ceaee..e1e7143 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -335,7 +335,7 @@ static void cciss_map_sg_chain_block(ctlr_info_t *h, CommandList_struct *c,
 static const char *raid_label[] = { "0", "4", "1(1+0)", "5", "5+1", "ADG",
 	"UNKNOWN"
 };
-#define RAID_UNKNOWN (sizeof(raid_label) / sizeof(raid_label[0])-1)
+#define RAID_UNKNOWN (ARRAY_SIZE(raid_label)-1)
 
 #ifdef CONFIG_PROC_FS
 
-- 
1.7.0.4


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

* RE: [PATCH 01/16] trivial: use ARRAY_SIZE
  2010-06-28 11:54 [PATCH 01/16] trivial: use ARRAY_SIZE Kulikov Vasiliy
@ 2010-06-28 19:05 ` Miller, Mike (OS Dev)
  2010-07-20 15:02   ` Jiri Kosina
  0 siblings, 1 reply; 3+ messages in thread
From: Miller, Mike (OS Dev) @ 2010-06-28 19:05 UTC (permalink / raw)
  To: Kulikov Vasiliy, trivial
  Cc: Kernel Janitors, Jens Axboe, Stephen M. Cameron, Andrew Morton,
	Patterson, Andrew D (LeftHand Networks),
	ISS StorageDev, linux-kernel

 

> -----Original Message-----
> From: Kulikov Vasiliy [mailto:segooon@gmail.com] 
> Sent: Monday, June 28, 2010 6:55 AM
> To: trivial@kernel.org
> Cc: Kernel Janitors; Miller, Mike (OS Dev); Jens Axboe; 
> Stephen M. Cameron; Andrew Morton; Patterson, Andrew D 
> (LeftHand Networks); ISS StorageDev; linux-kernel@vger.kernel.org
> Subject: [PATCH 01/16] trivial: use ARRAY_SIZE
> 
> Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x).
> 
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Acked-by: Mike Miller <mike.miller@hp.com>
> ---
>  drivers/block/cciss.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c 
> index 51ceaee..e1e7143 100644
> --- a/drivers/block/cciss.c
> +++ b/drivers/block/cciss.c
> @@ -335,7 +335,7 @@ static void 
> cciss_map_sg_chain_block(ctlr_info_t *h, CommandList_struct 
> *c,  static const char *raid_label[] = { "0", "4", "1(1+0)", 
> "5", "5+1", "ADG",
>  	"UNKNOWN"
>  };
> -#define RAID_UNKNOWN (sizeof(raid_label) / sizeof(raid_label[0])-1)
> +#define RAID_UNKNOWN (ARRAY_SIZE(raid_label)-1)
>  
>  #ifdef CONFIG_PROC_FS
>  
> --
> 1.7.0.4
> 
> 

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

* RE: [PATCH 01/16] trivial: use ARRAY_SIZE
  2010-06-28 19:05 ` Miller, Mike (OS Dev)
@ 2010-07-20 15:02   ` Jiri Kosina
  0 siblings, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2010-07-20 15:02 UTC (permalink / raw)
  To: Miller, Mike (OS Dev)
  Cc: Kulikov Vasiliy, Kernel Janitors, Jens Axboe, Stephen M. Cameron,
	Andrew Morton, Patterson, Andrew D (LeftHand Networks),
	ISS StorageDev, linux-kernel

On Mon, 28 Jun 2010, Miller, Mike (OS Dev) wrote:

> > Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x).
> > 
> > Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> Acked-by: Mike Miller <mike.miller@hp.com>

Not present in linux-next as of today. Applied, thanks.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-28 11:54 [PATCH 01/16] trivial: use ARRAY_SIZE Kulikov Vasiliy
2010-06-28 19:05 ` Miller, Mike (OS Dev)
2010-07-20 15:02   ` Jiri Kosina

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

all inboxes | Powered by JetHome®