mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-17 22:23:45 -04:00
iomap: constify iomap_iter_srcmap
The srcmap returned from iomap_iter_srcmap is never modified, so mark the iomap returned from it const and constify a lot of code that never modifies the iomap. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
committed by
Darrick J. Wong
parent
65dd814a61
commit
fad0a1ab34
@@ -211,7 +211,7 @@ static inline u64 iomap_length(const struct iomap_iter *iter)
|
||||
* for a given operation, which may or may no be identical to the destination
|
||||
* map in &i->iomap.
|
||||
*/
|
||||
static inline struct iomap *iomap_iter_srcmap(struct iomap_iter *i)
|
||||
static inline const struct iomap *iomap_iter_srcmap(const struct iomap_iter *i)
|
||||
{
|
||||
if (i->srcmap.type != IOMAP_HOLE)
|
||||
return &i->srcmap;
|
||||
|
||||
Reference in New Issue
Block a user