From patchwork Wed Oct 16 09:51:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 11192781 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D992A1390 for ; Wed, 16 Oct 2019 09:51:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AE6C92168B for ; Wed, 16 Oct 2019 09:51:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AE6C92168B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=codethink.co.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DB2778E0005; Wed, 16 Oct 2019 05:51:19 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D63578E0001; Wed, 16 Oct 2019 05:51:19 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C79C18E0005; Wed, 16 Oct 2019 05:51:19 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0030.hostedemail.com [216.40.44.30]) by kanga.kvack.org (Postfix) with ESMTP id A7CA48E0001 for ; Wed, 16 Oct 2019 05:51:19 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 3396F183BFAA4 for ; Wed, 16 Oct 2019 09:51:19 +0000 (UTC) X-FDA: 76049179878.14.bear35_45a9773659d1a X-Spam-Summary: 2,0,0,0de45879de285049,d41d8cd98f00b204,ben@codethink.co.uk,:linux-kernel@lists.codethink.co.uk:ben.dooks@codethink.co.uk:mike.kravetz@oracle.com::linux-kernel@vger.kernel.org,RULES_HIT:41:355:379:541:800:960:966:973:988:989:1260:1311:1314:1345:1437:1515:1534:1541:1711:1730:1747:1777:1792:2196:2199:2393:2559:2562:3138:3139:3140:3141:3142:3352:3865:3871:4250:4321:4385:5007:6119:6261:7652:9010:10004:11026:11232:11658:11914:12043:12296:12297:12438:12517:12519:12555:12895:12986:13069:13161:13229:13311:13357:13846:13894:14181:14384:14394:14571:14721:21080:21451:21627:30003:30054:30064,0,RBL:176.9.8.82:@codethink.co.uk:.lbl8.mailshell.net-62.2.6.100 64.100.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: bear35_45a9773659d1a X-Filterd-Recvd-Size: 2217 Received: from imap1.codethink.co.uk (imap1.codethink.co.uk [176.9.8.82]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Wed, 16 Oct 2019 09:51:18 +0000 (UTC) Received: from [167.98.27.226] (helo=rainbowdash.codethink.co.uk) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1iKfxY-0002FJ-T2; Wed, 16 Oct 2019 10:51:12 +0100 Received: from ben by rainbowdash.codethink.co.uk with local (Exim 4.92.2) (envelope-from ) id 1iKfxY-0007bK-6H; Wed, 16 Oct 2019 10:51:12 +0100 From: "Ben Dooks (Codethink)" To: linux-kernel@lists.codethink.co.uk Cc: "Ben Dooks (Codethink)" , Mike Kravetz , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: huge_pte_offset() returns pte_t *, not integer Date: Wed, 16 Oct 2019 10:51:11 +0100 Message-Id: <20191016095111.29163-1-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The huge_pte_offset() returns a pte_t *, not an integer so when huge-tlb is off, the replacement inline macro should return a pte_t * too. This fixes the following sparse warning: mm/page_vma_mapped.c:156:29: warning: Using plain integer as NULL pointer Signed-off-by: Ben Dooks Reviewed-by: Mike Kravetz Reported-by: Ben Dooks Signed-off-by: Mike Kravetz --- Cc: Mike Kravetz Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org --- include/linux/hugetlb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 53fc34f930d0..e42c76aa1577 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -185,7 +185,7 @@ static inline void hugetlb_show_meminfo(void) #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) #define hugetlb_mcopy_atomic_pte(dst_mm, dst_pte, dst_vma, dst_addr, \ src_addr, pagep) ({ BUG(); 0; }) -#define huge_pte_offset(mm, address, sz) 0 +#define huge_pte_offset(mm, address, sz) (pte_t *)NULL static inline bool isolate_huge_page(struct page *page, struct list_head *list) {