Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3904996pxj; Tue, 8 Jun 2021 01:19:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzMr1bWaZA9cA4CyKUyXsnWFjuoaq/f8gn6pp1mJKoqWotvpf1zJPVgpORYwxPCyRlJN4W X-Received: by 2002:a05:6402:343:: with SMTP id r3mr23702735edw.22.1623140377725; Tue, 08 Jun 2021 01:19:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623140377; cv=none; d=google.com; s=arc-20160816; b=gtjS0iWh8HU06EeBk2fNNAJf900wMXct7p1WKi7KNL+nMcJbaUZpXQ87ChKs4JFOpI R0GQ07LmavJtwkKNJD8hU+u2V5cwiEVYlsU2SM9B/SZLebbSdX8yLCTd5Gr5vI2TsFIn A8JpRX+D7j2KcA6lR0or/Z13nQei9CCHi5DmFEQvUULNAsJCf+7zmT/Pexdh24wj7OHi r0FGl2uLHxffrY+86/8rBL717antNtR+7zt6T22a+NscTKMVIAjfRd0ZXRMXnmbHVCYC Fw87jn0pIH9h1+VF+9t2NaTnscD9i6UF0xbgCbOmcXMVRrY8X7YYeEWcrsZhSl2Ujvyw 41cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=oPsRjSGJTZUIIo2CyTpTTuaeSGisopT2i0T92odby5k=; b=JuCusZiPgum6U5uKJOPzqkxhHIS49HTBb9Q7J5HgubJ+KSo/7YyjXIND8GUHD+Yu/r /morgD8vPw6rl+c6JFd6QWZIK+wydXqpG29f19gYv9FgQDErJ6NLOnSlP6IpVYH+OPeQ vGJICZA2114+M0qkSg+5akpGBgHPN3lIUXr41Tb8K2adhPwz6NiEWwVqtvnfO6sO9eEU NxDGPvIk8aQDNpb+YIwTP+KDexjynWtt9PVmkKcSe3j38kG/qh6EFCFLPc07AK0NcrSo JrburbHmnzlLbodIsX8lU0KYNRFHQCCrAnpOSEAJ0G/BYql0mDNGXTA3U6GgL3zn8evO GFIQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c19si9110923ejj.584.2021.06.08.01.19.14; Tue, 08 Jun 2021 01:19:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231646AbhFHISe (ORCPT + 99 others); Tue, 8 Jun 2021 04:18:34 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:4399 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230377AbhFHIRr (ORCPT ); Tue, 8 Jun 2021 04:17:47 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4FzjdG4B6Zz6vZW; Tue, 8 Jun 2021 16:12:02 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Tue, 8 Jun 2021 16:15:53 +0800 Received: from localhost.localdomain (10.67.165.24) by dggemi759-chm.china.huawei.com (10.1.198.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 8 Jun 2021 16:15:52 +0800 From: Guangbin Huang To: , , , , CC: , , , Subject: [PATCH net-next 16/16] net: farsync: replace comparison to NULL with "fst_card_array[i]" Date: Tue, 8 Jun 2021 16:12:42 +0800 Message-ID: <1623139962-34847-17-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1623139962-34847-1-git-send-email-huangguangbin2@huawei.com> References: <1623139962-34847-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Li According to the chackpatch.pl, comparison to NULL could be written "fst_card_array[i]". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang --- drivers/net/wan/farsync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index 10208f0..b3466e0 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c @@ -611,7 +611,7 @@ fst_process_tx_work_q(struct tasklet_struct *unused) */ for (i = 0; i < FST_MAX_CARDS; i++) { if (work_txq & 0x01) { - if (fst_card_array[i] != NULL) { + if (fst_card_array[i]) { dbg(DBG_TX, "Calling tx bh for card %d\n", i); do_bottom_half_tx(fst_card_array[i]); } @@ -639,7 +639,7 @@ fst_process_int_work_q(struct tasklet_struct *unused) */ for (i = 0; i < FST_MAX_CARDS; i++) { if (work_intq & 0x01) { - if (fst_card_array[i] != NULL) { + if (fst_card_array[i]) { dbg(DBG_INTR, "Calling rx & tx bh for card %d\n", i); do_bottom_half_rx(fst_card_array[i]); -- 2.8.1