mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
block: Declare several function pointer arguments 'const'
Make it clear to the compiler and also to humans that the functions that query request queue properties do not modify any member of the request_queue data structure. Reviewed-by: Johannes Thumshirn <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Ming Lei <[email protected]> Cc: Hannes Reinecke <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
a87ccce0b5
commit
af2c68fe94
2 changed files with 20 additions and 19 deletions
|
|
@ -144,7 +144,7 @@ static inline unsigned get_max_io_size(struct request_queue *q,
|
|||
return sectors;
|
||||
}
|
||||
|
||||
static unsigned get_max_segment_size(struct request_queue *q,
|
||||
static unsigned get_max_segment_size(const struct request_queue *q,
|
||||
unsigned offset)
|
||||
{
|
||||
unsigned long mask = queue_segment_boundary(q);
|
||||
|
|
@ -161,8 +161,9 @@ static unsigned get_max_segment_size(struct request_queue *q,
|
|||
* Split the bvec @bv into segments, and update all kinds of
|
||||
* variables.
|
||||
*/
|
||||
static bool bvec_split_segs(struct request_queue *q, struct bio_vec *bv,
|
||||
unsigned *nsegs, unsigned *sectors, unsigned max_segs)
|
||||
static bool bvec_split_segs(const struct request_queue *q,
|
||||
const struct bio_vec *bv, unsigned *nsegs,
|
||||
unsigned *sectors, unsigned max_segs)
|
||||
{
|
||||
unsigned len = bv->bv_len;
|
||||
unsigned total_len = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue