Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1736527imm; Sat, 2 Jun 2018 07:44:53 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKg/Ejx0UXZxCzGYJYpgJzZ/HyNPs6L34BzDAhEM3Gpnuuzlcu7mRAIf5QS0+X0xBoRi+YY X-Received: by 2002:a62:e816:: with SMTP id c22-v6mr10785495pfi.124.1527950693062; Sat, 02 Jun 2018 07:44:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527950693; cv=none; d=google.com; s=arc-20160816; b=drBfxYDj/s82UcxHzPLZBXIpR9e8yY9uW+1D+Eetm4uKk8uClHv/UrraCYFlX94hLz vW5wpgHUIBSDc1drOUt1vupq7P/hKadp1+HWH6IWPwnqjlObH15yyuQA7nAzYt9z6NAP uFcsj253l4gBX6bW7GG/xWQQS25RZU4RtrzbMHCXUMPSje0Gb62fQZwNIRJlMO4pQumk L70hNuoOZWjUQAbTFyWUihF35NL9kA7pyU6R1v23sy8RaGdoQb8gprWJhl+sIC/yHeJA FeuBtsEA2fTAlwqfvqhiEd7rNtwYEyB1rL73mA8hE28wlCSIPhNfQBr6jGocgc7qpupA nKJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Da28EKR25CooOdbLf+Y6JqWy+7u6N0j6ddxbhkfwNQ0=; b=AXcOriwKsg1DBiG0QYdcIO7X7VthNaYpGh89ggM2Fnw0EeuLQMO4rMAGlw40Gpp2gu IQtgAGwys7LOuOLWAuxuhqeDxSGMwA/jpwJYTwPkD8wnjLAO48leMxbisWL3snbLZh0Z BnPUK4eIDfP+1RHXAKgu92aHiPeV3E+617N7yelOdVgLQauI9HAYf85spzeXvKN5g551 ab+ji9FwrfakJVd/ap1dLB1gEbmwKcn1uEvaluKh/sctb5Vm1OD5KzAtblT3rxCf0+fm Ctg8tML1vSioga1Y1Vq2XQsg7GlGdDQkaerA3GGCq+Us5HxH0Mw6QTDb4AI4ISLD78hG ZHUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bjSWkGBN; 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 k2-v6si41845428plt.374.2018.06.02.07.44.38; Sat, 02 Jun 2018 07:44:53 -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=bjSWkGBN; 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 S1751722AbeFBOoK (ORCPT + 99 others); Sat, 2 Jun 2018 10:44:10 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:39330 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751342AbeFBOoI (ORCPT ); Sat, 2 Jun 2018 10:44:08 -0400 Received: by mail-lf0-f65.google.com with SMTP id t134-v6so18890509lff.6; Sat, 02 Jun 2018 07:44:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Da28EKR25CooOdbLf+Y6JqWy+7u6N0j6ddxbhkfwNQ0=; b=bjSWkGBND5flm7mKibBq2eOQFAwy3+6t+FPIlYRyASZVDLLdurnPzI4y1dznKHD2gH +W/pn/FleH8qGUOx5YElqYjXtq3IOg7Tw7yCJenwZzjSII7bdMURbnagbzVkVvACtpfm sHGtExstDff6uyJEsilzcp1uvVBL7hNsnIQ6gM9n8ff2I7ujHAxjGLsy5bCnFPGawxU2 Pq5StW09i3D4NHNdKEe/FmkUQnuGTOsm4DHZ7widuWK3L74aG3ypeERM3gBLV8V2iG/F D0qpKWDrs0gU9crrnvYdZHtdCDBdyL8t33GylcA7CsdKfrMhcqFYdUafj6YwSka399OL L1dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Da28EKR25CooOdbLf+Y6JqWy+7u6N0j6ddxbhkfwNQ0=; b=k40Ter+mqx8BkL3d17gg/R+6ZizYrIa/mirLemFaZ+32LyPFh33w0+G+OtV5vSYxIA VdzoqPoFiSaziOa/V5873mGM2B3ydDWTNog8EUdSIaU5F21FQus+IO2t1pyo9UlvXiiD rQ5AM5x2bmrvTy/m6j3rPwW0xVcAk7CfGwFKGhaOhqRLDDH3SKgcD5FoOfqYh3SgdyGA waOHwHj4ob5o1xfskgEpSlFqlIEU4/dNRj2V5uyEeeXHclRTTd8aIibffZ01IZkWObkL 3XrkYLYl+e/pCQlHNu24BxFkOiLeget4x/1aBLdH64BGfPmgJ1QL+fr/GGB/ymCLdsHf PnFQ== X-Gm-Message-State: ALKqPwe/4FJz7vFWR3EINqw7CIzBeOvuVzR76QxXaQsldNOQw3dS6AP3 kPfukiJXFp07Xx8eBc+hGednW3CU5r4a6D9i60M= X-Received: by 2002:a19:964b:: with SMTP id y72-v6mr9294483lfd.96.1527950646307; Sat, 02 Jun 2018 07:44:06 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:d885:0:0:0:0:0 with HTTP; Sat, 2 Jun 2018 07:44:05 -0700 (PDT) In-Reply-To: <20180530111602.GB17450@bombadil.infradead.org> References: <20180529143126.GA19698@jordon-HP-15-Notebook-PC> <20180529145055.GA15148@bombadil.infradead.org> <20180529173445.GD15148@bombadil.infradead.org> <20180530111602.GB17450@bombadil.infradead.org> From: Souptick Joarder Date: Sat, 2 Jun 2018 20:14:05 +0530 Message-ID: Subject: Re: [PATCH] mm: Change return type to vm_fault_t To: Matthew Wilcox Cc: Al Viro , Hugh Dickins , Andrew Morton , Michal Hocko , Ross Zwisler , zi.yan@cs.rutgers.edu, "Kirill A. Shutemov" , Dan Williams , Greg KH , Mark Rutland , riel@redhat.com, pasha.tatashin@oracle.com, jschoenh@amazon.de, Kate Stewart , David Rientjes , tglx@linutronix.de, Peter Zijlstra , Mel Gorman , yang.s@alibaba-inc.com, Minchan Kim , linux-fsdevel , linux-kernel@vger.kernel.org, Linux-MM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 30, 2018 at 4:46 PM, Matthew Wilcox wrote: > On Wed, May 30, 2018 at 09:10:47AM +0530, Souptick Joarder wrote: >> On Tue, May 29, 2018 at 11:04 PM, Matthew Wilcox wrote: >> > I see: >> > >> > mm/gup.c:817:15: warning: invalid assignment: |= >> > mm/gup.c:817:15: left side has type int >> > mm/gup.c:817:15: right side has type restricted vm_fault_t >> > >> > are you building with 'c=2' or 'C=2'? >> >> Building with C=2. >> Do I need to enable any separate FLAG ? > > Nope. Here's what I have: > > willy@bobo:~/kernel/souptick$ make C=2 mm/gup.o > CHK include/config/kernel.release > CHK include/generated/uapi/linux/version.h > CHK include/generated/utsrelease.h > CHECK arch/x86/purgatory/purgatory.c > CHECK arch/x86/purgatory/sha256.c > CHECK arch/x86/purgatory/string.c > arch/x86/purgatory/../boot/string.c:134:6: warning: symbol 'simple_strtol' was not declared. Should it be static? > CHK include/generated/bounds.h > CHK include/generated/timeconst.h > CHK include/generated/asm-offsets.h > CALL scripts/checksyscalls.sh > DESCEND objtool > CHECK scripts/mod/empty.c > CHK scripts/mod/devicetable-offsets.h > CHECK mm/gup.c > mm/gup.c:817:15: warning: invalid assignment: |= > mm/gup.c:817:15: left side has type int > mm/gup.c:817:15: right side has type restricted vm_fault_t > CC mm/gup.o > Matthew, Due to some unidentified error still not able to catch this warning in (X86_64 + sparse) compilation. It is constantly showing below error. Documents/linux-4.17-rc7$ make C=2 -j4 mm/gup.o CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h DESCEND objtool CHK include/generated/utsrelease.h CHECK scripts/mod/empty.c CHK scripts/mod/devicetable-offsets.h CHK include/generated/bounds.h CHK include/generated/timeconst.h CHK include/generated/asm-offsets.h CALL scripts/checksyscalls.sh CHECK mm/gup.c mm/gup.c:394:17: error: undefined identifier '__COUNTER__' mm/gup.c:439:9: error: undefined identifier '__COUNTER__' mm/gup.c:441:9: error: undefined identifier '__COUNTER__' mm/gup.c:443:9: error: undefined identifier '__COUNTER__' mm/gup.c:508:17: error: undefined identifier '__COUNTER__' mm/gup.c:716:25: error: undefined identifier '__COUNTER__' mm/gup.c:826:17: error: undefined identifier '__COUNTER__' mm/gup.c:863:17: error: undefined identifier '__COUNTER__' mm/gup.c:865:17: error: undefined identifier '__COUNTER__' mm/gup.c:882:25: error: undefined identifier '__COUNTER__' mm/gup.c:883:25: error: undefined identifier '__COUNTER__' mm/gup.c:920:25: error: undefined identifier '__COUNTER__' ./include/linux/hugetlb.h:239:9: error: undefined identifier '__COUNTER__' But able to capture it in (powerpc + sparse) compilation. I will fix it in v2. /Documents/linux-4.17-rc7$ make C=2 ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- mm/gup.o CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h CHK include/generated/bounds.h CHK include/generated/timeconst.h CHK include/generated/asm-offsets.h CALL scripts/checksyscalls.sh CHECK scripts/mod/empty.c CHK scripts/mod/devicetable-offsets.h CHECK mm/gup.c ./arch/powerpc/include/asm/book3s/64/pgtable.h:669:24: warning: restricted __be64 degrades to integer mm/gup.c:820:15: warning: incorrect type in assignment (different base types) mm/gup.c:820:15: expected int [signed] major mm/gup.c:820:15: got restricted vm_fault_t mm/gup.c:1247:24: warning: expression using sizeof bool mm/gup.c:1247:24: warning: expression using sizeof(void) mm/gup.c:1247:24: warning: expression using sizeof(void) ./arch/powerpc/include/asm/book3s/64/pgtable.h:667:20: warning: incorrect type in initializer (different base types) ./arch/powerpc/include/asm/book3s/64/pgtable.h:667:20: expected unsigned long long [unsigned] [usertype] mask ./arch/powerpc/include/asm/book3s/64/pgtable.h:667:20: got restricted __be64 [usertype] mm/gup.c:1735:6: warning: symbol 'gup_fast_permitted' was not declared. Should it be static? CC mm/gup.o Sparse is throwing below warning -> /Documents/linux-4.17-rc7$ make C=2 ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- mm/hugetlb.o CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h CHK include/generated/bounds.h CHK include/generated/timeconst.h CHK include/generated/asm-offsets.h CALL scripts/checksyscalls.sh CHECK scripts/mod/empty.c CHK scripts/mod/devicetable-offsets.h CHECK mm/hugetlb.c mm/hugetlb.c:3778:33: warning: restricted vm_fault_t degrades to integer mm/hugetlb.c:3777:31: warning: restricted vm_fault_t degrades to integer mm/hugetlb.c:3777:29: warning: incorrect type in assignment (different base types) mm/hugetlb.c:3777:29: expected restricted vm_fault_t [assigned] [usertype] ret mm/hugetlb.c:3777:29: got unsigned int mm/hugetlb.c:3895:33: warning: restricted vm_fault_t degrades to integer mm/hugetlb.c:3894:32: warning: restricted vm_fault_t degrades to integer mm/hugetlb.c:3894:56: warning: incorrect type in return expression (different base types) mm/hugetlb.c:3894:56: expected restricted vm_fault_t mm/hugetlb.c:3894:56: got unsigned int