linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Souptick Joarder <jrdr.linux@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	Hugh Dickins <hughd@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Michal Hocko <mhocko@suse.com>,
	Ross Zwisler <ross.zwisler@linux.intel.com>,
	zi.yan@cs.rutgers.edu,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	Mark Rutland <mark.rutland@arm.com>,
	riel@redhat.com, pasha.tatashin@oracle.com, jschoenh@amazon.de,
	Kate Stewart <kstewart@linuxfoundation.org>,
	David Rientjes <rientjes@google.com>,
	tglx@linutronix.de, Peter Zijlstra <peterz@infradead.org>,
	Mel Gorman <mgorman@suse.de>,
	yang.s@alibaba-inc.com, Minchan Kim <minchan@kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-kernel@vger.kernel.org, Linux-MM <linux-mm@kvack.org>
Subject: Re: [PATCH] mm: Change return type to vm_fault_t
Date: Sat, 2 Jun 2018 20:14:05 +0530	[thread overview]
Message-ID: <CAFqt6zaWVxpjyyoZvcRbNqMixRwsii6r59ya_cvfnob1bC7O0w@mail.gmail.com> (raw)
In-Reply-To: <20180530111602.GB17450@bombadil.infradead.org>

On Wed, May 30, 2018 at 4:46 PM, Matthew Wilcox <willy@infradead.org> 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 <willy@infradead.org> 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] <noident>
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

  reply	other threads:[~2018-06-02 14:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-29 14:31 [PATCH] mm: Change return type to vm_fault_t Souptick Joarder
2018-05-29 14:50 ` Matthew Wilcox
2018-05-29 15:55   ` Souptick Joarder
2018-05-29 17:34     ` Matthew Wilcox
2018-05-30  3:40       ` Souptick Joarder
2018-05-30 11:16         ` Matthew Wilcox
2018-06-02 14:44           ` Souptick Joarder [this message]
2018-06-02 14:44             ` Souptick Joarder
2018-06-02 14:55           ` Souptick Joarder
2018-06-02 14:59             ` Luc Van Oostenryck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFqt6zaWVxpjyyoZvcRbNqMixRwsii6r59ya_cvfnob1bC7O0w@mail.gmail.com \
    --to=jrdr.linux@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hughd@google.com \
    --cc=jschoenh@amazon.de \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mark.rutland@arm.com \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.com \
    --cc=minchan@kernel.org \
    --cc=pasha.tatashin@oracle.com \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=rientjes@google.com \
    --cc=ross.zwisler@linux.intel.com \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    --cc=yang.s@alibaba-inc.com \
    --cc=zi.yan@cs.rutgers.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).