diff mbox

[5/5] bfq: Use icq_to_bic() consistently

Message ID 20170830184211.12471-6-bart.vanassche@wdc.com (mailing list archive)
State New, archived
Headers show

Commit Message

Bart Van Assche Aug. 30, 2017, 6:42 p.m. UTC
Some code uses icq_to_bic() to convert an io_cq pointer to a
bfq_io_cq pointer while other code uses a direct cast. Convert
the code that uses a direct cast such that it uses icq_to_bic().

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Paolo Valente <paolo.valente@linaro.org>
---
 block/bfq-iosched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paolo Valente Sept. 1, 2017, 5:15 p.m. UTC | #1
> Il giorno 30 ago 2017, alle ore 20:42, Bart Van Assche <bart.vanassche@wdc.com> ha scritto:
> 
> Some code uses icq_to_bic() to convert an io_cq pointer to a
> bfq_io_cq pointer while other code uses a direct cast. Convert
> the code that uses a direct cast such that it uses icq_to_bic().
> 
> Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
> Cc: Paolo Valente <paolo.valente@linaro.org>

Acked-by: Paolo Valente <paolo.valente@linaro.org>

> ---
> block/bfq-iosched.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
> index d375b29ad085..7d1b85e393b2 100644
> --- a/block/bfq-iosched.c
> +++ b/block/bfq-iosched.c
> @@ -239,7 +239,7 @@ static int T_slow[2];
> static int T_fast[2];
> static int device_speed_thresh[2];
> 
> -#define RQ_BIC(rq)		((struct bfq_io_cq *) (rq)->elv.priv[0])
> +#define RQ_BIC(rq)		icq_to_bic((rq)->elv.priv[0])
> #define RQ_BFQQ(rq)		((rq)->elv.priv[1])
> 
> struct bfq_queue *bic_to_bfqq(struct bfq_io_cq *bic, bool is_sync)
> -- 
> 2.14.1
>
diff mbox

Patch

diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index d375b29ad085..7d1b85e393b2 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -239,7 +239,7 @@  static int T_slow[2];
 static int T_fast[2];
 static int device_speed_thresh[2];
 
-#define RQ_BIC(rq)		((struct bfq_io_cq *) (rq)->elv.priv[0])
+#define RQ_BIC(rq)		icq_to_bic((rq)->elv.priv[0])
 #define RQ_BFQQ(rq)		((rq)->elv.priv[1])
 
 struct bfq_queue *bic_to_bfqq(struct bfq_io_cq *bic, bool is_sync)