From 562b11b3a9304cfd55fa06f932f45879018c9792 Mon Sep 17 00:00:00 2001 From: Aya Mahfouz Date: Tue, 10 Mar 2015 19:01:41 +0200 Subject: staging: ft1000: ft1000-pcmcia: adjust function arguments Handles the following issues: Removing extra parentheses around function arguments, Removing unnecessary pointer to potinter cast. Issues were detected using the following coccinelle script: @@ expression e; type t; identifier f; @@ f(..., -(t *) e ,...) @@ expression e; identifier f; @@ f(..., & -( e -) ,...) @@ expression e; identifier f; @@ f(..., -( e -) ,...) Parentheses removal were left to the script. However, handling pointer casts were done manually because not all replacements generated by the script were suitable. In general, the following cases were discarded: pointer casts in macros, pointer casts on function arguments in the form of: (...,( *)&,...) since both cases generated compilation warnings. Signed-off-by: Aya Mahfouz Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c') diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c index bc959ff9a942..e4559caed02b 100644 --- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c @@ -327,7 +327,7 @@ static void ft1000_reset_asic(struct net_device *dev) */ if (info->AsicID == MAGNEMITE_ID) { ft1000_write_reg(dev, FT1000_REG_RESET, - (DSP_RESET_BIT | ASIC_RESET_BIT)); + DSP_RESET_BIT | ASIC_RESET_BIT); } mdelay(1); if (info->AsicID == ELECTRABUZZ_ID) { @@ -387,7 +387,7 @@ static int ft1000_reset_card(struct net_device *dev) } else { pr_debug("resetting ASIC and DSP\n"); ft1000_write_reg(dev, FT1000_REG_RESET, - (DSP_RESET_BIT | ASIC_RESET_BIT)); + DSP_RESET_BIT | ASIC_RESET_BIT); } /* Copy DSP session record into info block if this is not a coldstart */ @@ -1127,7 +1127,9 @@ static void ft1000_proc_drvmsg(struct net_device *dev) info->DSPInfoBlk[8] = 0x7200; info->DSPInfoBlk[9] = htons(info->DSPInfoBlklen); - ft1000_send_cmd(dev, (u16 *)info->DSPInfoBlk, (u16)(info->DSPInfoBlklen+4), 0); + ft1000_send_cmd(dev, info->DSPInfoBlk, + (u16)(info->DSPInfoBlklen+4), + 0); } break; -- cgit v1.2.3-59-g8ed1b