Re: [PATCH 08/16] trivial: use ARRAY_SIZE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 28 Jun 2010, Kulikov Vasiliy wrote:

> Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x).
> 
> Signed-off-by: Kulikov Vasiliy <segooon@xxxxxxxxx>
> ---
>  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.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux