projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98d8ba6
)
block: Use PAGE_SECTORS_SHIFT
author
Matthew Wilcox (Oracle)
<willy@infradead.org>
Wed, 18 May 2022 03:40:45 +0000
(23:40 -0400)
committer
Matthew Wilcox (Oracle)
<willy@infradead.org>
Tue, 2 Aug 2022 16:34:03 +0000
(12:34 -0400)
The bare use of '9' confuses some people. We also don't need this cast,
since the compiler does exactly that cast for us.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
block/partitions/core.c
patch
|
blob
|
history
diff --git
a/block/partitions/core.c
b/block/partitions/core.c
index
58034dd
..
269c865
100644
(file)
--- a/
block/partitions/core.c
+++ b/
block/partitions/core.c
@@
-712,8
+712,7
@@
void *read_part_sector(struct parsed_partitions *state, sector_t n, Sector *p)
goto out;
}
- page = read_mapping_page(mapping,
- (pgoff_t)(n >> (PAGE_SHIFT - 9)), NULL);
+ page = read_mapping_page(mapping, n >> PAGE_SECTORS_SHIFT, NULL);
if (IS_ERR(page))
goto out;