Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp695684imm; Wed, 6 Jun 2018 04:42:08 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL5u/nKftT9di0tirMnvrSjb3VmeDUdII72KIyWTEeM6mDlg32XAGF+nFTosFAjrTnshWzG X-Received: by 2002:a17:902:8491:: with SMTP id c17-v6mr2809396plo.97.1528285327965; Wed, 06 Jun 2018 04:42:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528285327; cv=none; d=google.com; s=arc-20160816; b=TOfMjnhaPD2DZx14tCrVwWtqrZXM9wKecVGaUx83QhpTy4bOy72s8ZcJmT7PqGQp2T 9J4DCiEsxI1Nabk6e1un/305gyVUrmtJ2YD3JOQU0t/sPxD9eBSpwgel05h1GK6QTwib K41xrO8iJJvdXHtGV0Cyj8eTmTiaiQ2EXinFLL64FdPSP+18zsER4zvQtvy/Nn0Z0agd 4hkatbcs3PeL/s0mkr486oz3JnIJlah+8L4inBYihamt68kuepIAwHlhNE5/k3cAzn0l zusO0+3dWTGHc9XSBnuMIozcEu/0czWJ2a914QcE7yt5ZU261mtdqOxKG6hc/b4ms/OD PGaQ== 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=bKAxB1FkxG3CtI7j4D75a//PwqHRtVcQ+Bq7xqyC07c=; b=WLVDeFj0x2Lf9A7MG5Zh4U2wcgmazW4/NpaFJxk9k1oYnmynpQ84Y34nif3vP48k1M dF614Nvr+TTbssEzEPHJjVPGqGhkLnTZmczVWFuu7ijeq4wv4ro57mP3YmW21IomlVAQ VEhWMH+VUFAUafs1sNj8SZ+Y/rs40R1Jm901S5sH+ISQmge3VzbK2lExrRpITM1w7DtV cvMgSEg3Kvti4MenHKYT6AuAELhm4sQYbhvRl3oShAQS3/eFJUiC8GAUSoumRclGVjMm jBXfU8gbK6XDxvFtLz2NUpXqgP7Y3d+TSvcWKOUwILB8jUykr8Kv/qsI4zuAZjjE4UO7 kI1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SwcKwnHR; 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=QUARANTINE 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 t27-v6si13957661pgo.566.2018.06.06.04.41.53; Wed, 06 Jun 2018 04:42:07 -0700 (PDT) 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=SwcKwnHR; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752111AbeFFLlK (ORCPT + 99 others); Wed, 6 Jun 2018 07:41:10 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:54086 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751982AbeFFLko (ORCPT ); Wed, 6 Jun 2018 07:40:44 -0400 Received: by mail-wm0-f65.google.com with SMTP id x6-v6so10858560wmc.3 for ; Wed, 06 Jun 2018 04:40:43 -0700 (PDT) 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=bKAxB1FkxG3CtI7j4D75a//PwqHRtVcQ+Bq7xqyC07c=; b=SwcKwnHR89N5UxKJjNYOpTgpcEqqjKtRRpyLqvlRjzOpfSo3GPC7GZcnbNKOz1sWfF o4fPHot5TYyEvfrWUzCtXTWBKhIFlCWEGJqsdds/zqHQn2EV10TVaaK1ZvUFy1u76LAb s+qHzO+fMAyo6Binhub5yJ/lm/vkd7o0U4HeGbQPJTUEt30eDjbEvntxpNUD5AUereDC CywzlxCBqBH64C8tnmPGRf8Kuh6e98UurSDXZtf08dcUpWismty/ONlUpNhs1xCDUyoR 3QC4+QycbmJ/z/UFQfZk1XJowNmxyJySAs7Gh763lAnDKzai/pnvT5L6wun/KgAn5qR7 4aCA== 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=bKAxB1FkxG3CtI7j4D75a//PwqHRtVcQ+Bq7xqyC07c=; b=magpd1j36p4TTS5FeUqFKdzeeShm9+bK2PJEPT03jpr0yhYBSU2APu6X8z2p1pZy62 FgEZM59OgcGskYUniq1yGI3oHJJ3PQ7BEU21UmAMt1PoWeCRpS5GNPVhXM+qSihYCYcJ xTLVGGh5jHbfmsY3Okj0yfP3m+4jtxHZuUZ+h91ZVfL+kFSGReknZoxYMX7n5E3Ii+Zy 5KQezjkPQcvAmE5IqMsKtUQeIpZWxeHQzwbfMgJVgRwwwNe5QNOkiF07Fp13wQDij3aK 7OfWB8sfDc7Hzw38nsWo5hipsF8ZIHD1TTOTjz+L/H2ldm9mLGsD9/NN3dI9fngvqx9i unHg== X-Gm-Message-State: APt69E0pnkZIzioftdyQdN6AlubeRoFr969MxOnisda56dJW6DiBTe7j vOS1lWQmkA/3aUf1Sg/gG1KPmg== X-Received: by 2002:aa7:d643:: with SMTP id v3-v6mr3333402edr.116.1528285242756; Wed, 06 Jun 2018 04:40:42 -0700 (PDT) Received: from localhost.localdomain ([109.76.154.182]) by smtp.gmail.com with ESMTPSA id r48-v6sm29199600edd.16.2018.06.06.04.40.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Jun 2018 04:40:41 -0700 (PDT) From: John Whitmore To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, colin.king@canonical.com, tglx@linutronix.de, kstewart@linuxfoundation.org, devel@driverdev.osuosl.org, John Whitmore Subject: [PATCH v6 7/8] staging: rtl8192e: Optimise Comparison to NULL tests - Coding Style Date: Wed, 6 Jun 2018 12:40:02 +0100 Message-Id: <20180606114003.22654-8-johnfwhitmore@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180606114003.22654-1-johnfwhitmore@gmail.com> References: <20180606114003.22654-1-johnfwhitmore@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Change comparison to NULL to better adhere to coding standard. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index 7ea516609d4c..9cca4a8f1cf5 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -520,7 +520,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u PHT_CAPABILITY_ELE pCapELE = NULL; //u8 bIsDeclareMCS13; - if ((posHTCap == NULL) || (pHT == NULL)) { + if (!posHTCap || !pHT) { IEEE80211_DEBUG(IEEE80211_DL_ERR, "posHTCap or pHTInfo can't be null in HTConstructCapabilityElement()\n"); return; } @@ -624,7 +624,7 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *le PRT_HIGH_THROUGHPUT pHT = ieee->pHTInfo; PHT_INFORMATION_ELE pHTInfoEle = (PHT_INFORMATION_ELE)posHTInfo; - if ((posHTInfo == NULL) || (pHTInfoEle == NULL)) { + if (!posHTInfo || !pHTInfoEle) { IEEE80211_DEBUG(IEEE80211_DL_ERR, "posHTInfo or pHTInfoEle can't be null in HTConstructInfoElement()\n"); return; } @@ -687,7 +687,7 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *le * *****************************************************************************************************************/ void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg, u8 *len) { - if (posRT2RTAgg == NULL) { + if (!posRT2RTAgg) { IEEE80211_DEBUG(IEEE80211_DL_ERR, "posRT2RTAgg can't be null in HTConstructRT2RTAggElement()\n"); return; } @@ -737,7 +737,7 @@ static u8 HT_PickMCSRate(struct ieee80211_device *ieee, u8 *pOperateMCS) { u8 i; - if (pOperateMCS == NULL) { + if (!pOperateMCS) { IEEE80211_DEBUG(IEEE80211_DL_ERR, "pOperateMCS can't be null in HT_PickMCSRate()\n"); return false; } @@ -799,7 +799,7 @@ u8 HTGetHighestMCSRate(struct ieee80211_device *ieee, u8 *pMCSRateSet, u8 *pMCSF u8 mcsRate = 0; u8 availableMcsRate[16]; - if (pMCSRateSet == NULL || pMCSFilter == NULL) { + if (!pMCSRateSet || !pMCSFilter) { IEEE80211_DEBUG(IEEE80211_DL_ERR, "pMCSRateSet or pMCSFilter can't be null in HTGetHighestMCSRate()\n"); return false; } -- 2.17.0