summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2013-05-31 17:27:44 +0000
committerdelphij <delphij@FreeBSD.org>2013-05-31 17:27:44 +0000
commit7627381cdbef5e612ab766bdb7d6e01c2219c861 (patch)
treea351736bdc3f9644aa5b3491cb0db7a677bb28f3 /sys/dev
parentdb7e9a0a660f6bce11b7e91b8412eb4f1d0dff93 (diff)
downloadFreeBSD-src-7627381cdbef5e612ab766bdb7d6e01c2219c861.zip
FreeBSD-src-7627381cdbef5e612ab766bdb7d6e01c2219c861.tar.gz
Explicitly use a pair of parentheses to ensure correct evaluation
ordering for bitwise operation. Submitted by: swildner (DragonFly) MFC after: 2 weeks
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/mpt/mpt_raid.c2
-rw-r--r--sys/dev/mpt/mpt_user.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/mpt/mpt_raid.c b/sys/dev/mpt/mpt_raid.c
index 14303ca..ee25e18 100644
--- a/sys/dev/mpt/mpt_raid.c
+++ b/sys/dev/mpt/mpt_raid.c
@@ -605,7 +605,7 @@ mpt_issue_raid_req(struct mpt_softc *mpt, struct mpt_raid_volume *vol,
MPI_pSGE_SET_FLAGS(se, (MPI_SGE_FLAGS_SIMPLE_ELEMENT |
MPI_SGE_FLAGS_LAST_ELEMENT | MPI_SGE_FLAGS_END_OF_BUFFER |
MPI_SGE_FLAGS_END_OF_LIST |
- write ? MPI_SGE_FLAGS_HOST_TO_IOC : MPI_SGE_FLAGS_IOC_TO_HOST));
+ (write ? MPI_SGE_FLAGS_HOST_TO_IOC : MPI_SGE_FLAGS_IOC_TO_HOST)));
se->FlagsLength = htole32(se->FlagsLength);
rap->MsgContext = htole32(req->index | raid_handler_id);
diff --git a/sys/dev/mpt/mpt_user.c b/sys/dev/mpt/mpt_user.c
index 78762c7..fa42af8 100644
--- a/sys/dev/mpt/mpt_user.c
+++ b/sys/dev/mpt/mpt_user.c
@@ -548,8 +548,8 @@ mpt_user_raid_action(struct mpt_softc *mpt, struct mpt_raid_action *raid_act,
MPI_pSGE_SET_FLAGS(se, (MPI_SGE_FLAGS_SIMPLE_ELEMENT |
MPI_SGE_FLAGS_LAST_ELEMENT | MPI_SGE_FLAGS_END_OF_BUFFER |
MPI_SGE_FLAGS_END_OF_LIST |
- raid_act->write ? MPI_SGE_FLAGS_HOST_TO_IOC :
- MPI_SGE_FLAGS_IOC_TO_HOST));
+ (raid_act->write ? MPI_SGE_FLAGS_HOST_TO_IOC :
+ MPI_SGE_FLAGS_IOC_TO_HOST)));
}
se->FlagsLength = htole32(se->FlagsLength);
rap->MsgContext = htole32(req->index | user_handler_id);
OpenPOWER on IntegriCloud