diff options
author | Janani Ravichandran <janani.rvchndrn@gmail.com> | 2016-02-25 14:51:06 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-12 01:09:09 -0500 |
commit | 9842729cfcdc4836ecc786ee5b943950b872868d (patch) | |
tree | d479cc8bf975c93c6039ea5022df5b592eb5bfb2 | |
parent | 437b29d1159af16b54b6571efb92c6e048d03c15 (diff) |
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: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/mt29f_spinand/mt29f_spinand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/mt29f_spinand/mt29f_spinand.c b/drivers/staging/mt29f_spinand/mt29f_spinand.c index 75fe61c54ee5..aa0170e4ef6f 100644 --- a/drivers/staging/mt29f_spinand/mt29f_spinand.c +++ b/drivers/staging/mt29f_spinand/mt29f_spinand.c | |||
@@ -33,7 +33,7 @@ static inline struct spinand_state *mtd_to_state(struct mtd_info *mtd) | |||
33 | { | 33 | { |
34 | struct nand_chip *chip = mtd_to_nand(mtd); | 34 | struct nand_chip *chip = mtd_to_nand(mtd); |
35 | struct spinand_info *info = nand_get_controller_data(chip); | 35 | struct spinand_info *info = nand_get_controller_data(chip); |
36 | struct spinand_state *state = (struct spinand_state *)info->priv; | 36 | struct spinand_state *state = info->priv; |
37 | 37 | ||
38 | return state; | 38 | return state; |
39 | } | 39 | } |
@@ -749,7 +749,7 @@ static void spinand_cmdfunc(struct mtd_info *mtd, unsigned int command, | |||
749 | { | 749 | { |
750 | struct nand_chip *chip = mtd_to_nand(mtd); | 750 | struct nand_chip *chip = mtd_to_nand(mtd); |
751 | struct spinand_info *info = nand_get_controller_data(chip); | 751 | struct spinand_info *info = nand_get_controller_data(chip); |
752 | struct spinand_state *state = (struct spinand_state *)info->priv; | 752 | struct spinand_state *state = info->priv; |
753 | 753 | ||
754 | switch (command) { | 754 | switch (command) { |
755 | /* | 755 | /* |