ibmvscsi: use H_CLOSED instead of magic number
authorTyrel Datwyler <tyreld@linux.vnet.ibm.com>
Thu, 11 Feb 2016 01:32:28 +0000 (19:32 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Feb 2016 02:27:02 +0000 (21:27 -0500)
In a couple places the magic value of 2 is used to check the return code
of hypercalls. This translates to H_CLOSED.

Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ibmvscsi/ibmvscsi.c

index 6025481c4ab9beee495f91787e302632f312027b..d9534ee6ef524fb1fab03680bdde2ed34a4202b7 100644 (file)
@@ -314,7 +314,7 @@ static int ibmvscsi_reset_crq_queue(struct crq_queue *queue,
        rc = plpar_hcall_norets(H_REG_CRQ,
                                vdev->unit_address,
                                queue->msg_token, PAGE_SIZE);
-       if (rc == 2) {
+       if (rc == H_CLOSED) {
                /* Adapter is good, but other end is not ready */
                dev_warn(hostdata->dev, "Partner adapter not ready\n");
        } else if (rc != 0) {
@@ -364,7 +364,7 @@ static int ibmvscsi_init_crq_queue(struct crq_queue *queue,
                rc = ibmvscsi_reset_crq_queue(queue,
                                              hostdata);
 
-       if (rc == 2) {
+       if (rc == H_CLOSED) {
                /* Adapter is good, but other end is not ready */
                dev_warn(hostdata->dev, "Partner adapter not ready\n");
                retrc = 0;