diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2008-03-19 22:09:17 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-04-07 13:18:58 -0400 |
commit | a75869d1ff73de74249373c2a1d80fbbc3b6c8fc (patch) | |
tree | 0c8a97d270ce6c297104e065c36fa15241e85f9e /drivers/scsi/scsi_debug.c | |
parent | 5cb2fc06107fe343a9488b32ddf3d9b4596b7090 (diff) |
[SCSI] scsi_debug: remove unnecessary condition test in devInfoReg
open_devip is always non NULL.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
-rw-r--r-- | drivers/scsi/scsi_debug.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 161af1ded888..1a9106353f72 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
@@ -2059,25 +2059,24 @@ static struct sdebug_dev_info * devInfoReg(struct scsi_device * sdev) | |||
2059 | return NULL; | 2059 | return NULL; |
2060 | } | 2060 | } |
2061 | } | 2061 | } |
2062 | if (open_devip) { | 2062 | |
2063 | open_devip->channel = sdev->channel; | 2063 | open_devip->channel = sdev->channel; |
2064 | open_devip->target = sdev->id; | 2064 | open_devip->target = sdev->id; |
2065 | open_devip->lun = sdev->lun; | 2065 | open_devip->lun = sdev->lun; |
2066 | open_devip->sdbg_host = sdbg_host; | 2066 | open_devip->sdbg_host = sdbg_host; |
2067 | open_devip->reset = 1; | 2067 | open_devip->reset = 1; |
2068 | open_devip->used = 1; | 2068 | open_devip->used = 1; |
2069 | memset(open_devip->sense_buff, 0, SDEBUG_SENSE_LEN); | 2069 | memset(open_devip->sense_buff, 0, SDEBUG_SENSE_LEN); |
2070 | if (scsi_debug_dsense) | 2070 | if (scsi_debug_dsense) |
2071 | open_devip->sense_buff[0] = 0x72; | 2071 | open_devip->sense_buff[0] = 0x72; |
2072 | else { | 2072 | else { |
2073 | open_devip->sense_buff[0] = 0x70; | 2073 | open_devip->sense_buff[0] = 0x70; |
2074 | open_devip->sense_buff[7] = 0xa; | 2074 | open_devip->sense_buff[7] = 0xa; |
2075 | } | 2075 | } |
2076 | if (sdev->lun == SAM2_WLUN_REPORT_LUNS) | 2076 | if (sdev->lun == SAM2_WLUN_REPORT_LUNS) |
2077 | open_devip->wlun = SAM2_WLUN_REPORT_LUNS & 0xff; | 2077 | open_devip->wlun = SAM2_WLUN_REPORT_LUNS & 0xff; |
2078 | return open_devip; | 2078 | |
2079 | } | 2079 | return open_devip; |
2080 | return NULL; | ||
2081 | } | 2080 | } |
2082 | 2081 | ||
2083 | static void mk_sense_buffer(struct sdebug_dev_info * devip, int key, | 2082 | static void mk_sense_buffer(struct sdebug_dev_info * devip, int key, |