Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1736896imm; Sat, 2 Jun 2018 07:45:26 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJiCa7jyE6E8g0luGtw6kWUG7/qvly23+FejkSMoaWcF/2Z+Lx6fj6W8ydIaZZTiAOLFx06 X-Received: by 2002:a62:ab0e:: with SMTP id p14-v6mr9130228pff.211.1527950725958; Sat, 02 Jun 2018 07:45:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527950725; cv=none; d=google.com; s=arc-20160816; b=GdTW3viI8RhVTDJ12uELo7mubgIA0moI6/t5md9lOYL7aAdAAt4rddrKl5wfTJVTmj ntXEMLZjvYAHlhWOEarwSwMqLBolM/6LPeZoRRjzRUo6UkZZ3TK7DUgTzghBD0gCxhgt jSlY99hNEZTJJTGHzvGBT3MbbxPY7Gcno4Cs3qk23Uj4dh3wmsBB+A9KN7xZ73ZwtHWP iuWes13/5jnJBCGQiykxLhL4s4Uu+vpYep3DDbVaGUPfryd8Q7Lj+DV+tWx2CRlZm+6X 5smgD7jpAfTuk8fyifz3FIa328cYNVugCTf9IFxTOpf2zDEb6XjYKlsZ3gzzPE8SrIS5 5bqg== 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=+lZvVjd46p8Cg+zEOMgnn4MKmuUhl3ixIw1DgCT4cQI=; b=AIGg40gsUMGOOmCVY9vPyhqi1Nlp1kxzvhdNgXmTbdLtf/0xgzacXf6xeAeuD7tYyg Q48g4MBnridoVab8JxDIDVKrEg+OH4jYWsbcSuOe153mKUghnzKDRElE5LyHvvHdk8ak BBMtlsCj2Hwg42go2+0yiCTPQR25iZ1e+y9zvOri+D2R4xaDi7MssG70TINrltK3UegO FduFZyMVU2LXsAPqHRbBtwngC4DYH2LchVPPJNQRqwnZTIL9n30jPxeGX0JBpg1xmiR2 c1CMF9iZ7ySgs7UXhgPQc6VG/V9+mz3LBvE3BsB0520iCuZflkqlhBit4rmB8vj8N0s3 ctTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g+UOEi+Y; 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 s7-v6si32816470pgr.670.2018.06.02.07.45.11; Sat, 02 Jun 2018 07:45:25 -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=g+UOEi+Y; 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 S1751820AbeFBOoi (ORCPT + 99 others); Sat, 2 Jun 2018 10:44:38 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:36555 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751267AbeFBOog (ORCPT ); Sat, 2 Jun 2018 10:44:36 -0400 Received: by mail-lf0-f65.google.com with SMTP id u4-v6so18903706lff.3; Sat, 02 Jun 2018 07:44:35 -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=+lZvVjd46p8Cg+zEOMgnn4MKmuUhl3ixIw1DgCT4cQI=; b=g+UOEi+YXaOodap3icxNprc23Nu9RzRmRL9lNz9sNrW/XKyZ3FTViag55VbCbFWfLQ riS7KbwCqO9tHaQm1iFmDihqTQ5Vo0sIjgoRwa8c5jBtzDiKKkoKPhWC6LpDuBeoIAMO v2vddEMGqmzGp+xIJVX/IEh55WaOnmmKZfIybB0JNn5xiHxNS5RVE9YdRWHuEj0aTuFt pN4I2gIz3PpgpcYIn4rqgVWZW1Hi+520j7yVaKT2gSqkOSja4GL+wEo5ebl4Fn+J77ht FZxuy6w2uyXQmqcxwa3QXiU7/h7uYwxhOmjf2jeYWkibFsNoI5c4PhiVkZnKNXG6m8bJ IMOQ== 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=+lZvVjd46p8Cg+zEOMgnn4MKmuUhl3ixIw1DgCT4cQI=; b=lezMXbPJ3uqZt2W0mDk0DUY0vv0WDH+MXeAL4TpOGka/lQLMTwOiCJ0jvbbzXjOzFv QTDcDDtxyp9sznkM3R2vZo5LR267qadS6pjhbAGyzY70MGO/RTqt30uMEspWiuXqJ1mM jCqIYu3TAuOpFLfYwXKjncmYRpMEB2tioKlfNjBwSTg093NXFVJjXfNQf9BigxOaaVIn R6Hx+zcU6E7FJnfnguSSK2UWfvc3BSKTaJ5l0GaI4SM1XIlQGWAF4WbSzWY05fmMIjak aspa2at+Z4HqJPkKu7z5G9kDC/o+eQmA0TAjlhcBpa01BCLhuKXgKUB46gvK4Lc1sdu8 5Mlw== X-Gm-Message-State: ALKqPwfExmBCTTQyspVuqegGyr0IaWPGIVLZOY0NpT0ByGrJLq5nWAc9 2kHE5E+Zlm43EYmdssye2EVbQChx7FN0V69iuhw= X-Received: by 2002:a19:e117:: with SMTP id y23-v6mr9084055lfg.9.1527950674639; Sat, 02 Jun 2018 07:44:34 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:d885:0:0:0:0:0 with HTTP; Sat, 2 Jun 2018 07:44:33 -0700 (PDT) In-Reply-To: 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:33 +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 Please ignoe this mail. I send it by mistake. On Sat, Jun 2, 2018 at 8:14 PM, Souptick Joarder wrote: > 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