Received: by 10.223.176.46 with SMTP id f43csp65024wra; Tue, 23 Jan 2018 16:13:47 -0800 (PST) X-Google-Smtp-Source: AH8x227nwgmxJh7foVmgRM5f+ePLhwCkPkazRAlhb6BhUgbQ8h4ibI+U0yRWrq6CVkdAGJO4gVs6 X-Received: by 2002:a17:902:8497:: with SMTP id c23-v6mr6646235plo.139.1516752827424; Tue, 23 Jan 2018 16:13:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516752827; cv=none; d=google.com; s=arc-20160816; b=mCvs5FxpVkyJResgQzUWkXGgvVNOcVAbyO2ipVNABrIzSbpTEJuGoYFvk4wulqfAzr u9LB24HtbswJesGrGS+DMX817GgeuJkvA3iPTpcF/w3bUMIwBvXGv++eQDpio2NAxeN0 /Svt4JywSpxXMIXKpjZPUqlZ8Gt9NIK/b53Ds4ld0leIvfy+zxZwgnXrXwQEsu0SaU8d jf0+c9DbpTHds8ojPGQmLAs74H36qZEm3NY4ImQC0//cdVnhnwt4nyp5UhfvDlJ7iup8 +Y53qcY/evx9QovB+cifYqnmUvd8If5i+7fccF0h4DFSeIikW85KVRx4ez4UMngo9hIA BmhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=A4Stza43zEVRMWLCv2sj0zpKcBAzDEN2v0wi3/AS4K0=; b=pufQWO7YTOrflu/XuTiL9EKnFLyONREH3ShdiWUMFDWMjq/vuswWJKkY1eh4ABp2j6 uShShx6azf+2H6v4B6zR8HjqXgwzBl/ym/WHNxogTRSaczr8djpJjz82jg3o5nFfmJgK aXO1sDRlRpsG+3bR2ZQmx3OpkCoLIgclg19XgqZuYsrwRggCYS3gEpYDaRbmcaUUpP3V qhKTC87onkl0rG7XnMptPh4rnSH2sGIV96FY1DubHrrfdYo3ujTsE0+cOIbund3LGVd+ bUtrTjebZq2V8mPTSGIhXVLEbOnV3xjOnb58Hf4i3M9iBKNjq8SPzxCThxOHlBppBXfr XwoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=chwrrfWE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 39-v6si5200849plc.289.2018.01.23.16.13.33; Tue, 23 Jan 2018 16:13:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=chwrrfWE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932106AbeAXANJ (ORCPT + 99 others); Tue, 23 Jan 2018 19:13:09 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34839 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752455AbeAXANH (ORCPT ); Tue, 23 Jan 2018 19:13:07 -0500 Received: by mail-pg0-f66.google.com with SMTP id o13so1445818pgs.2 for ; Tue, 23 Jan 2018 16:13:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=A4Stza43zEVRMWLCv2sj0zpKcBAzDEN2v0wi3/AS4K0=; b=chwrrfWErAJRNA4B0Ltyq9mYzVyYWJpKqJyb8D+ISXXrNcvb+xfi9VI2qdJHvjyltF NrEsv/hX/svYg37UuTDdSdDd6X7R4rPGLctDQb2+aQJChpUr1cXyfANxTuIJPJyn2ea6 BhkDEczsCO4C3vFmoh08q5ltYk07Ucr8kbuEK5QYIwi3aScNrruB0sUKZDUXc5pa0dXT 1mNJ7W3pM+b7QOSDnslAW/j4FjsD5BUhkak193hVzGo7JI5FS7vwbttCSGvEKJ8m+Ve4 D1CppC88K+yDUSIL5JNCjsn/FD2rAY49CBntqLJ1FqMaGYHi8cxL4Vmy0GBBHZ8NxQ/I aceA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=A4Stza43zEVRMWLCv2sj0zpKcBAzDEN2v0wi3/AS4K0=; b=kZpIE6jiV1g37O4omwX9iRDrVcfOVVsRMgI/qcPBVmtjG3kytNbi58eU/0AGuewcOX Zqf+ColFsiOGXLZD5UEs3G00c6MA6450s26r2aMBpNZKFX2KzCbxLeuUj4kAjnsnP1jb 1nPFJCKDb0i4UVibDg4JCDL0VjDDQ9+GQAY9O7AwokiCoOHAWGHqB3iD5K1FVOjYe4P3 K9pTlHoy8K8P7vCjf0Dbjit+xCG75LuT1kAzQHD1JXGO1P/MOirLXBbTXjz5IEj/55rc kps4KfkZldSFGex91R3jhQDzGgFTTPCn7ZVeV5dmKNR8Nxy94XPRUvfQeAXviFrGexMN jikw== X-Gm-Message-State: AKwxytc7kkHnNG0RQgkqxzr/P726qJm2zdkLLXpGIVqEo/SsLF7mrjbm We0QGMQ4js7VmgAakB1Iuz4= X-Received: by 10.99.115.4 with SMTP id o4mr9317721pgc.206.1516752786547; Tue, 23 Jan 2018 16:13:06 -0800 (PST) Received: from shreeya-VirtualBox ([103.212.140.128]) by smtp.gmail.com with ESMTPSA id p14sm27843994pgu.7.2018.01.23.16.13.05 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Jan 2018 16:13:06 -0800 (PST) From: Shreeya Patel To: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: Shreeya Patel Subject: [PATCH v4 4/4] Staging: rtl8723bs: Use !x instead of NULL comparison Date: Wed, 24 Jan 2018 05:43:02 +0530 Message-Id: <99315a25b008ec1e53bd98dd3230143f9d5e9b04.1516751432.git.shreeya.patel23498@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If "x" is compared to NULL, use "!x" instead of it, so as to follow the kernel coding style. Signed-off-by: Shreeya Patel --- drivers/staging/rtl8723bs/hal/sdio_ops.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c index cc51969..ab2ff53 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_ops.c +++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c @@ -215,7 +215,7 @@ static u32 sdio_read32(struct intf_hdl *intfhdl, u32 addr) u8 *tmpbuf; tmpbuf = rtw_malloc(8); - if (NULL == tmpbuf) { + if (!tmpbuf) { DBG_8192C(KERN_ERR "%s: Allocate memory FAIL!(size =8) addr = 0x%x\n", __func__, addr); return SDIO_ERR_VAL32; } @@ -264,7 +264,7 @@ static s32 sdio_readN(struct intf_hdl *intfhdl, u32 addr, u32 cnt, u8 *buf) ftaddr &= ~(u16)0x3; n = cnt + shift; tmpbuf = rtw_malloc(n); - if (NULL == tmpbuf) + if (!tmpbuf) return -1; err = sd_read(intfhdl, ftaddr, n, tmpbuf); @@ -367,7 +367,7 @@ static s32 sdio_writeN(struct intf_hdl *intfhdl, u32 addr, u32 cnt, u8 *buf) ftaddr &= ~(u16)0x3; n = cnt + shift; tmpbuf = rtw_malloc(n); - if (NULL == tmpbuf) + if (!tmpbuf) return -1; err = sd_read(intfhdl, ftaddr, 4, tmpbuf); if (err) { @@ -730,7 +730,7 @@ static s32 ReadInterrupt8723BSdio(struct adapter *adapter, u32 *phisr) u8 val8, hisr_len; - if (phisr == NULL) + if (!phisr) return false; himr = GET_HAL_DATA(adapter)->sdio_himr; @@ -954,13 +954,13 @@ static struct recv_buf *sd_recv_rxfifo(struct adapter *adapter, u32 size) /* 3 1. alloc recvbuf */ recv_priv = &adapter->recvpriv; recvbuf = rtw_dequeue_recvbuf(&recv_priv->free_recv_buf_queue); - if (recvbuf == NULL) { + if (!recvbuf) { DBG_871X_LEVEL(_drv_err_, "%s: alloc recvbuf FAIL!\n", __func__); return NULL; } /* 3 2. alloc skb */ - if (recvbuf->pskb == NULL) { + if (!recvbuf->pskb) { SIZE_PTR tmpaddr = 0; SIZE_PTR alignment = 0; @@ -974,7 +974,7 @@ static struct recv_buf *sd_recv_rxfifo(struct adapter *adapter, u32 size) skb_reserve(recvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment)); } - if (recvbuf->pskb == NULL) { + if (!recvbuf->pskb) { DBG_871X("%s: alloc_skb fail! read =%d\n", __func__, readsize); return NULL; } @@ -1232,7 +1232,7 @@ u8 RecvOnePkt(struct adapter *adapter, u32 size) DBG_871X("+%s: size: %d+\n", __func__, size); - if (adapter == NULL) { + if (!adapter) { DBG_871X(KERN_ERR "%s: adapter is NULL!\n", __func__); return false; } -- 2.7.4