Skip to content

Commit 2caca8f

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: use page_to_phys in bvec_phys
Use page_to_phys instead of open coding it now that it is available in an architecture independent way. Signed-off-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 02ee5d6 commit 2caca8f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

include/linux/bvec.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,7 @@ static inline void *bvec_virt(struct bio_vec *bvec)
286286
*/
287287
static inline phys_addr_t bvec_phys(const struct bio_vec *bvec)
288288
{
289-
/*
290-
* Note this open codes page_to_phys because page_to_phys is defined in
291-
* <asm/io.h>, which we don't want to pull in here. If it ever moves to
292-
* a sensible place we should start using it.
293-
*/
294-
return PFN_PHYS(page_to_pfn(bvec->bv_page)) + bvec->bv_offset;
289+
return page_to_phys(bvec->bv_page) + bvec->bv_offset;
295290
}
296291

297292
#endif /* __LINUX_BVEC_H */

0 commit comments

Comments
 (0)