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
> > >
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"
Acked-by: Luc Van Oostenryck
Thanks,
-- Luc
and 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
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
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;
__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 changed, 1
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 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 th
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,
On Tue, Oct 27, 2020 at 12:23:03PM +0100, Greg KH wrote:
>
> Are you sure these changes are correct? This isn't just a list of
> structures after this at the end of the structure?
>
> Please look at commit 5979afa2c4d1 ("staging: Replace zero-length array
> with flexible-array member") which
Hi,
Here is a comparison of Sparse's unique warnings between v5.9-rc1 &
v5.10-rc1 on x86-64 (defconfig + allyesconfig).
This time, there is a VERY significant decrease in the number of
warnings, almost 20% less. On ppc64, the difference is 31%. This big
difference is mainly but not only caused
e included, which is fairly annoying.
>
> Rename the variables to avoid shadowing and shut up the warning.
Looks good to me. Fell free to add my:
Reviewed-by: Luc Van Oostenryck
On Fri, Oct 09, 2020 at 03:00:43PM +0300, kernel test robot wrote:
> Hi Luc,
>
> First bad commit (maybe != root cause):
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> master
> head: c85fb28b6f999db9928b841f63f1beeb3074eeca
> commit:
ll combinations. Also I
> ran make C=1 to confirm no new sparse warnings came up. It all looks
> clean to me.
It looks correct to me too now at C & assembly level.
Feel free to add my:
Reviewed-by: Luc Van Oostenryck
-- Luc
On Sun, Sep 06, 2020 at 06:34:08AM +0900, Stafford Horne wrote:
> On Sat, Sep 05, 2020 at 03:57:14PM +0200, Luc Van Oostenryck wrote:
> > On Sat, Sep 05, 2020 at 10:19:35PM +0900, Stafford Horne wrote:
> >
> > Hi,
> >
> > The change for 64-bit get_user() looks go
On Sat, Sep 05, 2020 at 10:19:35PM +0900, Stafford Horne wrote:
Hi,
The change for 64-bit get_user() looks good to me.
But I wonder, given that openrisc is big-endian, what will happen
you have the opposite situation:
u32 *ptr;
u64 val;
...
get_user(val, ptr);
On Sat, Aug 29, 2020 at 10:29:55AM -0700, Linus Torvalds wrote:
> On Sat, Aug 29, 2020 at 5:46 AM Luc Van Oostenryck
> wrote:
> >
> > But the pointer is already 32-bit, so simply cast the pointer to u32.
>
> Yeah, that code was completely pointless. If the pointer ha
ger.kernel.org
Signed-off-by: Luc Van Oostenryck
---
drivers/dma/fsldma.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/fsldma.h b/drivers/dma/fsldma.h
index 56f18ae99233..6f6fa7641fa2 100644
--- a/drivers/dma/fsldma.h
+++ b/drivers/dma/fsldma.h
@@ -205,7 +2
On Fri, Aug 28, 2020 at 09:04:28PM +0200, Miguel Ojeda wrote:
> Hi Luc,
>
> On Fri, Aug 28, 2020 at 10:53 AM Luc Van Oostenryck
> wrote:
> >
> > Hi Miguel,
> >
> > Could you also take this patch in your queue?
> > It has already be sent twice bu
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(-)
Hi Miguel,
Could
On Thu, Aug 27, 2020 at 09:50:45AM +0200, Miguel Ojeda wrote:
> Hi Luc,
>
> On Tue, Aug 25, 2020 at 1:25 AM Luc Van Oostenryck
> wrote:
> >
> > GCC 4.6 is not supported anymore, so remove a reference to it,
> > leaving just the part about version prior GCC 5.
Sparse supports __has_attribute() since 2018-08-31, so the comment
is not true anymore but more importantly is rather confusing.
So remove it.
Signed-off-by: Luc Van Oostenryck
---
include/linux/compiler_attributes.h | 6 --
1 file changed, 6 deletions(-)
diff --git a/include/linux
GCC 4.6 is not supported anymore, so remove a reference to it,
leaving just the part about version prior GCC 5.
Signed-off-by: Luc Van Oostenryck
---
include/linux/compiler_attributes.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/compiler_attributes.h
b
On Sun, Aug 16, 2020 at 06:35:26PM -0700, Randy Dunlap wrote:
>
> on x86_64, allmodconfig:
>
> $ gcc --version
> gcc (SUSE Linux) 7.5.0
>
> $ sparse --version
> 0.6.2
>
>
> I seem to be having some problems with kernel/time/timekeeping.c,
> including a segfault.
>
> a. Is it sparse that
Hi,
Here is a comparison of Sparse's unique warnings between v5.8-rc1 &
v5.9-rc1 on x86-64 (defconfig + allyesconfig).
Note that the differences are be caused by changes in the kernel
and in Sparse.
The raw logs as well as the result of the processing giving the
'unique warnings' are available
On Wed, Aug 12, 2020 at 07:51:08PM +0100, Valentin Schneider wrote:
> On 12/08/20 17:35, kernel test robot wrote:
>
> > config: i386-randconfig-s001-20200811 (attached as .config)
> > reproduce:
> > # sparse version: v0.6.2-168-g9554805c-dirty
> > make W=1 C=1
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 +++-
ap() 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 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
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 a/inc
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
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
>
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
On Tue, Aug 04, 2020 at 01:23:54PM +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
On Tue, Aug 04, 2020 at 01:23:51PM +0900, Stafford Horne wrote:
> As suggested by Linus when reviewing commit 9cb2feb4d21d
> ("arch/openrisc: Fix issues with access_ok()") last year; making
> __range_ok an inline function also fixes the used twice issue that the
> commit was fixing. I agree it's
On Tue, Aug 04, 2020 at 01:23:50PM +0900, Stafford Horne wrote:
> The OpenRISC user access functions put_user(), get_user() and
> clear_user() were missing proper sparse annotations. This generated
> warnings like the below.
>
> This patch adds the annotations to fix the warnings.
>
> Example
An excerpt from POSIX contains three occurrences of '' but
the first two are spelled starting with an HTML entity: 'slash>'
Fix this by replacing the stray HTML entity by a '<'.
Signed-off-by: Luc Van Oostenryck
---
Documentation/filesystems/path-lookup.rst | 4 ++--
1 file chan
On Thu, Jul 23, 2020 at 08:08:43AM +0200, Christoph Hellwig wrote:
> The __user doesn't make sense when casting to an integer type, just
> switch to a uintptr_t cast which also removes the need for the __force.
Feel free to add my:
Reviewed-by: Luc Van Oostenryck
-- Luc
On Mon, Jul 20, 2020 at 02:47:15PM +0200, Christoph Hellwig wrote:
> The __user doesn't make sense when casting to an integer type.
>
> Signed-off-by: Christoph Hellwig
> ---
> net/bpfilter/bpfilter_kern.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git
On Wed, Jul 08, 2020 at 12:59:04PM +0300, Dan Carpenter wrote:
> On Wed, Jul 08, 2020 at 02:06:51AM +0200, Luc Van Oostenryck wrote:
> > I've finally written a silly script to easily compare my tests
> > of Sparse on the kernel. So, it's now easy to share those results.
> >
I've finally written a silly script to easily compare my tests
of Sparse on the kernel. So, it's now easy to share those results.
It's a comparison of Sparse's unique warnings between v5.7-rc1 &
v5.8-rc1 on x86-64 (defconfig + allyesconfig). The results are
quite similar on other architectures.
Deepest apologies, I've sent this to the wrong ML.
-- Luc
This flag facilitate the creation of testcases for preprocessing.
Signed-off-by: Luc Van Oostenryck
---
validation/test-suite | 4
1 file changed, 4 insertions(+)
diff --git a/validation/test-suite b/validation/test-suite
index d351ebf3c428..f7d992dc7c8c 100755
--- a/validation/test-suite
The helpers for parsing the options are often situated just above the
first function using them. As result, these helpers can be found a bit
everywhere in the code, it's messy and doesn't help to reuse these helpers.
So, move all these helpers to the top.
Signed-off-by: Luc Van Oostenryck
So, use 'flag' instead of 'warning' for variable and function names.
Signed-off-by: Luc Van Oostenryck
---
lib.c | 36 ++--
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/lib.c b/lib.c
index 9acdc60fc416..c27773097127 100644
--- a/lib.c
+++ b
-off-by: Luc Van Oostenryck
---
lib.c | 34 +-
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/lib.c b/lib.c
index 5f4e6b2d76c8..b3bacb180cac 100644
--- a/lib.c
+++ b/lib.c
@@ -570,7 +570,7 @@ OPT_NUMERIC(uint, unsigned int, strtoul)
static char
Now that option parsing have moved to a separate file, move
everything related to predefined macros to a separate file too.
Signed-off-by: Luc Van Oostenryck
---
Makefile| 1 +
lib.c | 221 ---
lib.h | 1 +
predefine.c | 225
lib.c contains 2-3 helpers fro parsing. Move these to parse.c.
Signed-off-by: Luc Van Oostenryck
---
lib.c | 38 --
parse.c | 38 ++
2 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/lib.c b/lib.c
index
Now lib.c contains almost nothing else than library entrypoints.
Move a small utility, hexval(), to utils.c to complete this cleanup.
Signed-off-by: Luc Van Oostenryck
---
lib.c | 17 -
lib.h | 2 --
utils.c | 17 +
utils.h | 4
4 files changed, 21
This is just to isolate the details about which switch need an
extra 'finalization' in a separate function in preparation
to moving all the parsing code in a separate file.
Signed-off-by: Luc Van Oostenryck
---
lib.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git
The declarations and definitions of the variables corresponding to
the options half-sorted half-unsorted.
Sort them a little more.
Signed-off-by: Luc Van Oostenryck
---
options.c | 98 +++---
options.h | 137
-Wsparse-error should not be enabled with -Wsparse-all, this is
special cased in the condition in loop handling -Wsparse-all.
However, the condition already handle warnings forced to off.
So instead of explicitly checking for _error, it's enough
to force Wsparse_error off.
Signed-off-by: Luc Van
lib.c contains to much things and is too hard to keep tidy.
So, move everything related to option parsing in it's own file.
Signed-off-by: Luc Van Oostenryck
---
Makefile | 1 +
lib.c | 982 +
lib.h | 117 +--
options.c | 998
This allows to reuse these enums in earlier helpers.
Signed-off-by: Luc Van Oostenryck
---
lib.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib.c b/lib.c
index 5128a5b64e9e..43d55a0648ee 100644
--- a/lib.c
+++ b/lib.c
@@ -250,6 +250,12 @@ void die(const
These function have probably been added in 'historical order' and
as result it's not easy to quickly see where they're defined.
Change this arranging them in asciibetical order.
Signed-off-by: Luc Van Oostenryck
---
lib.c | 656 +-
1 file
Since handle_onoff_switch() can be used for other flags than the
warnings, the processing of -Wsparse-all should move elsewhere.
So move it into handle_switch_W().
Signed-off-by: Luc Van Oostenryck
---
lib.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git
o "lib.h".
Signed-off-by: Luc Van Oostenryck
---
lib.h | 1 +
token.h | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib.h b/lib.h
index 4f67958efdb9..e938f18dfc92 100644
--- a/lib.h
+++ b/lib.h
@@ -48,6 +48,7 @@ extern int die_if_error;
extern int repeat_p
sorted
*) move options parsing in a separate file
*) move predefine-related stuff in a separate file
Luc Van Oostenryck (15):
options: let handle_onoff_switch() use null terminated arrays
options: move -Wsparse-all's processing out of handle_onoff_switch()
options: move on top
This makes things slightly easier to use.
Signed-off-by: Luc Van Oostenryck
---
lib.c | 20 +++-
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/lib.c b/lib.c
index e56788260cb7..709dd5176112 100644
--- a/lib.c
+++ b/lib.c
@@ -529,14 +529,14 @@ enum
For typechecking reasons, the typedef 'pci_channel_state_t'
should be used instead of the 'enum pci_channel_state'.
One simple way to enforce this is to remove the definition of
'enum pci_channel_state' and replace it by an anonymous 'enum'.
Signed-off-by: Luc Van Oostenryck
---
include/linux
are bitwise, not the enum itself (sparse doesn't have
the notion of 'bitwise enum'). This may change in some
not too far future, hence the patch.
Signed-off-by: Luc Van Oostenryck
---
Documentation/PCI/pci-error-recovery.rst| 4 ++--
arch/powerpc/kernel/eeh_driver.c
' in the documentation
Luc Van Oostenryck (3):
pci: use 'pci_channel_state_t' instead of 'enum pci_channel_state'
pci: use anonymous 'enum' instead of 'enum pci_channel_state'
pci: update to doc to use 'pci_channel_state_t'
Documentation/PCI/pci-error-recovery.rst| 8
arch/powerpc/kernel
equivalent
definition:
typedef enum { ... } pci_channel_state_t;
which makes abstraction of the '__bitwise' which would otherwise
just bring unneeded complications here.
Signed-off-by: Luc Van Oostenryck
---
Documentation/PCI/pci-error-recovery.rst | 4 ++--
1 file changed, 2 insertions
On Mon, Jun 29, 2020 at 04:29:28PM -0500, Bjorn Helgaas wrote:
> On Sun, Jun 28, 2020 at 06:12:33PM +0200, Luc Van Oostenryck wrote:
> > The method struct pci_error_handlers::error_detected() is defined and
> > documented as taking an 'enum pci_channel_state' for the second
> &
.
So, add a link to this in the kernel documentation.
Signed-off-by: Luc Van Oostenryck
---
Changes since v1:
* fix a typo (s/kernl/kernel/) thanks to Mike Rapoport.
Documentation/dev-tools/sparse.rst | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/dev-tools/sparse.rst
b
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type defining 'NETDEV_TX_OK' but this
driver returns '0' instead of 'NETDEV_TX_OK'.
Fix this by returning 'NETDEV_TX_OK' instead of '0'.
Signed-off-by: Luc Van Oostenryck
---
drivers/net
On Tue, Jun 30, 2020 at 02:08:36AM +0800, kernel test robot wrote:
> Hi Luc,
>
> I love your patch! Perhaps something to improve:
>
> [auto build test WARNING on next-20200626]
> [cannot apply to linux/master linus/master v5.8-rc2 v5.8-rc1 v5.7 v5.8-rc3]
> [If your patch is applied to the wrong
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/net/ethernet/arc/emac_main.c
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/net/caif/caif_serial.c | 2
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 and
returning NETDEV_TX_OK instead of 0 accordingly.
Signed-off-by: Luc Van
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 and
returning NETDEV_TX_OK instead of 0 accordingly.
Signed-off-by: Luc Van
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/net/ethernet/oki-semi/pch_gbe
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/net/caif/caif_virtio.c | 2
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/net/ethernet/aurora/nb8800.c
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/net/ethernet/netronome/nfp
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
---
net/l2tp/l2tp_eth.c | 2 +-
1 file
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/net/ethernet/chelsio/cxgb4vf
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/net/ethernet/synopsys/dwc
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/net/usb/ipheth.c | 2 +-
1
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/net/plip/plip.c | 4 ++--
1
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
---
net/hsr/hsr_device.c | 2 +-
1 file
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/net/ethernet/aquantia
The ndo_start_xmit() methods should return a 'netdev_tx_t', not
an int, and so should return NETDEV_TX_OK, not 0.
The patches in the series fix most of the remaning drivers and
subsystems (those included in allyesconfig on x86).
Luc Van Oostenryck (15):
cail,hsi: fix cfhsi_xmit()'s return type
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 and
usind 'NETDEV_TX_OK' instead of 0 accordingly.
Signed-off-by: Luc Van
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type defining 'NETDEV_TX_OK' but this
driver returns '0' instead of 'NETDEV_TX_OK'.
Fix this by returning ''NETDEV_TX_OK' instead of 0.
Signed-off-by: Luc Van Oostenryck
---
drivers/staging
the constants defined by the enum
are bitwise, not the enum itself (sparse doesn't have
the notion of 'bitwise enum'). This may change in some
not too far future, hence the patch.
Signed-off-by: Luc Van Oostenryck
---
Documentation/PCI/pci-error-recovery.rst| 2 +-
drivers/block/rsxx
.
So, add a link to this in the kernel documentation.
Signed-off-by: Luc Van Oostenryck
---
Documentation/dev-tools/sparse.rst | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/dev-tools/sparse.rst
b/Documentation/dev-tools/sparse.rst
index 6f4870528226..e20b8b8b78ed 100644
On Fri, Jun 26, 2020 at 11:23:49AM -0600, Jonathan Corbet wrote:
>
> I've applied this, but it also seems like we're losing some information by
> going from a wiki straight to a directory listing. It seems maybe we need
> a link to the new documentation site in here as well?
Yes. I hesitated to
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 a/inc
On Thu, Jun 25, 2020 at 09:16:03AM +0100, Marc Zyngier wrote:
>
> I really wish we could turn these warnings off. They don't add much.
> Or is there an annotation we could stick on the function (something
> like __called_from_asm_please_leave_me_alone springs to mind...)?
There is: '__visible'.
issing __iomem and make sparse & the bot happier.
Reported-by: kernel test robot
Signed-off-by: Luc Van Oostenryck
---
drivers/spi/spi-fsl-spi.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c
index 67
-by: Luc Van Oostenryck
---
scripts/Makefile.build | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 2e8810b7e5ed..7ba6a752d5bd 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -252,9 +252,9
raw_copy_to_user()'s prototype seems to be a copy & paste of
raw_copy_from_user() and as such has the __user annotation
in the 'from' argument instead of the 'to'.
So, move the __user annotation in the prototype to the 'to'.
Reported-by: kernel test robot
Signed-off-by: Luc Van Oosten
need a force cast that would solve nothing at all.
So, do the conversion using swab{16,32}, like done in asm-generic
for similar situations.
Reported-by: kernel test robot
Signed-off-by: Luc Van Oostenryck
---
arch/alpha/include/asm/io.h | 8
1 file changed, 4 insertions(+), 4 deletions
-tree.c:56:35:expected struct genradix_root *r
lib/generic-radix-tree.c:56:35:got struct genradix_root [noderef]
*__val
with 6 other ones.
So, correct root's type by removing this unneeded __rcu.
Signed-off-by: Luc Van Oostenryck
---
include/linux/generic-radix-tree.h | 2 +-
1 file
The URL given to get sparse's tarballs is sparse.wiki.kernel.org
but the wiki will is deprecated in favor of sparse.docs.kernel.org.
So, update this URL to the one where the tarballs can directly
be found.
Signed-off-by: Luc Van Oostenryck
---
Documentation/dev-tools/sparse.rst | 4 ++--
1
Update the info for sparse. More specifically:
* change W entry to point to sparse.docs.kernel.org
* add Q & B entry (patchwork & bugzilla)
Signed-off-by: Luc Van Oostenryck
---
MAINTAINERS | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINE
By popular demand, reorder the defines for sparse annotations
and group them by functionality.
Link:
lore.kernel.org/r/CAMuHMdWQsirja-h3wBcZezk+H2Q_HShhAks8Hc8ps5fTAp=o...@mail.gmail.com
Cc: Geert Uytterhoeven
Cc: Miguel Ojeda
Signed-off-by: Luc Van Oostenryck
---
include/linux
On Fri, Jun 19, 2020 at 11:26:59AM -0700, Linus Torvalds wrote:
> On Thu, Jun 18, 2020 at 3:26 PM Luc Van Oostenryck
> wrote:
> >
> > Note: a recent version of sparse will be needed (minimum v0.6.2-rc2
> >or later than 2020-05-28).
>
> Ok, it sounds like
1 - 100 of 588 matches
Mail list logo