Skip to contentSkip to conversation

strange comparison in be2iscsi

DISCUSSION Dave Jones 1 participant 2 messages Oct 24, 2013 SCSI

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

A few years ago, in 4183122dbc7c489f11971c5afa8e42011bca7fa2 this code was added to drivers/scsi/be2iscsi/be_main.c

+ if (abrt_task->sc->device->lun != abrt_task->sc->device->lun)
+ continue;

Which doesn't make a lot of sense.
What was the intent here ?

Dave

author
#1 lore raw
Quoted 8 lines · Dave Jones

A few years ago, in 4183122dbc7c489f11971c5afa8e42011bca7fa2 this code was added to drivers/scsi/be2iscsi/be_main.c

(quoted diff) +2 -0
+               if (abrt_task->sc->device->lun != abrt_task->sc->device->lun)
+                       continue;

Which doesn't make a lot of sense.
What was the intent here ?

Also elsewhere we have this..

6733b39a        (Jayamohan Kallickal    2009-09-05 07:36:35 +0530       1583)   phys_addr.u.a64.address =
6733b39a        (Jayamohan Kallickal    2009-09-05 07:36:35 +0530       1584)                   *((unsigned long long *)(&phys_addr.u.a64.address));

which looks like a pretty convoluted way to assign a var to itself.

Dave