[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a1d2e1ea-5093-b319-ec4a-b7e07bcc6594@users.sourceforge.net>
Date: Thu, 11 Aug 2016 07:54:24 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: devel@...verdev.osuosl.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Wolfram Sang <wsa@...-dreams.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>,
Joe Perches <joe@...ches.com>, Jean Delvare <jdelvare@...e.de>
Subject: [PATCH v2 10/10] staging: ks7010: Delete three unnecessary variable
initialisations
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Wed, 10 Aug 2016 22:33:52 +0200
Three variables will be set to an appropriate value a bit later.
Thus omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
v2: Rebased on the source files from Linux next-20160809.
It was omitted to reduce the scope for the variable "rc"
in the function "tx_device_task".
drivers/staging/ks7010/ks7010_sdio.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index 1729f57..bb6294c 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -331,7 +331,7 @@ static void tx_device_task(void *dev)
{
struct ks_wlan_private *priv = (struct ks_wlan_private *)dev;
struct tx_device_buffer *sp;
- int rc = 0;
+ int rc;
DPRINTK(4, "\n");
if (cnt_txqbody(priv) > 0
@@ -366,7 +366,7 @@ int ks_wlan_hw_tx(struct ks_wlan_private *priv, void *p, unsigned long size,
void (*complete_handler) (void *arg1, void *arg2),
void *arg1, void *arg2)
{
- int result = 0;
+ int result;
struct hostif_hdr *hdr;
hdr = (struct hostif_hdr *)p;
@@ -747,7 +747,7 @@ static int ks7010_sdio_data_compare(struct ks_wlan_private *priv, u32 address,
static int ks7010_upload_firmware(struct ks_wlan_private *priv,
struct ks_sdio_card *card)
{
- unsigned int size, offset, n = 0;
+ unsigned int size, offset, n;
unsigned char *rom_buf;
unsigned char rw_data = 0;
int retval, rc = 0;
--
2.9.2
Powered by blists - more mailing lists