Skip to content

Commit

Permalink
[SCSI] fusion: Fix |/|| confusion
Browse files Browse the repository at this point in the history
There are several cases where the fusion driver uses the logical || to
try to do an arithmetical or ... fix by replacing with |.

Signed-off-by: Dave Jones <davej@redhat.com>
Acked-by: "Moore, Eric" <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Dave Jones authored and James Bottomley committed May 22, 2007
1 parent 8fdcf86 commit 3d9780b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/message/fusion/mptbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ typedef struct _MPT_SAS_MGMT {
typedef struct _mpt_ioctl_events {
u32 event; /* Specified by define above */
u32 eventContext; /* Index or counter */
int data[2]; /* First 8 bytes of Event Data */
u32 data[2]; /* First 8 bytes of Event Data */
} MPT_IOCTL_EVENTS;

/*
Expand Down
8 changes: 4 additions & 4 deletions drivers/message/fusion/mptscsih.c
Original file line number Diff line number Diff line change
Expand Up @@ -2463,11 +2463,11 @@ mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR
ioc->events[idx].event = MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE;
ioc->events[idx].eventContext = ioc->eventContext;

ioc->events[idx].data[0] = (pReq->LUN[1] << 24) ||
(MPI_EVENT_SCSI_DEV_STAT_RC_SMART_DATA << 16) ||
(sc->device->channel << 8) || sc->device->id;
ioc->events[idx].data[0] = (pReq->LUN[1] << 24) |
(MPI_EVENT_SCSI_DEV_STAT_RC_SMART_DATA << 16) |
(sc->device->channel << 8) | sc->device->id;

ioc->events[idx].data[1] = (sense_data[13] << 8) || sense_data[12];
ioc->events[idx].data[1] = (sense_data[13] << 8) | sense_data[12];

ioc->eventContext++;
if (hd->ioc->pcidev->vendor ==
Expand Down

0 comments on commit 3d9780b

Please sign in to comment.