summaryrefslogtreecommitdiffstats
path: root/drivers/staging/ft1000
diff options
context:
space:
mode:
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>2015-03-10 19:02:29 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-15 18:41:12 +0100
commitcb53b00de93d4a165b31781e9d4598415e3c07a4 (patch)
treeedaeb9aa634cf64b54ccb740309b60c38a65fd63 /drivers/staging/ft1000
parent562b11b3a9304cfd55fa06f932f45879018c9792 (diff)
downloadblackbird-op-linux-cb53b00de93d4a165b31781e9d4598415e3c07a4.tar.gz
blackbird-op-linux-cb53b00de93d4a165b31781e9d4598415e3c07a4.zip
staging: ft1000: ft1000-usb: adjust function arguments
Handles the following issues: Removing extra parentheses around function arguments, Removing unnecessary pointer to pointer 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: <func>(...,(<type> *)&<expression>,...) since both cases generated compilation warnings. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ft1000')
-rw-r--r--drivers/staging/ft1000/ft1000-usb/ft1000_debug.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
index 0f776d0bf0e4..71385231d72c 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
@@ -190,7 +190,7 @@ int ft1000_create_dev(struct ft1000_usb *dev)
tmp->dent = dir;
tmp->file = file;
tmp->int_number = dev->CardNumber;
- list_add(&(tmp->list), &(dev->nodes.list));
+ list_add(&tmp->list, &dev->nodes.list);
pr_debug("registered debugfs directory \"%s\"\n", dev->DeviceName);
@@ -477,14 +477,14 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
/* Connect Message */
pr_debug("IOCTL_FT1000_CONNECT\n");
ConnectionMsg[79] = 0xfc;
- result = card_send_command(ft1000dev, (unsigned short *)ConnectionMsg, 0x4c);
+ result = card_send_command(ft1000dev, ConnectionMsg, 0x4c);
break;
case IOCTL_DISCONNECT:
/* Disconnect Message */
pr_debug("IOCTL_FT1000_DISCONNECT\n");
ConnectionMsg[79] = 0xfd;
- result = card_send_command(ft1000dev, (unsigned short *)ConnectionMsg, 0x4c);
+ result = card_send_command(ft1000dev, ConnectionMsg, 0x4c);
break;
case IOCTL_GET_DSP_STAT_CMD:
/* pr_debug("IOCTL_FT1000_GET_DSP_STAT\n"); */
@@ -642,7 +642,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
}
pmsg++;
ppseudo_hdr = (struct pseudo_hdr *)pmsg;
- result = card_send_command(ft1000dev, (unsigned short *)dpram_data, total_len+2);
+ result = card_send_command(ft1000dev, dpram_data, total_len+2);
ft1000dev->app_info[app_index].nTxMsg++;
OpenPOWER on IntegriCloud