Skip to content

Commit 2416a2e

Browse files
ColinIanKingmiquelraynal
authored andcommitted
mtd: chips: remove redundant assignment to variable timeo
In two functions the variable timeo is being initialized with a value that is never read, it is being re-assigned later on. The initializations are redundant and can be removed. Cleans up clang scan build warning: warning: Value stored to 'timeo' during its initialization is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20240215140106.2062858-1-colin.i.king@gmail.com
1 parent f1d0049 commit 2416a2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/mtd/chips/cfi_cmdset_0002.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2411,7 +2411,7 @@ static int cfi_amdstd_panic_write(struct mtd_info *mtd, loff_t to, size_t len,
24112411
static int __xipram do_erase_chip(struct map_info *map, struct flchip *chip)
24122412
{
24132413
struct cfi_private *cfi = map->fldrv_priv;
2414-
unsigned long timeo = jiffies + HZ;
2414+
unsigned long timeo;
24152415
unsigned long int adr;
24162416
DECLARE_WAITQUEUE(wait, current);
24172417
int ret;
@@ -2512,7 +2512,7 @@ static int __xipram do_erase_chip(struct map_info *map, struct flchip *chip)
25122512
static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip, unsigned long adr, int len, void *thunk)
25132513
{
25142514
struct cfi_private *cfi = map->fldrv_priv;
2515-
unsigned long timeo = jiffies + HZ;
2515+
unsigned long timeo;
25162516
DECLARE_WAITQUEUE(wait, current);
25172517
int ret;
25182518
int retry_cnt = 0;

0 commit comments

Comments
 (0)