From: Wayne Porter <wporter82@gmail.com>
To: gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 6/8] staging: rts5208: xd.c: Clean up comparison to NULL
Date: Mon, 3 Oct 2016 23:18:20 +0000 [thread overview]
Message-ID: <f7ee0c917db51df29b4d19b5c04c537e78235ebf.1475535232.git.wporter82@gmail.com> (raw)
In-Reply-To: <cover.1475535232.git.wporter82@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1861 bytes --]
Checkpatch recommended changes
Signed-off-by: Wayne Porter <wporter82@gmail.com>
---
drivers/staging/rts5208/xd.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rts5208/xd.c b/drivers/staging/rts5208/xd.c
index 4d8733f..ccc5dd9 100644
--- a/drivers/staging/rts5208/xd.c
+++ b/drivers/staging/rts5208/xd.c
@@ -943,7 +943,7 @@ static void xd_set_unused_block(struct rtsx_chip *chip, u32 phy_blk)
}
zone = &xd_card->zone[zone_no];
- if (zone->free_table == NULL) {
+ if (!zone->free_table) {
if (xd_build_l2p_tbl(chip, zone_no) != STATUS_SUCCESS)
return;
}
@@ -1436,7 +1436,7 @@ static int xd_build_l2p_tbl(struct rtsx_chip *chip, int zone_no)
dev_dbg(rtsx_dev(chip), "xd_build_l2p_tbl: %d\n", zone_no);
- if (xd_card->zone == NULL) {
+ if (!xd_card->zone) {
retval = xd_init_l2p_tbl(chip);
if (retval != STATUS_SUCCESS)
return retval;
@@ -1450,7 +1450,7 @@ static int xd_build_l2p_tbl(struct rtsx_chip *chip, int zone_no)
zone = &xd_card->zone[zone_no];
- if (zone->l2p_table == NULL) {
+ if (!zone->l2p_table) {
zone->l2p_table = vmalloc(2000);
if (!zone->l2p_table) {
rtsx_trace(chip);
@@ -1459,7 +1459,7 @@ static int xd_build_l2p_tbl(struct rtsx_chip *chip, int zone_no)
}
memset((u8 *)(zone->l2p_table), 0xff, 2000);
- if (zone->free_table == NULL) {
+ if (!zone->free_table) {
zone->free_table = vmalloc(XD_FREE_TABLE_CNT * 2);
if (!zone->free_table) {
rtsx_trace(chip);
@@ -2253,7 +2253,7 @@ void xd_free_l2p_tbl(struct rtsx_chip *chip)
struct xd_info *xd_card = &chip->xd_card;
int i = 0;
- if (xd_card->zone != NULL) {
+ if (xd_card->zone) {
for (i = 0; i < xd_card->zone_cnt; i++) {
vfree(xd_card->zone[i].l2p_table);
xd_card->zone[i].l2p_table = NULL;
--
2.1.4
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2016-10-03 23:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-03 23:15 [PATCH 0/8] staging: rts5208: Cleanup Wayne Porter
2016-10-03 23:16 ` [PATCH 1/8] staging: rts5208: Fix CamelCase found by checkpatch Wayne Porter
2016-10-09 14:54 ` Greg KH
2016-10-03 23:16 ` [PATCH 2/8] staging: rts5208: xd.h: Alignment fix Wayne Porter
2016-10-03 23:17 ` [PATCH 3/8] staging: rts5208: " Wayne Porter
2016-10-03 23:17 ` [PATCH 4/8] staging: rts5208: Logical continuation fixes Wayne Porter
2016-10-03 23:25 ` Joe Perches
2016-10-03 23:18 ` [PATCH 5/8] staging: rts5208: xd.c: Remove unnecessary parentheses Wayne Porter
2016-10-03 23:18 ` Wayne Porter [this message]
2016-10-03 23:18 ` [PATCH 7/8] staging: rts5208: xd.c: Fix CamelCase Wayne Porter
2016-10-03 23:18 ` [PATCH 8/8] staging: rts5208: xd.c: Remove multiple assignments Wayne Porter
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=f7ee0c917db51df29b4d19b5c04c537e78235ebf.1475535232.git.wporter82@gmail.com \
--to=wporter82@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
all inboxes | Powered by JetHome®