Re: [PATCH] mm: Change return type to vm_fault_t
On Sat, Jun 02, 2018 at 08:25:29PM +0530, Souptick Joarder wrote: > 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__' It seems you're using a rather old version of sparse. Please use something more recent like v0.5.1 or v0.5.2. Regards, -- Luc
Re: [PATCH] mm: Change return type to vm_fault_t
On Sat, Jun 02, 2018 at 08:25:29PM +0530, Souptick Joarder wrote: > 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__' It seems you're using a rather old version of sparse. Please use something more recent like v0.5.1 or v0.5.2. Regards, -- Luc
Re: [PATCH] mm: Change return type to vm_fault_t
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 > CALLscripts/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 CALLscripts/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 CALLscripts/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 Also 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 CALLscripts/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
Re: [PATCH] mm: Change return type to vm_fault_t
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 > CALLscripts/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 CALLscripts/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 CALLscripts/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 Also 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 CALLscripts/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
Re: [PATCH] mm: Change return type to vm_fault_t
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 >> CALLscripts/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 > CALLscripts/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 > CALLscripts/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 > CALLscripts/checksyscalls.sh > CHECK scripts/mod/empty.c > CHK
Re: [PATCH] mm: Change return type to vm_fault_t
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 >> CALLscripts/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 > CALLscripts/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 > CALLscripts/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 > CALLscripts/checksyscalls.sh > CHECK scripts/mod/empty.c > CHK
Re: [PATCH] mm: Change return type to vm_fault_t
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 > CALLscripts/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 CALLscripts/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 CALLscripts/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 CALLscripts/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
Re: [PATCH] mm: Change return type to vm_fault_t
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 > CALLscripts/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 CALLscripts/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 CALLscripts/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 CALLscripts/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
Re: [PATCH] mm: Change return type to vm_fault_t
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 CALLscripts/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
Re: [PATCH] mm: Change return type to vm_fault_t
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 CALLscripts/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
Re: [PATCH] mm: Change return type to vm_fault_t
On Tue, May 29, 2018 at 11:04 PM, Matthew Wilcox wrote: > On Tue, May 29, 2018 at 09:25:05PM +0530, Souptick Joarder wrote: >> On Tue, May 29, 2018 at 8:20 PM, Matthew Wilcox wrote: >> > On Tue, May 29, 2018 at 08:01:26PM +0530, Souptick Joarder wrote: >> >> Use new return type vm_fault_t for fault handler. For >> >> now, this is just documenting that the function returns >> >> a VM_FAULT value rather than an errno. Once all instances >> >> are converted, vm_fault_t will become a distinct type. >> > >> > I don't believe you've checked this with sparse. >> > >> >> @@ -802,7 +802,8 @@ int fixup_user_fault(struct task_struct *tsk, struct >> >> mm_struct *mm, >> >>bool *unlocked) >> >> { >> >> struct vm_area_struct *vma; >> >> - int ret, major = 0; >> >> + int major = 0; >> >> + vm_fault_t ret; >> >> >> >> if (unlocked) >> >> fault_flags |= FAULT_FLAG_ALLOW_RETRY; >> > >> > ... >> > major |= ret & VM_FAULT_MAJOR; >> > >> > That should be throwing a warning. >> >> Sorry, but I verified again and didn't see similar warnings. >> >> steps followed - >> >> apply the patch >> make c=2 -j4 ( build for x86_64) >> looking for warnings in files because of this patch. >> >> The only error I am seeing "error: undefined identifier '__COUNTER__' " >> which is pointing to BUG(). There are few warnings but those are not >> related to this patch. >> >> In my test tree the final patch to create new vm_fault_t type is >> already applied. >> >> Do you want me to verify in some other way ? > > 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 ?
Re: [PATCH] mm: Change return type to vm_fault_t
On Tue, May 29, 2018 at 11:04 PM, Matthew Wilcox wrote: > On Tue, May 29, 2018 at 09:25:05PM +0530, Souptick Joarder wrote: >> On Tue, May 29, 2018 at 8:20 PM, Matthew Wilcox wrote: >> > On Tue, May 29, 2018 at 08:01:26PM +0530, Souptick Joarder wrote: >> >> Use new return type vm_fault_t for fault handler. For >> >> now, this is just documenting that the function returns >> >> a VM_FAULT value rather than an errno. Once all instances >> >> are converted, vm_fault_t will become a distinct type. >> > >> > I don't believe you've checked this with sparse. >> > >> >> @@ -802,7 +802,8 @@ int fixup_user_fault(struct task_struct *tsk, struct >> >> mm_struct *mm, >> >>bool *unlocked) >> >> { >> >> struct vm_area_struct *vma; >> >> - int ret, major = 0; >> >> + int major = 0; >> >> + vm_fault_t ret; >> >> >> >> if (unlocked) >> >> fault_flags |= FAULT_FLAG_ALLOW_RETRY; >> > >> > ... >> > major |= ret & VM_FAULT_MAJOR; >> > >> > That should be throwing a warning. >> >> Sorry, but I verified again and didn't see similar warnings. >> >> steps followed - >> >> apply the patch >> make c=2 -j4 ( build for x86_64) >> looking for warnings in files because of this patch. >> >> The only error I am seeing "error: undefined identifier '__COUNTER__' " >> which is pointing to BUG(). There are few warnings but those are not >> related to this patch. >> >> In my test tree the final patch to create new vm_fault_t type is >> already applied. >> >> Do you want me to verify in some other way ? > > 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 ?
Re: [PATCH] mm: Change return type to vm_fault_t
On Tue, May 29, 2018 at 09:25:05PM +0530, Souptick Joarder wrote: > On Tue, May 29, 2018 at 8:20 PM, Matthew Wilcox wrote: > > On Tue, May 29, 2018 at 08:01:26PM +0530, Souptick Joarder wrote: > >> Use new return type vm_fault_t for fault handler. For > >> now, this is just documenting that the function returns > >> a VM_FAULT value rather than an errno. Once all instances > >> are converted, vm_fault_t will become a distinct type. > > > > I don't believe you've checked this with sparse. > > > >> @@ -802,7 +802,8 @@ int fixup_user_fault(struct task_struct *tsk, struct > >> mm_struct *mm, > >>bool *unlocked) > >> { > >> struct vm_area_struct *vma; > >> - int ret, major = 0; > >> + int major = 0; > >> + vm_fault_t ret; > >> > >> if (unlocked) > >> fault_flags |= FAULT_FLAG_ALLOW_RETRY; > > > > ... > > major |= ret & VM_FAULT_MAJOR; > > > > That should be throwing a warning. > > Sorry, but I verified again and didn't see similar warnings. > > steps followed - > > apply the patch > make c=2 -j4 ( build for x86_64) > looking for warnings in files because of this patch. > > The only error I am seeing "error: undefined identifier '__COUNTER__' " > which is pointing to BUG(). There are few warnings but those are not > related to this patch. > > In my test tree the final patch to create new vm_fault_t type is > already applied. > > Do you want me to verify in some other way ? 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'?
Re: [PATCH] mm: Change return type to vm_fault_t
On Tue, May 29, 2018 at 09:25:05PM +0530, Souptick Joarder wrote: > On Tue, May 29, 2018 at 8:20 PM, Matthew Wilcox wrote: > > On Tue, May 29, 2018 at 08:01:26PM +0530, Souptick Joarder wrote: > >> Use new return type vm_fault_t for fault handler. For > >> now, this is just documenting that the function returns > >> a VM_FAULT value rather than an errno. Once all instances > >> are converted, vm_fault_t will become a distinct type. > > > > I don't believe you've checked this with sparse. > > > >> @@ -802,7 +802,8 @@ int fixup_user_fault(struct task_struct *tsk, struct > >> mm_struct *mm, > >>bool *unlocked) > >> { > >> struct vm_area_struct *vma; > >> - int ret, major = 0; > >> + int major = 0; > >> + vm_fault_t ret; > >> > >> if (unlocked) > >> fault_flags |= FAULT_FLAG_ALLOW_RETRY; > > > > ... > > major |= ret & VM_FAULT_MAJOR; > > > > That should be throwing a warning. > > Sorry, but I verified again and didn't see similar warnings. > > steps followed - > > apply the patch > make c=2 -j4 ( build for x86_64) > looking for warnings in files because of this patch. > > The only error I am seeing "error: undefined identifier '__COUNTER__' " > which is pointing to BUG(). There are few warnings but those are not > related to this patch. > > In my test tree the final patch to create new vm_fault_t type is > already applied. > > Do you want me to verify in some other way ? 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'?
Re: [PATCH] mm: Change return type to vm_fault_t
On Tue, May 29, 2018 at 8:20 PM, Matthew Wilcox wrote: > On Tue, May 29, 2018 at 08:01:26PM +0530, Souptick Joarder wrote: >> Use new return type vm_fault_t for fault handler. For >> now, this is just documenting that the function returns >> a VM_FAULT value rather than an errno. Once all instances >> are converted, vm_fault_t will become a distinct type. > > I don't believe you've checked this with sparse. > >> @@ -802,7 +802,8 @@ int fixup_user_fault(struct task_struct *tsk, struct >> mm_struct *mm, >>bool *unlocked) >> { >> struct vm_area_struct *vma; >> - int ret, major = 0; >> + int major = 0; >> + vm_fault_t ret; >> >> if (unlocked) >> fault_flags |= FAULT_FLAG_ALLOW_RETRY; > > ... > major |= ret & VM_FAULT_MAJOR; > > That should be throwing a warning. Sorry, but I verified again and didn't see similar warnings. steps followed - apply the patch make c=2 -j4 ( build for x86_64) looking for warnings in files because of this patch. The only error I am seeing "error: undefined identifier '__COUNTER__' " which is pointing to BUG(). There are few warnings but those are not related to this patch. In my test tree the final patch to create new vm_fault_t type is already applied. Do you want me to verify in some other way ?
Re: [PATCH] mm: Change return type to vm_fault_t
On Tue, May 29, 2018 at 8:20 PM, Matthew Wilcox wrote: > On Tue, May 29, 2018 at 08:01:26PM +0530, Souptick Joarder wrote: >> Use new return type vm_fault_t for fault handler. For >> now, this is just documenting that the function returns >> a VM_FAULT value rather than an errno. Once all instances >> are converted, vm_fault_t will become a distinct type. > > I don't believe you've checked this with sparse. > >> @@ -802,7 +802,8 @@ int fixup_user_fault(struct task_struct *tsk, struct >> mm_struct *mm, >>bool *unlocked) >> { >> struct vm_area_struct *vma; >> - int ret, major = 0; >> + int major = 0; >> + vm_fault_t ret; >> >> if (unlocked) >> fault_flags |= FAULT_FLAG_ALLOW_RETRY; > > ... > major |= ret & VM_FAULT_MAJOR; > > That should be throwing a warning. Sorry, but I verified again and didn't see similar warnings. steps followed - apply the patch make c=2 -j4 ( build for x86_64) looking for warnings in files because of this patch. The only error I am seeing "error: undefined identifier '__COUNTER__' " which is pointing to BUG(). There are few warnings but those are not related to this patch. In my test tree the final patch to create new vm_fault_t type is already applied. Do you want me to verify in some other way ?
Re: [PATCH] mm: Change return type to vm_fault_t
On Tue, May 29, 2018 at 08:01:26PM +0530, Souptick Joarder wrote: > Use new return type vm_fault_t for fault handler. For > now, this is just documenting that the function returns > a VM_FAULT value rather than an errno. Once all instances > are converted, vm_fault_t will become a distinct type. I don't believe you've checked this with sparse. > @@ -802,7 +802,8 @@ int fixup_user_fault(struct task_struct *tsk, struct > mm_struct *mm, >bool *unlocked) > { > struct vm_area_struct *vma; > - int ret, major = 0; > + int major = 0; > + vm_fault_t ret; > > if (unlocked) > fault_flags |= FAULT_FLAG_ALLOW_RETRY; ... major |= ret & VM_FAULT_MAJOR; That should be throwing a warning.
Re: [PATCH] mm: Change return type to vm_fault_t
On Tue, May 29, 2018 at 08:01:26PM +0530, Souptick Joarder wrote: > Use new return type vm_fault_t for fault handler. For > now, this is just documenting that the function returns > a VM_FAULT value rather than an errno. Once all instances > are converted, vm_fault_t will become a distinct type. I don't believe you've checked this with sparse. > @@ -802,7 +802,8 @@ int fixup_user_fault(struct task_struct *tsk, struct > mm_struct *mm, >bool *unlocked) > { > struct vm_area_struct *vma; > - int ret, major = 0; > + int major = 0; > + vm_fault_t ret; > > if (unlocked) > fault_flags |= FAULT_FLAG_ALLOW_RETRY; ... major |= ret & VM_FAULT_MAJOR; That should be throwing a warning.