endianness.
Fix this by letting sparse know about the architecture endianness.
To: triv...@kernel.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: Luc Van Oostenryck
---
arch/m32r/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/m32r/Makefile b/arch/m32r/Makefile
index
ch pain
> > that I'm nervous to change it without some greater level of review. :)
>
> Honestly, I'd like to just encourage people to get the sparse update
> from Luc Van Oostenryck instead.
>
> For a while there it looked like Chris Li would just pull from Luc,
>
. )
../drivers/of/of_reserved_mem.c:200:50:got void const *const data
right?
And we're talking about a function (pointer) type.
Functions return a rvalue thus qualifiers are irrelevant for them,
so having 'int const (*initfn)(...)' instead of 'int (*initfn)()' should
solve nothing.
Same for the others patch in this series.
-- Luc Van Oostenryck
On Thu, May 11, 2017 at 8:07 AM, Al Viro wrote:
> FVO"needed" equal to "needed to make sparse STFU"? If anything, that's
> sparse being wrong - evaluate.c:check_assignment_type() should do
> if (t == &ctype_bool) {
> if (is_fouled_type(s))
>
g I'm using it gave this:
>1104 sizeof struct page = 56
Yes, I get this already with defconfig.
It's a problem with sparse which ignore the alignment attribute
(in fact all 'trailing' attributes in type declarations).
I'm looking to fix it.
-- Luc Van Oostenryck
On Sat, Apr 07, 2018 at 11:58:05AM -1000, Joey Pabalinas wrote:
> Recent changes to the min()/max() macros in include/linux/kernel.h
> have added a lot of noise when compiling the kernel with Sparse checking
> enabled. This mostly is due to the *huge* increase in the number of
> sizeof(void) warnin
e new flag and add a validation case
> for sizeof(void).
>
> CC: Kees Cook
> CC: Linus Torvalds
> CC: Martin Uecker
> CC: Al Viro
> CC: Christopher Li
> CC: Joey Pabalinas
> CC: Luc Van Oostenryck
> Signed-off-by: Joey Pabalinas
> Signed-off-by: Luc Van Oostenryck
Thanks,
Acked-by: Luc Van Oostenryck
and code analysis tools alike.
>
> Signed-off-by: Logan Gunthorpe
> Cc: Philippe Ombredanne
> Cc: Thomas Gleixner
> Cc: Kate Stewart
> Cc: Greg Kroah-Hartman
> Cc: Luc Van Oostenryck
> ---
> lib/iomap.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
On Thu, Mar 22, 2018 at 11:16:55AM -0600, Logan Gunthorpe wrote:
> Sparse produces a few warnings of the form:
>
> lib/iomap.c:84:9: warning: cast to restricted __be16
>
> (The kbuild robot has recently started running such checks)
Reviewed-by: Luc Van Oostenryck
On Mon, Apr 09, 2018 at 02:54:30PM +0200, Geert Uytterhoeven wrote:
> >
> > - swim_base = ioremap(res->start, resource_size(res));
> > + swim_base = (struct swim __iomem *)res->start;
>
> I guess you need a __force to please sparse?
Hi,
Only pointer-to-pointer conversions may need __
On Mon, Apr 09, 2018 at 03:02:04PM -1000, Joey Pabalinas wrote:
> Recent changes to the min()/max() macros in include/linux/kernel.h
> have added a lot of noise when compiling the kernel with Sparse checking
> enabled. This mostly is due to the *huge* increase in the number of
> sizeof(void) warnin
de from branches that are never taken (which, surprise,
need itself to have constant expressions already expanded).
It's often annoying like the case here.
OTOH, I don't think it's always a bad thing. Sometimes we want to
have warnings even from code we know will not be executed (in this
config but maybe it will in another one).
Several solution would be possible:
1) removing all those early warnings (but then we'll loose more legitimate ones)
2) add an option to not issues those early warnings (ame as above).
3) move those warnings (and thus the expansion of the concerned constants)
after trivial dead code elimination
4) add a very early pass to eliminate never taken branches
5) something else ?
1) & 2) are easy but not really acceptable.
3) can be good for some cases but not here, I think.
4) seems to way to go
-- Luc Van Oostenryck
On Tue, Mar 13, 2018 at 07:08:06PM +0100, Peter Zijlstra wrote:
> On Tue, Mar 13, 2018 at 07:00:17PM +0100, Luc Van Oostenryck wrote:
> > The issue here is that sparse has a whole class of warnings that are
> > given very early (here at expansion of constant expressions), before
I'm taking over the maintainance of Sparse so add myself as
maintainer and move Christopher's info to CREDITS.
Signed-off-by: Luc Van Oostenryck
---
CREDITS | 4
MAINTAINERS | 3 +--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/CREDITS b/CREDITS
index
arse for now.
I would prefer that developers upgrade their version of sparse but ...
Reviewed-by: Luc Van Oostenryck
On Fri, Nov 16, 2018 at 03:27:25PM +0900, Masahiro Yamada wrote:
> The introduction of these dummy BUILD_BUG_ON stubs dates back to
> commit 903c0c7cdc21 ("sparse: define dummy BUILD_BUG_ON definition
> for sparse"). At that time, BUILD_BUG_ON() was implemented with the
> negative array trick, whic
On Fri, Nov 09, 2018 at 10:35:32AM +0100, Johannes Berg wrote:
> From: Johannes Berg
>
> Sparse doesn't support all the overflow builtins, so just hide
> them from it to avoid lots of warnings/errors reported by it.
The development version of sparse support these builtins
since their introductio
On Fri, Nov 09, 2018 at 10:35:33AM +0100, Johannes Berg wrote:
> From: Johannes Berg
>
> __is_constexpr() is a work of art, understandable only to the most
> respected wizards of C. Even sparse doesn't seem to belong to that
> group and warns that there's an "expression using sizeof(void)".
>
>
On Mon, Nov 19, 2018 at 07:31:41PM +0900, Masahiro Yamada wrote:
> When I tried to delete BUILD_BUG_ON stubs for sparse, the kbuild test
> robot reported lots of Sparse warnings from container_of(), which
> seem false positive.
>
> The following checker in container_of() seems to be causing someth
complain about the following code, which GCC is fine with:
>
> static const int x = 0;
> int y = BUILD_BUG_ON_ZERO(x);
>
> Signed-off-by: Masahiro Yamada
> Acked-by: Kees Cook
Reviewed-by: Luc Van Oostenryck
On Sun, Dec 09, 2018 at 02:25:23PM -0700, Tycho Andersen wrote:
> Hi Al,
>
> On Sun, Dec 09, 2018 at 09:02:21PM +, Al Viro wrote:
> > On Sun, Dec 09, 2018 at 01:44:49PM -0700, Tycho Andersen wrote:
> > > While working on some additional copy_to_user() checks for sparse, I
> > > noticed that sp
On Sun, Dec 09, 2018 at 09:56:51PM +, Al Viro wrote:
> On Sun, Dec 09, 2018 at 10:39:52PM +0100, Luc Van Oostenryck wrote:
>
> > There are several more or less bad/good solutions, like:
> > * add raw_copy_{to,from}_user() in the list of checked function
> > (n
On Sun, Dec 09, 2018 at 08:40:29PM +0100, Greg KH wrote:
> On Sun, Dec 09, 2018 at 09:27:01AM -0800, Joe Perches wrote:
> > On Sun, 2018-12-09 at 17:20 +0100, Greg KH wrote:
> > > On Sun, Dec 09, 2018 at 04:59:00PM +0100, Thomas Jespersen wrote:
> > > > This fixes warning reported by sparse (with -
er_lock);
This one is questionnable because:
1) if !node->proc, then '&node->proc->inner_lock' is not acquired
since it doesn't even exist.
2) OTOH, the function can't have the annotation 100% right because
it semantics allows unbalanced locking depending on node->proc
being null or not.
But I see very well the intent and maybe it's a right solution.
I dunno.
Same for most of the following ones.
Best regards,
-- Luc Van Oostenryck
d missed struct attributes") the checks are, in fact, not disabled
anymore because of the more early include of "linux/compiler_types.h"
So remove the now uneffective #undefery that was done to disable
these warnings, as well as the associated comment.
Signed-off-by: Luc Van Oos
g, telling it
that size_t is unsigned long.
Signed-off-by: Luc Van Oostenryck
---
arch/h8300/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile
index e1c02ca23..eaac6685f 100644
--- a/arch/h8300/Makefile
+++ b/arch/h8300/Makefile
@@ -
On Thu, May 31, 2018 at 05:09:21AM -0700, Palmer Dabbelt wrote:
> On Mon, 28 May 2018 23:14:20 PDT (-0700), yamada.masah...@socionext.com wrote:
> > 2018-05-29 15:11 GMT+09:00 Christoph Hellwig :
> > > On Mon, May 28, 2018 at 06:35:05PM +0200, Luc Van Oostenryck wrote:
> >
v too.
Signed-off-by: Luc Van Oostenryck
---
arch/riscv/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 76e958a54..6d4a5f6c3 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -71,6 +71,9 @@ KBUILD_CFLAGS_MODULE += $(call cc-o
The RISC-V implementation seems to be quite clean regarding
sparse annotations. There is anyway three small glitches
which are corrected by this series.
Note: the 3rd patch may need another solution.
Luc Van Oostenryck (3):
riscv: use NULL instead of a plain 0
riscv: no __user for
In is_valid_bugaddr(), probe_kernel_address() is called with
the PC casted to (bug_inst_t __user *) but this function
only take a plain void* as argument, not a __user pointer.
Fix this by removing the unnneded __user in the cast.
Signed-off-by: Luc Van Oostenryck
---
arch/riscv/kernel/traps.c
sbi_remote_sfence_vma() & sbi_remote_fence_i() takes
a pointer as first argument but some macros call them with
a plain 0 which, while legal C, is frowned upon in the kernel.
Change this by replacing the 0 by NULL.
Signed-off-by: Luc Van Oostenryck
---
arch/riscv/include/asm/cacheflush.h
ome kind of cast would
be needed anyway.
Note: another solution, maybe cleaner but slightly more complex,
would be to declare two version of __copy_user,
either in the asm file or via an alias, each having already
the correct typing for raw_copy_{to,from}_user().
Signed-off-by: Luc
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: undefi
On Tue, Jun 12, 2018 at 7:12 PM, Palmer Dabbelt wrote:
> On Mon, 11 Jun 2018 20:00:08 PDT (-0700), luc.vanoostenr...@gmail.com wrote:
>> On Mon, Jun 11, 2018 at 12:01:37PM -0700, Palmer Dabbelt wrote:
>>>
>>> OK, I'll try and figure out what's going on. We've had a handful of
>>> headaches trying
On Thu, Dec 06, 2018 at 01:24:23PM +0100, Andrey Konovalov wrote:
> diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h
> index 3e7dafb3ea80..39f668d5066b 100644
> --- a/include/linux/compiler-clang.h
> +++ b/include/linux/compiler-clang.h
> @@ -16,9 +16,13 @@
> /* all cla
On Mon, Jan 07, 2019 at 03:54:37PM +0300, Dan Carpenter wrote:
> I'm sort of surprised that the zero day bot didn't complain about this.
> It probably should.
>
> The endianness checking is not turned on by default in Sparse. You have
> to do "make C=1 CF=-D__CHECK_ENDIAN__" to turn it on.
Bitwi
and I saw it would add a lot of noise because of
(valid) warnings coming from macros using a statement expression
redeclaring variables like '__u', 'tmp', ...
BTW, as far as I can see, sparse never had it enabled by default.
Kind regards,
-- Luc Van Oostenryck
On Fri, Oct 26, 2018 at 05:17:00AM +0200, Jason A. Donenfeld wrote:
> The type checker wasn't identifying upper bounds for huge unsigned
> 64-bit numbers, because the right shift turned into a no-op:
>
> zx2c4@thinkpad /tmp $ cat sparse.c
> enum { sparse_does_not_like_this = 0x8003ULL
On Sun, Feb 14, 2021 at 11:00:48AM -0800, Linus Torvalds wrote:
> On Sun, Feb 14, 2021 at 10:42 AM Ramsay Jones
> wrote:
> >
> > >
> > > I looked around but didn't find any hints how to fix this. Any pointers
> > > I missed (added the sparse list to cc:)?
> >
> > This is a limitation of sparse; wh
On Wed, Apr 22, 2015 at 03:50:45PM +0200, Arnd Bergmann wrote:
> On Wednesday 22 April 2015 13:07:44 Arnd Bergmann wrote:
...
> select, old_selct, pselect6: deprecated
Small, copy&paste error here for pselect6.
Luc
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the
(u32)~0UL, data->base + TIM_ARR);
> max_delta = readl_relaxed(data->base + TIM_ARR);
> if (max_delta == ~0UL) {
> prescaler = 1;
Since the warning come from using a unsigned long constant while
writel() expect an unsigned int, why not simply use ~0U ?
L
ot; (Mmmm, ok but ...)
Nowhere is there something close to what is found in the revision 5.0 or later:
"If an implementation does not use one of these non-zero values to define a
different synchronization behavior, then that non-zero value of stype must
act the same as stype zero completion
On Wed, Feb 28, 2018 at 10:30:58AM +0900, Masahiro Yamada wrote:
> 2018-02-28 7:36 GMT+09:00 Luc Van Oostenryck :
> >
> > To compensate this, I sent a patch to use '-Wno-unknown-attribute' for
> > kernel
> > builds. Masahiro Yamada has already taken it to th
On Wed, Apr 25, 2018 at 06:44:38PM +0200, Janusz Lisiecki wrote:
> Maybe inside ks_wlan_start_xmit, instead of "return 0;", there should be
> "return NETDEV_TX_OK;" and "return NETDEV_TX_BUSY;" otherwise. It is just
> suggestion.
I see, yes. However, since:
1) this sort of change is really outside
On Wed, Apr 25, 2018 at 07:35:00PM +0200, Sven Eckelmann wrote:
> On Dienstag, 24. April 2018 15:18:46 CEST Luc Van Oostenryck wrote:
> > The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
> > which is a typedef for an enum type, but the implementation i
On Tue, Apr 24, 2018 at 10:42:50AM -0400, David Miller wrote:
>
> Luc please don't submit such a huge number of patches all at one time.
>
> ...
>
> Finally, make this a true patch series. It is so much easier for
> maintainers to work with a set of changes all doing the same thing if
> you mak
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, but the implementation in this
driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck
---
dr
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, but the implementation in this
driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck
---
dr
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, but the implementation in this
driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck
---
drivers
ndo_start_xmit() is defined as returing an 'netdev_tx_t'.
However, several can drivers use 'int' as the return type
of their start_xmit() method.
This series contains the fix for all three of them.
Luc Van Oostenryck (3):
can: janz-ican3: fix ican3_xmit()'s retu
Currently, $(CHECK) receives NOSTDINC_FLAGS twice:
* first directly in the main Makefile via CHECKFLAGS,
* then indirectly in scripts/Makefile.build via c_flags.
Since once is enough, leave the occurence via c_flags and
remove the one via CHECKFLAGS.
Signed-off-by: Luc Van Oostenryck
by adding '-D__NDS32_E[BL]__' to CHECKFLAGS.
Signed-off-by: Luc Van Oostenryck
---
arch/nds32/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/nds32/Makefile b/arch/nds32/Makefile
index 513bb2e9b..031c67682 100644
--- a/arch/nds32/Makefile
+++ b/arch/nds32/Makefile
@@ -3
signed long' or
is 64bit while sparse was compiled on a 32bit machine, or worse,
to not emit legitimate warnings.
Fix this by passing the appropriate -m32/-m64 flag to sparse.
Signed-off-by: Luc Van Oostenryck
---
arch/riscv/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/a
ix this by passing to sparse the appropriate -m32/-m64 flag
Signed-off-by: Luc Van Oostenryck
---
arch/sh/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 65300193b..3a195c9d5 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -206,6 +206
ernel was configured by adding -m{big,little}-endian
to CHECKFLAGS in the main Makefile (and so for all archs).
Also, remove the equivalent done in arch specific Makefiles.
Signed-off-by: Luc Van Oostenryck
---
Makefile | 3 +++
arch/openrisc/Makefile | 1 -
arch/parisc/Makefile
On Mon, May 28, 2018 at 10:31:58AM -0700, Randy Dunlap wrote:
> On 05/28/2018 10:00 AM, Luc Van Oostenryck wrote:
> > +# insure the checker run with the right endianness
> > +CHECKFLAGS += $(if $(CONFIG_CPU_BIG_ENDIAN),-mbig,-mlittle)
>
> Does this need to be
ernel was configured by adding -m{big,little}-endian
to CHECKFLAGS in the main Makefile (and so for all archs).
Also, remove the equivalent done in arch specific Makefiles.
Signed-off-by: Luc Van Oostenryck
---
Makefile | 3 +++
arch/openrisc/Makefile | 1 -
arch/parisc/Makefile
On Mon, Jun 04, 2018 at 11:46:50AM -0700, Atish Patra wrote:
> On 6/1/18 8:22 AM, Luc Van Oostenryck wrote:
> > __copy_user() is a function, written in assembly, used to copy
> > memory between kernel & user space. As such its to & from args
> > may both take a use
On Tue, Feb 05, 2019 at 10:53:31AM +0100, Rasmus Villemoes wrote:
> On 05/02/2019 00.12, Andrew Morton wrote:
> >>
> >> It would be (very) nice to actually use this macro in a few places so
> >> it gets its build testing while in -next.
> >
> > ie, just about every BUILD_BUG_ON in mm/ could use th
7;m not sure if it's
> possible apply a __tagged/__untagged kind of attribute to non-pointer
> types, is it?
>
> [1] https://patchwork.kernel.org/patch/10581535/
It's something that should need to be added to sparse since it's
different from what sparse already have (the existing __bitwise and
concept of address-space doesn't seem to do the job here).
-- Luc Van Oostenryck
On Thu, Feb 25, 2021 at 05:45:09PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann
>
> Fixes: 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually
> exclusive")
> Signed-off-by: Arnd Bergmann
> ---
> include/linux/compiler-clang.h | 10 ++
> 1 file changed, 10 inserti
remove the corresponding test of __CHECKER__.
Signed-off-by: Luc Van Oostenryck
---
include/linux/compiler-gcc.h | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 74c6c0486eed..d1016cc6798a 100644
--- a/inc
Acked-by: Luc Van Oostenryck
Thanks,
-- Luc
On Thu, Aug 06, 2020 at 06:07:25AM +0900, Stafford Horne wrote:
> Now that __user annotations are fixed for openrisc uaccess api's we can
> add checking to the access_ok macro. This patch adds the __chk_user_ptr
> check, on normal builds the added check is a nop.
>
> Signed-off-by: Stafford Horne
On Thu, Aug 06, 2020 at 06:07:24AM +0900, Stafford Horne wrote:
> ---
> arch/openrisc/kernel/signal.c | 14 +++---
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/arch/openrisc/kernel/signal.c b/arch/openrisc/kernel/signal.c
> index 4f0754874d78..7ce0728412f6 100644
> -
es for OpenRISC sparse warnings. The kbuild robots report
> many issues related to issues with OpenRISC headers having missing or
> incorrect
> sparse annotations.
The changes look quite good to me (I just add 2 nits for patches 5 & 6).
Fell free to add my
Reviewed-by: Luc Van Oostenryck
ions
and so influence the result of sparse's analysis of context/locking.
Fix this by changing these calls into static inline calls with
an empty body.
Signed-off-by: Luc Van Oostenryck
---
include/linux/compiler_types.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
On Fri, Aug 07, 2020 at 06:37:36PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> master
> head: 86cfccb66937dd6cbf26ed619958b9e587e6a115
> commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to
> define addres
are_and_swap() to implement
cmpxchg(). This builtin has a return type which depends on its arguments
while sparse was always using 'int' as the return type.
A patch is on the way.
Regards,
-- Luc Van Oostenryck
On Sun, Aug 09, 2020 at 07:48:22AM +0900, Stafford Horne wrote:
> On Thu, Aug 06, 2020 at 09:04:49PM +0200, Luc Van Oostenryck wrote:
> > On Thu, Aug 06, 2020 at 06:07:24AM +0900, Stafford Horne wrote:
> > > ---
> > > arch/openrisc/kernel/signal.c | 14 +++-
On Sat, Apr 17, 2021 at 09:31:32PM +, David Laight wrote:
> > > Upon running sparse, "warning: dubious: !x | !y" is brought to notice
> > > for this file. Logical and bitwise OR are basically the same in this
> > > context so it doesn't cause a runtime bug. But let's change it to
> > > logica
On Sat, Dec 05, 2020 at 03:10:15PM -0800, Linus Torvalds wrote:
> On Sat, Dec 5, 2020 at 2:34 PM Jakub Kicinski wrote:
> >
> > Am I the only one who thinks this would be a good idea?
>
> err = third_step(obj, 0);
>
>err_undo_2s:
> second_undo(obj);
>err_undo_1s:
>
On Sun, Feb 28, 2021 at 10:34:46PM +0300, Alexey Dobriyan wrote:
>
> gcc does
>
> open "/" + "whatever between quotes"
> fstat
>
> so that "1.h" and "./1.h" differ
When I try the following with GCC 10.2:
$ cat header.h
#pragma once
#include "./header.h"
ssing __user annotation (this remove ~700 warnings when
using defconfig).
Link: https://lore.kernel.org/r/202101141753.ropiz9nh-...@intel.com
Reported-by: kernel test robot
Reported-by: Oliver Hartkopp
Signed-off-by: Luc Van Oostenryck
---
arch/sh/include/asm/uaccess.h | 2 +-
1 file chang
On Fri, Nov 20, 2020 at 01:51:54PM +0100, Peter Zijlstra wrote:
>
> Other option would be to change the const_ilog2 macro, though as the
> description says it is meant to be used also in C constant expressions,
> and while GCC will fold it to constant with constant argument even in
> those, perhap
On Sat, Nov 21, 2020 at 09:29:54PM +0100, Jakub Jelinek wrote:
> On Sat, Nov 21, 2020 at 09:23:10PM +0100, Luc Van Oostenryck wrote:
> > On Fri, Nov 20, 2020 at 01:51:54PM +0100, Peter Zijlstra wrote:
> > >
> > > Other option would be to change the const
n.
This is the expected behaviour. The constant 0 is magic regarding
bitwise types but ({ ...; 0; }) is not, it is just an ordinary expression
of type 'int'.
So, IMHO, Souptick's patch is the right thing to do.
Best regards,
-- Luc Van Oostenryck
On Fri, Sep 20, 2019 at 02:34:46AM -0500, Steve French wrote:
> Any hints to get rid of the noisy warnings in sched.h that make it
> hard to spot real warnings:
>
> /include/linux/sched.h:609:43: error: bad integer constant expression
> /include/linux/sched.h:609:73: error: invalid named zero-widt
ame result.
If you're using an older version of sparse, please upgrade.
Otherwise, please send me your config so that I can take a look at it.
Best regards,
-- Luc Van Oostenryck
On Tue, Oct 01, 2019 at 06:14:23PM -0500, Steve French wrote:
> It may be related to the following sparse make warning:
>
> No rule to make target
> '/usr/include/x86_64-linux-gnu/bits/huge_val.h', needed by
> 'sparse-llvm.o'
>
> I don't see huge_val.h in the Ubuntu 19 version of libc6-dev
Yes,
On Tue, Oct 01, 2019 at 08:24:45PM -0500, Steve French wrote:
> On Tue, Oct 1, 2019 at 7:19 PM Luc Van Oostenryck
> wrote:
> >
> > On Tue, Oct 01, 2019 at 06:14:23PM -0500, Steve French wrote:
> > > It may be related to the following sparse make warning:
> &g
her pointless, I wonder if there is a way
> to just shut up sparse on them. Same for most of head.h.
The pseudo-specifier '__visible' (for __attribute__((__externally_visible__)))
is defined for this.
Best regards,
-- Luc Van Oostenryck
On Fri, Oct 11, 2019 at 05:18:58PM +0100, Ben Dooks wrote:
> I was reviewing the sparse output for the current kernel release and
> note there are a number of warnings about un-declared functions which
> are only used for code in assembly.
>
> I was wondering if we should just ignore those, and ha
ck :
#error "blablablablablablablablablablablabla" \
"and blablabla again"
Or if need I cn fix Sparse if needed and desiable.
Best regards
-- Luc Van Oostenryck
el=medlow
> + CHECKFLAGS += -D__riscv_cmodel_medlow
> endif
> ifeq ($(CONFIG_CMODEL_MEDANY),y)
> KBUILD_CFLAGS += -mcmodel=medany
> + CHECKFLAGS += -D__riscv_cmodel_medany
I can teach sparse about this in the following days.
-- Luc Van Oostenryck
On Thu, Oct 17, 2019 at 05:49:26PM -0700, Paul Walmsley wrote:
> sparse identifies these missing prototypes when building arch/riscv:
>
> arch/riscv/kernel/cpu.c:149:29: warning: symbol 'cpuinfo_op' was not
> declared. Should it be static?
> arch/riscv/kernel/irq.c:27:29: warning: symbol 'do_IRQ'
On Thu, Oct 17, 2019 at 09:39:29PM -0700, Paul Walmsley wrote:
> On Fri, 18 Oct 2019, Luc Van Oostenryck wrote:
> > On Thu, Oct 17, 2019 at 05:49:25PM -0700, Paul Walmsley wrote:
> > > ifeq ($(CONFIG_CMODEL_MEDANY),y)
> > > KBUILD_CFLAGS += -mcmode
On Thu, Oct 17, 2019 at 09:38:18PM -0700, Paul Walmsley wrote:
> On Fri, 18 Oct 2019, Luc Van Oostenryck wrote:
>
> > On Thu, Oct 17, 2019 at 05:49:24PM -0700, Paul Walmsley wrote:
> > > sparse complains loudly when string literals associated with
> > > preproce
On Thu, Oct 17, 2019 at 09:38:18PM -0700, Paul Walmsley wrote:
> On Fri, 18 Oct 2019, Luc Van Oostenryck wrote:
>
> > On Thu, Oct 17, 2019 at 05:49:24PM -0700, Paul Walmsley wrote:
> > > sparse complains loudly when string literals associated with
> > > preproce
On Fri, Oct 18, 2019 at 08:31:48AM -0700, Linus Torvalds wrote:
> On Fri, Oct 18, 2019 at 4:15 AM Ben Dooks wrote:
> >
> > is this a valid warning? if not, should sparse be ignoring these.
>
> It's technically valid, but maybe it's not useful.
>
> If we make sure that any pure bits from a declar
verify
got struct sched_domain **
CC: Akash Goel
CC: Jens Axboe
CC: Andrew Morton
CC: Thomas Gleixner
CC: linux-kernel@vger.kernel.org
Fixes: 017c59c04 ("relay: Use per CPU constructs for the relay channel buffer
pointers")
Signed-off-by: Luc Van Oostenryck
---
include/linux/
eref] *__vpp_verify
got struct sched_domain **
CC: Ingo Molnar
CC: Peter Zijlstra
CC: linux-kernel@vger.kernel.org
Signed-off-by: Luc Van Oostenryck
---
include/linux/sched/topology.h | 8
kernel/sched/topology.c| 2 +-
2 files changed, 5 insertions(+), 5 deleti
igned-off-by: Luc Van Oostenryck
---
drivers/thermal/intel/intel_powerclamp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/intel/intel_powerclamp.c
b/drivers/thermal/intel/intel_powerclamp.c
index 7571f7c2e..c7cba20bd 100644
--- a/drivers/thermal/
from the argument's declaration.
Signed-off-by: Luc Van Oostenryck
---
net/netfilter/nft_counter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/nft_counter.c b/net/netfilter/nft_counter.c
index a61d7edfc..1a6b06ce6 100644
--- a/net/netfilter/nft_coun
put_user_ex(restorer, &frame->pretcode);
> + put_user_ex((unsigned long __force)restorer, &frame->pretcode);
Same here.
Best regards,
-- Luc Van Oostenryck
ocessing
directives, the behavior is undefined.
[C90 6.8.3, C99 & C11 6.10.3p11]
GCC can handle it (and sparse too) but yes sparse complains about it.
-- Luc Van Oostenryck
else
> *p32 = 0;
>
> -#if IS_ENABLED(CONFIG_IPV6)
> - if (n->tbl->family == AF_INET6) {
> - pin6 = (struct in6_addr *)__entry->primary_key6;
Same here.
-- Luc Van Oostenryck
On Sat, Mar 30, 2019 at 04:37:48PM +0530, Hariprasad Kelam wrote:
> On Sat, Mar 30, 2019 at 12:22:17AM +0100, Luc Van Oostenryck wrote:
> > On Tue, Mar 26, 2019 at 01:23:03AM +0530, Hariprasad Kelam wrote:
> > > This patch fixes below spare errors.
> > >
> >
mily == AF_INET6) {
> to if (IS_ENABLED(CONFIG_IPV6) && n->tbl->family == AF_INET6)
>
> Signed-off-by: Hariprasad Kelam
Thanks,
Reviewed-by: Luc Van Oostenryck
-- Luc
On Wed, Mar 20, 2019 at 08:34:22PM -0400, Joel Fernandes (Google) wrote:
> This is just a resend with scheduler patches split from the driver fixes and
> Paul's Reviewed-by(s) added.
>
> These patches fix various sparse errors ccaused as a result of the recent
> check
> to add rcu_check_sparse()
1 - 100 of 372 matches
Mail list logo