mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 08/16] trivial: use ARRAY_SIZE
@ 2010-06-28 11:55 Kulikov Vasiliy
  2010-07-20 15:15 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Kulikov Vasiliy @ 2010-06-28 11:55 UTC (permalink / raw)
  To: trivial
  Cc: Kernel Janitors, Robert Love, James E.J. Bottomley, Vasu Dev,
	Joe Eykholt, devel, linux-scsi, linux-kernel

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

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
 drivers/scsi/libfc/fc_exch.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index 104e0fb..ca52bfa 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -219,8 +219,6 @@ static void fc_exch_els_rrq(struct fc_seq *, struct fc_frame *);
  */
 static char *fc_exch_rctl_names[] = FC_RCTL_NAMES_INIT;
 
-#define FC_TABLE_SIZE(x)   (sizeof(x) / sizeof(x[0]))
-
 /**
  * fc_exch_name_lookup() - Lookup name by opcode
  * @op:	       Opcode to be looked up
@@ -249,7 +247,7 @@ static inline const char *fc_exch_name_lookup(unsigned int op, char **table,
 static const char *fc_exch_rctl_name(unsigned int op)
 {
 	return fc_exch_name_lookup(op, fc_exch_rctl_names,
-				   FC_TABLE_SIZE(fc_exch_rctl_names));
+				   ARRAY_SIZE(fc_exch_rctl_names));
 }
 
 /**
-- 
1.7.0.4


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

* Re: [PATCH 08/16] trivial: use ARRAY_SIZE
  2010-06-28 11:55 [PATCH 08/16] trivial: use ARRAY_SIZE Kulikov Vasiliy
@ 2010-07-20 15:15 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2010-07-20 15:15 UTC (permalink / raw)
  To: Kulikov Vasiliy
  Cc: Kernel Janitors, Robert Love, James E.J. Bottomley, Vasu Dev,
	Joe Eykholt, devel, linux-scsi, linux-kernel

On Mon, 28 Jun 2010, Kulikov Vasiliy wrote:

> Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x).
> 
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> ---
>  drivers/scsi/libfc/fc_exch.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
> index 104e0fb..ca52bfa 100644
> --- a/drivers/scsi/libfc/fc_exch.c
> +++ b/drivers/scsi/libfc/fc_exch.c
> @@ -219,8 +219,6 @@ static void fc_exch_els_rrq(struct fc_seq *, struct fc_frame *);
>   */
>  static char *fc_exch_rctl_names[] = FC_RCTL_NAMES_INIT;
>  
> -#define FC_TABLE_SIZE(x)   (sizeof(x) / sizeof(x[0]))
> -
>  /**
>   * fc_exch_name_lookup() - Lookup name by opcode
>   * @op:	       Opcode to be looked up
> @@ -249,7 +247,7 @@ static inline const char *fc_exch_name_lookup(unsigned int op, char **table,
>  static const char *fc_exch_rctl_name(unsigned int op)
>  {
>  	return fc_exch_name_lookup(op, fc_exch_rctl_names,
> -				   FC_TABLE_SIZE(fc_exch_rctl_names));
> +				   ARRAY_SIZE(fc_exch_rctl_names));
>  }

Applied. Please use better Subject: lines next time though. Having the 
whole series have the same Subject: line doesn't really help.

Thanks,

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-28 11:55 [PATCH 08/16] trivial: use ARRAY_SIZE Kulikov Vasiliy
2010-07-20 15:15 ` Jiri Kosina

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

Powered by JetHome