mtd: remove retlen zeroing duplication
The MTD API function now zero the 'retlen' parameter before calling the driver's method — do not do this again in drivers. This removes duplicated '*retlen = 0' assignent from the following methods: 'mtd_point()' 'mtd_read()' 'mtd_write()' 'mtd_writev()' 'mtd_panic_write()' Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
这个提交包含在:
@@ -70,13 +70,11 @@ static struct mtd_info *map_absent_probe(struct map_info *map)
|
||||
|
||||
static int map_absent_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf)
|
||||
{
|
||||
*retlen = 0;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static int map_absent_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf)
|
||||
{
|
||||
*retlen = 0;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户