projects
/
deliverable
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c24ca5b
)
mtd/sm_ftl.c: fix wrong do_div() usage
author
Nicolas Pitre
<nicolas.pitre@linaro.org>
Wed, 4 Nov 2015 04:09:58 +0000
(23:09 -0500)
committer
Nicolas Pitre
<nicolas.pitre@linaro.org>
Mon, 16 Nov 2015 17:39:56 +0000
(12:39 -0500)
do_div() is meant to be used with an unsigned dividend.
Signed-off-by: Nicolas Pitre <nico@linaro.org>
drivers/mtd/sm_ftl.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/mtd/sm_ftl.c
b/drivers/mtd/sm_ftl.c
index c23184a47fc4ea6c1a948ccb4d05f19d84059c4c..b096f8bb05baecf4269684f0d9d01e970ef0b7f9 100644
(file)
--- a/
drivers/mtd/sm_ftl.c
+++ b/
drivers/mtd/sm_ftl.c
@@
-206,9
+206,10
@@
static loff_t sm_mkoffset(struct sm_ftl *ftl, int zone, int block, int boffset)
}
/* Breaks offset into parts */
-static void sm_break_offset(struct sm_ftl *ftl, loff_t offset,
+static void sm_break_offset(struct sm_ftl *ftl, loff_t
l
offset,
int *zone, int *block, int *boffset)
{
+ u64 offset = loffset;
*boffset = do_div(offset, ftl->block_size);
*block = do_div(offset, ftl->max_lba);
*zone = offset >= ftl->zone_count ? -1 : offset;
This page took
0.025223 seconds
and
5
git commands to generate.