From patchwork Sun Jun 5 11:08:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deren Wu X-Patchwork-Id: 12869746 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2ED66C43334 for ; Sun, 5 Jun 2022 11:20:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=y0PysnegLOjYLAloDuSvgvm8eSQ68UofODWad4FQHQc=; b=JTgRfUbPkwXBb2 VmYjxojTCKleZViyd81K4dd3KJ0aYwi16eO7FwbMxT77AIGkjQsKV+jzXXIXjxmIKUGf/RSFB2SnI 8FN9BRjCduceiv+43EN2kE+Llg26Os6fYZ+dl9Vdj8TDzMSY/D2/9f2hllCcQ2liR9/op8D/7HLFS zu+8SBkf1vvxuONzs15/m020BxnveX6F7nvPJYNRC/JmMMpOhpRz1EqZ4GctPB/JIg6oqv2rUbIth asFrPKhxoF2IXVIISCCYRRKUNWJ9spEXyZK4DiXX8u/ZKfjT8vBKAGxEtMDWlM5Bz5jlBKGXnydRN cGGrAdUWCgGfeuySpjRQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nxoIT-00EMxJ-Fk; Sun, 05 Jun 2022 11:19:53 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nxoIR-00EMw6-9n for linux-mediatek@lists.infradead.org; Sun, 05 Jun 2022 11:19:52 +0000 X-UUID: dee93ea96f9a47d592605b52b04e3c85-20220605 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.5,REQID:87d9dd94-5d95-43dc-8d39-e1e619f8e310,OB:0,LO B:0,IP:0,URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACT ION:release,TS:-5 X-CID-META: VersionHash:2a19b09,CLOUDID:d1fcea6e-b02c-4af4-b838-5c14aaa063c7,C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:0,File:nil ,QS:0,BEC:nil X-UUID: dee93ea96f9a47d592605b52b04e3c85-20220605 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1552114775; Sun, 05 Jun 2022 04:19:40 -0700 Received: from mtkmbs10n1.mediatek.inc (172.21.101.34) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 5 Jun 2022 04:09:38 -0700 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Sun, 5 Jun 2022 19:09:37 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.3 via Frontend Transport; Sun, 5 Jun 2022 19:09:37 +0800 From: Deren Wu To: Felix Fietkau , Lorenzo Bianconi CC: Sean Wang , Soul Huang , YN Chen , Leon Yen , "Eric-SY Chang" , Deren Wu , KM Lin , Robin Chiu , CH Yeh , Posh Sun , Eric Liang , Stella Chang , "Evelyn Tsai" , Ryder Lee , "Shayne Chen" , linux-wireless , linux-mediatek , Deren Wu Subject: [PATCH 1/1] mt76: mt7921: fix warning Using plain integer as NULL pointer Date: Sun, 5 Jun 2022 19:08:59 +0800 Message-ID: <2a3f2334e18a7ad2dbc2cbb410d1b2f9f3690b11.1654424403.git.deren.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220605_041951_388518_3358D4A5 X-CRM114-Status: UNSURE ( 9.48 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Deren Wu Changed "0 to NULL" to avoid below sparse warnings .../mt76/mt7921/acpi_sar.c:64:68: sparse: Using plain integer as NULL pointer Fixes: ab79a7d7a96f ("mt76: mt7921: introduce ACPI SAR support") Reported-by: kernel test robot Signed-off-by: Deren Wu --- drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c b/drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c index fb3d31b96682..be4f07ad3af9 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c @@ -61,7 +61,7 @@ mt7921_acpi_read(struct mt7921_dev *dev, u8 *method, u8 **tbl, u32 *len) static int mt7921_asar_acpi_read_mtcl(struct mt7921_dev *dev, u8 **table, u8 *version) { - *version = (mt7921_acpi_read(dev, MT7921_ACPI_MTCL, table, 0) < 0) + *version = (mt7921_acpi_read(dev, MT7921_ACPI_MTCL, table, NULL) < 0) ? 1 : 2; return 0; }