riscv: Do not set initial_boot_params to the linear address of the dtb
[platform/kernel/linux-starfive.git] / block / blk.h
index e835f21..cc4e887 100644 (file)
@@ -156,6 +156,13 @@ static inline bool blk_discard_mergable(struct request *req)
        return false;
 }
 
+static inline unsigned int blk_rq_get_max_segments(struct request *rq)
+{
+       if (req_op(rq) == REQ_OP_DISCARD)
+               return queue_max_discard_segments(rq->q);
+       return queue_max_segments(rq->q);
+}
+
 static inline unsigned int blk_queue_get_max_sectors(struct request_queue *q,
                                                     enum req_op op)
 {