mirror of https://gitee.com/openkylin/linux.git
mtd: cfi_cmdset_*: kill useless 'ret' variable initializers
The 'ret' local variables are typically initialized to 0 but this value is often unused, thus we can kill those initializers. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
This commit is contained in:
parent
d532c28b8c
commit
ea4f51356f
|
@ -1353,7 +1353,7 @@ static int do_point_onechip (struct map_info *map, struct flchip *chip, loff_t a
|
|||
{
|
||||
unsigned long cmd_addr;
|
||||
struct cfi_private *cfi = map->fldrv_priv;
|
||||
int ret = 0;
|
||||
int ret;
|
||||
|
||||
adr += chip->start;
|
||||
|
||||
|
@ -1383,7 +1383,7 @@ static int cfi_intelext_point(struct mtd_info *mtd, loff_t from, size_t len,
|
|||
struct cfi_private *cfi = map->fldrv_priv;
|
||||
unsigned long ofs, last_end = 0;
|
||||
int chipnum;
|
||||
int ret = 0;
|
||||
int ret;
|
||||
|
||||
if (!map->virt)
|
||||
return -EINVAL;
|
||||
|
@ -1550,7 +1550,7 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip,
|
|||
{
|
||||
struct cfi_private *cfi = map->fldrv_priv;
|
||||
map_word status, write_cmd;
|
||||
int ret=0;
|
||||
int ret;
|
||||
|
||||
adr += chip->start;
|
||||
|
||||
|
@ -1624,7 +1624,7 @@ static int cfi_intelext_write_words (struct mtd_info *mtd, loff_t to , size_t le
|
|||
{
|
||||
struct map_info *map = mtd->priv;
|
||||
struct cfi_private *cfi = map->fldrv_priv;
|
||||
int ret = 0;
|
||||
int ret;
|
||||
int chipnum;
|
||||
unsigned long ofs;
|
||||
|
||||
|
@ -1871,7 +1871,7 @@ static int cfi_intelext_writev (struct mtd_info *mtd, const struct kvec *vecs,
|
|||
struct map_info *map = mtd->priv;
|
||||
struct cfi_private *cfi = map->fldrv_priv;
|
||||
int wbufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize;
|
||||
int ret = 0;
|
||||
int ret;
|
||||
int chipnum;
|
||||
unsigned long ofs, vec_seek, i;
|
||||
size_t len = 0;
|
||||
|
|
|
@ -1713,7 +1713,7 @@ static int __xipram do_write_oneword_start(struct map_info *map,
|
|||
struct flchip *chip,
|
||||
unsigned long adr, int mode)
|
||||
{
|
||||
int ret = 0;
|
||||
int ret;
|
||||
|
||||
mutex_lock(&chip->mutex);
|
||||
|
||||
|
@ -1791,7 +1791,7 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip,
|
|||
unsigned long adr, map_word datum,
|
||||
int mode)
|
||||
{
|
||||
int ret = 0;
|
||||
int ret;
|
||||
|
||||
adr += chip->start;
|
||||
|
||||
|
@ -1815,7 +1815,7 @@ static int cfi_amdstd_write_words(struct mtd_info *mtd, loff_t to, size_t len,
|
|||
{
|
||||
struct map_info *map = mtd->priv;
|
||||
struct cfi_private *cfi = map->fldrv_priv;
|
||||
int ret = 0;
|
||||
int ret;
|
||||
int chipnum;
|
||||
unsigned long ofs, chipstart;
|
||||
DECLARE_WAITQUEUE(wait, current);
|
||||
|
@ -2014,7 +2014,7 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
|
|||
int len)
|
||||
{
|
||||
struct cfi_private *cfi = map->fldrv_priv;
|
||||
int ret = -EIO;
|
||||
int ret;
|
||||
unsigned long cmd_adr;
|
||||
int z, words;
|
||||
map_word datum;
|
||||
|
@ -2095,7 +2095,7 @@ static int cfi_amdstd_write_buffers(struct mtd_info *mtd, loff_t to, size_t len,
|
|||
struct map_info *map = mtd->priv;
|
||||
struct cfi_private *cfi = map->fldrv_priv;
|
||||
int wbufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize;
|
||||
int ret = 0;
|
||||
int ret;
|
||||
int chipnum;
|
||||
unsigned long ofs;
|
||||
|
||||
|
@ -2232,7 +2232,7 @@ static int do_panic_write_oneword(struct map_info *map, struct flchip *chip,
|
|||
struct cfi_private *cfi = map->fldrv_priv;
|
||||
int retry_cnt = 0;
|
||||
map_word oldd;
|
||||
int ret = 0;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
adr += chip->start;
|
||||
|
@ -2307,7 +2307,7 @@ static int cfi_amdstd_panic_write(struct mtd_info *mtd, loff_t to, size_t len,
|
|||
struct map_info *map = mtd->priv;
|
||||
struct cfi_private *cfi = map->fldrv_priv;
|
||||
unsigned long ofs, chipstart;
|
||||
int ret = 0;
|
||||
int ret;
|
||||
int chipnum;
|
||||
|
||||
chipnum = to >> cfi->chipshift;
|
||||
|
@ -2411,7 +2411,7 @@ static int __xipram do_erase_chip(struct map_info *map, struct flchip *chip)
|
|||
unsigned long timeo = jiffies + HZ;
|
||||
unsigned long int adr;
|
||||
DECLARE_WAITQUEUE(wait, current);
|
||||
int ret = 0;
|
||||
int ret;
|
||||
int retry_cnt = 0;
|
||||
|
||||
adr = cfi->addr_unlock1;
|
||||
|
@ -2508,7 +2508,7 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,
|
|||
struct cfi_private *cfi = map->fldrv_priv;
|
||||
unsigned long timeo = jiffies + HZ;
|
||||
DECLARE_WAITQUEUE(wait, current);
|
||||
int ret = 0;
|
||||
int ret;
|
||||
int retry_cnt = 0;
|
||||
|
||||
adr += chip->start;
|
||||
|
|
|
@ -611,7 +611,7 @@ static int cfi_staa_write_buffers (struct mtd_info *mtd, loff_t to,
|
|||
struct map_info *map = mtd->priv;
|
||||
struct cfi_private *cfi = map->fldrv_priv;
|
||||
int wbufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize;
|
||||
int ret = 0;
|
||||
int ret;
|
||||
int chipnum;
|
||||
unsigned long ofs;
|
||||
|
||||
|
@ -895,7 +895,7 @@ static int cfi_staa_erase_varsize(struct mtd_info *mtd,
|
|||
{ struct map_info *map = mtd->priv;
|
||||
struct cfi_private *cfi = map->fldrv_priv;
|
||||
unsigned long adr, len;
|
||||
int chipnum, ret = 0;
|
||||
int chipnum, ret;
|
||||
int i, first;
|
||||
struct mtd_erase_region_info *regions = mtd->eraseregions;
|
||||
|
||||
|
@ -1132,7 +1132,7 @@ static int cfi_staa_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
|
|||
struct map_info *map = mtd->priv;
|
||||
struct cfi_private *cfi = map->fldrv_priv;
|
||||
unsigned long adr;
|
||||
int chipnum, ret = 0;
|
||||
int chipnum, ret;
|
||||
#ifdef DEBUG_LOCK_BITS
|
||||
int ofs_factor = cfi->interleave * cfi->device_type;
|
||||
#endif
|
||||
|
@ -1279,7 +1279,7 @@ static int cfi_staa_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
|
|||
struct map_info *map = mtd->priv;
|
||||
struct cfi_private *cfi = map->fldrv_priv;
|
||||
unsigned long adr;
|
||||
int chipnum, ret = 0;
|
||||
int chipnum, ret;
|
||||
#ifdef DEBUG_LOCK_BITS
|
||||
int ofs_factor = cfi->interleave * cfi->device_type;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue