[SCSI] drivers/scsi: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove duplicates of the macro. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
committed by
James Bottomley
parent
9dc399de08
commit
6391a11375
@@ -30,7 +30,7 @@
|
||||
#include "scsi_logging.h"
|
||||
|
||||
|
||||
#define SG_MEMPOOL_NR (sizeof(scsi_sg_pools)/sizeof(struct scsi_host_sg_pool))
|
||||
#define SG_MEMPOOL_NR ARRAY_SIZE(scsi_sg_pools)
|
||||
#define SG_MEMPOOL_SIZE 32
|
||||
|
||||
struct scsi_host_sg_pool {
|
||||
|
Reference in New Issue
Block a user