r852: remove casts from void*
Subsystems (3)
PATCH 1/25 r852: remove casts from void*
Remove unnesessary casts from void*.
--- drivers/mtd/nand/r852.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/nand/r852.c +2 -2
@@ -64,8 +64,8 @@ static inline void r852_write_reg_dword(struct r852_device *dev,/* returns pointer to our private structure */ static inline struct r852_device *r852_get_dev (struct mtd_info *mtd) { -struct nand_chip *chip = (struct nand_chip *)mtd->priv; -return (struct r852_device *)chip->priv; +struct nand_chip *chip = mtd->priv; +return chip->priv; }
Signature · 1 line
1.7.0.4
Quoted 2 lines · Kulikov Vasiliy
Remove unnesessary casts from void*.
1) The subjects are not helpful. This one should say something about "mtd" but it doesn't.
2) These haven't been run through checkpatch.pl. In fact, I can't be certain anyone looked at these patches when I see things like:
- if((( lp = (struct wl_private *)dev->priv ) != NULL ) &&
- !( lp->flags & WVLAN2_UIL_BUSY )) {
+ if((( lp = dev->priv ) != NULL ) &&
+ !( lp->flags & WVLAN2_UIL_BUSY )) {
On the recieving end, someone has to review every patch that gets merged.
regards,
dan carpenter
Quoted 14 lines · Dan Carpenter
Quoted 2 lines · Kulikov Vasiliy
Remove unnesessary casts from void*.
1) The subjects are not helpful. This one should say something about "mtd" but it doesn't.
2) These haven't been run through checkpatch.pl. In fact, I can't be certain anyone looked at these patches when I see things like:(quoted diff) +2
-2- if((( lp = (struct wl_private *)dev->priv ) != NULL ) && - !( lp->flags & WVLAN2_UIL_BUSY )) { + if((( lp = dev->priv ) != NULL ) && + !( lp->flags & WVLAN2_UIL_BUSY )) {
Quoted 2 lines
On the recieving end, someone has to review every patch that gets merged.
same problem in drivers/scsi/sg.c but that would requiere a additional patch.
re,
wh
Quoted 2 lines
1) The subjects are not helpful. This one should say something about "mtd" but it doesn't.
ok
Quoted 1 line
2) These haven't been run through checkpatch.pl.
Sorry for dummy question, but shouldn't code style be consistent? Somebody who will see old code and patched code will see one line with wrong-style code then one line with ok then one with wrong etc. Imho it's better to fix style in one big patch.
Quoted 9 lines · Kulikov Vasiliy
Quoted 2 lines
1) The subjects are not helpful. This one should say something about "mtd" but it doesn't.
ok
Quoted 1 line
2) These haven't been run through checkpatch.pl.
Sorry for dummy question, but shouldn't code style be consistent? Somebody who will see old code and patched code will see one line with wrong-style code then one line with ok then one with wrong etc. Imho it's better to fix style in one big patch.
No. If there's only one good line in a whole file, that's at least better than nothing.
regards,
dan carpenter
Quoted 3 lines · Kulikov Vasiliy
Remove unnesessary casts from void*.
Signed-off-by Kulikov Vasiliy <[email protected]>
Pushed whole series to l2-mtd-2.6.git / master.
Signature · 2 lines
Best Regards, Artem Bityutskiy (Артём Битюцкий)