From patchwork Thu Jul 21 21:17:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 12925788 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 63E4FC43334 for ; Thu, 21 Jul 2022 21:18:50 +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=n2i1dXalmSwjW5xpdeMKAucfrkyT7SB77PPCcLOEesg=; b=H4orIJA9QfEzPx Kf0XWwivZz7Xq8qYUaTz8zb1QbAD5kV46Gc6zY+2MMHd8fBiZ6xVLU/evQhJaHjjnEvz979Cvc7kW Sy64Z/jmO10+HhEqJ9JU4CY6x4xUej4xRxsxxFTUdCDz45zaHu13XqOskfq03BLMhjRBrcghwlYh9 WpLAxGzPI7bKRXlWBFt6tK1OxPWbcBzhPnWFQNvVD49iKsqIW+Jg31nNrcrV91eqCWWeOdnIANAcC WZVD7lN5Wcn11xd89HVu06fFrBdhmcXf6p/RkXEZQ2yHq7fSSd7CDsLMnwFtPNAyiFTkrIoiMFQHe E3ZDKTBGrABW1cksISDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEdYU-00COLt-Iv; Thu, 21 Jul 2022 21:17:58 +0000 Received: from cpc152649-stkp13-2-0-cust121.10-2.cable.virginm.net ([86.15.83.122] helo=luna) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEdY9-00COFR-U9 for linux-arm-kernel@lists.infradead.org; Thu, 21 Jul 2022 21:17:40 +0000 Received: from ben by luna with local (Exim 4.96) (envelope-from ) id 1oEdY2-001tWR-2q; Thu, 21 Jul 2022 22:17:30 +0100 From: Ben Dooks To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: linux@armlinux.org.uk, Ben Dooks Subject: [PATCH 2/3] arm: dma-mapping: fix pointer/integer warning Date: Thu, 21 Jul 2022 22:17:28 +0100 Message-Id: <20220721211729.451731-3-ben-linux@fluff.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220721211729.451731-1-ben-linux@fluff.org> References: <20220721211729.451731-1-ben-linux@fluff.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220721_141737_995858_15A9977B X-CRM114-Status: GOOD ( 12.90 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Fix the use of a pointer assignment from integer where false is being used instead of NULL. Fix the following warning by usign NULL: arch/arm/mm/dma-mapping.c:712:52: warning: Using plain integer as NULL pointer Signed-off-by: Ben Dooks --- arch/arm/mm/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 059cce018570..1483b6a4319d 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -709,7 +709,7 @@ static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, *handle = DMA_MAPPING_ERROR; allowblock = gfpflags_allow_blocking(gfp); - cma = allowblock ? dev_get_cma_area(dev) : false; + cma = allowblock ? dev_get_cma_area(dev) : NULL; if (cma) buf->allocator = &cma_allocator;