From: Tomas Henzl <thenzl@redhat.com> Date: Sun, 29 Aug 2010 15:49:16 -0400 Subject: [block] cciss: add CTLR_LUNID define Message-id: <1283097002-3341-18-git-send-email-thenzl@redhat.com> Patchwork-id: 27867 O-Subject: [RHEL6 PATCH 17/63] cciss: add CTLR_LUNID define instead of just using all zeroes inline. Bugzilla: 568830 RH-Acked-by: Neil Horman <nhorman@redhat.com> add CTLR_LUNID define instead of just using all zeroes inline. diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 155460b..7ff2f82 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -794,7 +794,7 @@ static int cciss_open(struct inode *inode, struct file *filep) if (iminor(inode) & 0x0f) { return -ENXIO; /* if it is, make sure we have a LUN ID */ - } else if (memcmp(drv->LunID, "\0\0\0\0\0\0\0\0", + } else if (memcmp(drv->LunID, CTLR_LUNID, sizeof(drv->LunID)) == 0) { return -ENXIO; } @@ -1943,7 +1943,7 @@ static void cciss_add_controller_node(ctlr_info_t *h) if (h->gendisk[0] != NULL) /* already did this? Then bail. */ return; - drv_index = cciss_add_gendisk(h, "\0\0\0\0\0\0\0\0", 1); + drv_index = cciss_add_gendisk(h, CTLR_LUNID, 1); if (drv_index == -1) { printk(KERN_WARNING "cciss%d: could not " "add disk 0.\n", h->ctlr); diff --git a/drivers/block/cciss.h b/drivers/block/cciss.h index e45ba8f..203a25b 100644 --- a/drivers/block/cciss.h +++ b/drivers/block/cciss.h @@ -30,6 +30,7 @@ struct access_method { typedef struct _drive_info_struct { unsigned char LunID[8]; +#define CTLR_LUNID "\0\0\0\0\0\0\0\0" int usage_count; struct request_queue *queue; sector_t nr_blocks;