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>
Цей коміт міститься в:

зафіксовано
David Woodhouse

джерело
664addc248
коміт
834247ec7e
@@ -249,8 +249,6 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len,
|
||||
pr_debug("%s: read 0x%x..0x%x\n", dev_name(&priv->spi->dev),
|
||||
(unsigned)from, (unsigned)(from + len));
|
||||
|
||||
*retlen = 0;
|
||||
|
||||
/* Sanity checks */
|
||||
if (!len)
|
||||
return 0;
|
||||
@@ -323,8 +321,6 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
|
||||
pr_debug("%s: write 0x%x..0x%x\n",
|
||||
dev_name(&spi->dev), (unsigned)to, (unsigned)(to + len));
|
||||
|
||||
*retlen = 0;
|
||||
|
||||
/* Sanity checks */
|
||||
if (!len)
|
||||
return 0;
|
||||
|
Посилання в новій задачі
Заблокувати користувача