summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/esas2r/esas2r_vda.c
diff options
context:
space:
mode:
authorBradley Grove <bgrove@attotech.com>2013-10-01 14:26:01 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-10-25 09:58:59 +0100
commit9588d24e36003b53f76e43b4fadfc5b35207be04 (patch)
treef07e3a9eff31669e00473fae824cccaad9e65996 /drivers/scsi/esas2r/esas2r_vda.c
parenta1f7177a1bc68cf43ed7f5a50c9a7220b0e1662f (diff)
[SCSI] esas2r: Directly call kernel functions for atomic bit operations
Previously the code embedded the kernel's test_bit/clear_bit functions in wrappers that accepted u32 parameters. The wrapper cast these parameters to longs before passing them to the kernel's bit functions. This did not work properly on platforms with 64-bit longs. Signed-off-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/esas2r/esas2r_vda.c')
-rw-r--r--drivers/scsi/esas2r/esas2r_vda.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/esas2r/esas2r_vda.c b/drivers/scsi/esas2r/esas2r_vda.c
index fd139287964..27e97215bb2 100644
--- a/drivers/scsi/esas2r/esas2r_vda.c
+++ b/drivers/scsi/esas2r/esas2r_vda.c
@@ -84,7 +84,7 @@ bool esas2r_process_vda_ioctl(struct esas2r_adapter *a,
return false;
}
- if (a->flags & AF_DEGRADED_MODE) {
+ if (test_bit(AF_DEGRADED_MODE, &a->flags)) {
vi->status = ATTO_STS_DEGRADED;
return false;
}
@@ -389,7 +389,7 @@ void esas2r_build_mgt_req(struct esas2r_adapter *a,
vrq->length = cpu_to_le32(length);
if (vrq->length) {
- if (a->flags & AF_LEGACY_SGE_MODE) {
+ if (test_bit(AF_LEGACY_SGE_MODE, &a->flags)) {
vrq->sg_list_offset = (u8)offsetof(
struct atto_vda_mgmt_req, sge);
@@ -427,7 +427,7 @@ void esas2r_build_ae_req(struct esas2r_adapter *a, struct esas2r_request *rq)
vrq->length = cpu_to_le32(sizeof(struct atto_vda_ae_data));
- if (a->flags & AF_LEGACY_SGE_MODE) {
+ if (test_bit(AF_LEGACY_SGE_MODE, &a->flags)) {
vrq->sg_list_offset =
(u8)offsetof(struct atto_vda_ae_req, sge);
vrq->sge[0].length = cpu_to_le32(SGE_LAST | vrq->length);