mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
libceph: evaluate osd_req_op_data() arguments only once
This patch changes the osd_req_op_data() macro to not evaluate arguments more than once in order to follow the kernel coding style. Signed-off-by: Ioana Ciornei <[email protected]> Reviewed-by: Alex Elder <[email protected]> [[email protected]: changelog, formatting] Signed-off-by: Ilya Dryomov <[email protected]>
This commit is contained in:
parent
68cd5b4b76
commit
8a703a383d
1 changed files with 7 additions and 5 deletions
|
|
@ -120,11 +120,13 @@ static void ceph_osd_data_bio_init(struct ceph_osd_data *osd_data,
|
|||
}
|
||||
#endif /* CONFIG_BLOCK */
|
||||
|
||||
#define osd_req_op_data(oreq, whch, typ, fld) \
|
||||
({ \
|
||||
BUG_ON(whch >= (oreq)->r_num_ops); \
|
||||
&(oreq)->r_ops[whch].typ.fld; \
|
||||
})
|
||||
#define osd_req_op_data(oreq, whch, typ, fld) \
|
||||
({ \
|
||||
struct ceph_osd_request *__oreq = (oreq); \
|
||||
unsigned int __whch = (whch); \
|
||||
BUG_ON(__whch >= __oreq->r_num_ops); \
|
||||
&__oreq->r_ops[__whch].typ.fld; \
|
||||
})
|
||||
|
||||
static struct ceph_osd_data *
|
||||
osd_req_op_raw_data_in(struct ceph_osd_request *osd_req, unsigned int which)
|
||||
|
|
|
|||
Loading…
Reference in a new issue