Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9842729c authored by Janani Ravichandran's avatar Janani Ravichandran Committed by Greg Kroah-Hartman
Browse files

staging: mt29f_spinand: Drop void pointer cast



Void pointers need not be cast to other pointer types.
Semantic patch used:

@r@
expression x;
void *e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x) [...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: default avatarJanani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 437b29d1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ static inline struct spinand_state *mtd_to_state(struct mtd_info *mtd)
{
	struct nand_chip *chip = mtd_to_nand(mtd);
	struct spinand_info *info = nand_get_controller_data(chip);
	struct spinand_state *state = (struct spinand_state *)info->priv;
	struct spinand_state *state = info->priv;

	return state;
}
@@ -749,7 +749,7 @@ static void spinand_cmdfunc(struct mtd_info *mtd, unsigned int command,
{
	struct nand_chip *chip = mtd_to_nand(mtd);
	struct spinand_info *info = nand_get_controller_data(chip);
	struct spinand_state *state = (struct spinand_state *)info->priv;
	struct spinand_state *state = info->priv;

	switch (command) {
	/*