linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shreeya Patel <shreeya.patel23498@gmail.com>
To: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Cc: Shreeya Patel <shreeya.patel23498@gmail.com>
Subject: [PATCH v3 3/4] Staging: rtl8723bs: Remove dead code
Date: Sat, 20 Jan 2018 00:13:36 +0530	[thread overview]
Message-ID: <8c3cfa03c5da269159b125f92c188bd0624b2c65.1516386028.git.shreeya.patel23498@gmail.com> (raw)
In-Reply-To: <cover.1516386027.git.shreeya.patel23498@gmail.com>

"oldmem==NULL;"
The above bug under the ifdef code would have caused a GCC
warning if it were ever compiled. Hence, remove the dead ifdefed
code from the file.

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
---

Changes in v3
  -Remove dead code.

 drivers/staging/rtl8723bs/hal/sdio_ops.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c
index 00b20c0..43800a1 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
@@ -453,21 +453,6 @@ static u32 sdio_read_port(
 		cnt = _RND(cnt, psdio->block_transfer_len);
 /* 	cnt = sdio_align_size(cnt); */
 
-	if (oldcnt != cnt) {
-#ifdef SDIO_DYNAMIC_ALLOC_MEM
-		oldmem = mem;
-		mem = rtw_malloc(cnt);
-		if (mem == NULL) {
-			DBG_8192C(KERN_WARNING "%s: allocate memory %d bytes fail!\n", __func__, cnt);
-			mem = oldmem;
-			oldmem == NULL;
-		}
-#else
-		/*  in this case, caller should gurante the buffer is big enough */
-		/*  to receive data after alignment */
-#endif
-	}
-
 	err = _sd_read(intfhdl, addr, cnt, mem);
 
 #ifdef SDIO_DYNAMIC_ALLOC_MEM
-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2018-01-19 18:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19 18:33 [PATCH v3 0/4] Remove checkpatch warnings Shreeya Patel
2018-01-19 18:36 ` [PATCH v3 1/4] Staging: rtl8723bs: Replace true with x and false with !x Shreeya Patel
2018-01-19 18:40 ` [PATCH v3 2/4] Staging: rtl8723bs: Change names to conform to the kernel code Shreeya Patel
2018-01-23 10:45   ` Greg KH
2018-01-19 18:43 ` Shreeya Patel [this message]
2018-01-19 18:45 ` [PATCH v3 4/4] Staging: rtl8723bs: Use !x instead of NULL comparison Shreeya Patel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8c3cfa03c5da269159b125f92c188bd0624b2c65.1516386028.git.shreeya.patel23498@gmail.com \
    --to=shreeya.patel23498@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).