The driver uses a couple of buffers that seem to
be __be32 or __be64 fields, but declares them as
u32. This means there are a number of warnings
from sparse due to casting to/from __beXXX.
Fix these by changing the types of the buffer
and the associated variables.
The pstore_choose_compression function is not exported
so make it static to avoid the following sparse warning:
fs/pstore/platform.c:796:13: warning: symbol 'pstore_choose_compression' was
not declared. Should it be static?
Signed-off-by: Ben Dooks
---
Cc: Kees Cook
Cc: Anton Vorontsov
Cc:
From: Ben Dooks
The current_stateid is exported from nfs4state.c but not
declared in any of the headers. Add to nfs4_fs.h to
remove the following warning:
fs/nfs/nfs4state.c:80:20: warning: symbol 'current_stateid' was not declared.
Should it be static?
Signed-off-by: Ben Dooks
---
Cc: Trond
The its_cmd_block struct can either have u64 or __le64
data in it, so make a anonymous union to remove the
sparse warnings when converting to/from these.
Signed-off-by: Ben Dooks
---
Cc: Thomas Gleixner
Cc: Jason Cooper
Cc: Marc Zyngier
Cc: linux-arm-ker...@lists.infradead.org
Cc:
Include cs_internal.h (and pcmcia/cistpl.h as required by
cs_internal.h) for the declearions of cb_alloc and cb_free
to silence the following sparse warnings;
drivers/pcmcia/cardbus.c:64:11: warning: symbol 'cb_alloc' was not declared.
Should it be static?
drivers/pcmcia/cardbus.c:103:6:
Include for pcmcia_parse_tuple declaration
to fix the following sparse warning:
drivers/pcmcia/cistpl.c:1287:5: warning: symbol 'pcmcia_parse_tuple' was not
declared. Should it be static?
Signed-off-by: Ben Dooks
---
Cc: Dominik Brodowski
Cc: Greg Kroah-Hartman
Cc:
Include for the missing declarations
of functions exported from this file. Fixes the following
sparse warnings:
drivers/rapidio/rio-driver.c:53:16: warning: symbol 'rio_dev_get' was not
declared. Should it be static?
drivers/rapidio/rio-driver.c:70:6: warning: symbol 'rio_dev_put' was not
Include for the missing declarations
of functions exported from this file. Fixes the following
sparse warnings:
drivers/rapidio/rio-access.c:59:1: warning: symbol '__rio_local_read_config_8'
was not declared. Should it be static?
drivers/rapidio/rio-access.c:60:1: warning: symbol
The rproc_mem_entry_init() call takes a pointer to a vm
as the second argument. The code is currently using a
plain 0 as "NULL". Change to using NULL to fix the
following sparse warnings:
drivers/remoteproc/remoteproc_core.c:339:49: warning: Using plain integer as
NULL pointer
or if not, where should the declarations go?
Signed-off-by: Ben Dooks (Codethink)
---
Cc: Richard Cochran
Cc: net...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/ptp/ptp_pch.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/ptp/ptp_pch.c b/drivers/ptp/ptp_pch.c
index
The parse_acpi_topology() is not declared anywhere which
causes the following sparse warning:
drivers/base/arch_topology.c:522:19: warning: symbol 'parse_acpi_topology' was
not declared. Should it be static?
Signed-off-by: Ben Dooks (Codethink)
---
Cc: Sudeep Holla
Cc: linux-kernel
integer as NULL pointer
./include/trace/events/xdp.h:356:1: warning: Using plain integer as NULL pointer
./include/trace/events/xdp.h:390:1: warning: Using plain integer as NULL pointer
Signed-off-by: Ben Dooks (Codethink)
---
Cc: Alexei Starovoitov
Cc: Daniel Borkmann
Cc: Martin KaFai Lau
Cc: Song
: symbol 'sched_clock_resume' was not
declared. Should it be static?
Signed-off-by: Ben Dooks (Codethink)
---
Cc: Thomas Gleixner
Cc: linux-kernel@vger.kernel.org
---
kernel/time/sched_clock.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/time/sched_clock.c b/kernel/time/sched_clock.c
'in6_dev_finish_destroy' was
not declared. Should it be static?
Signed-off-by: Ben Dooks (Codethink)
---
Cc: "David S. Miller"
Cc: Alexey Kuznetsov
Cc: Hideaki YOSHIFUJI
Cc: net...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
net/ipv6/addrconf_core.c | 1 +
1 file changed, 1
] *
drivers/pinctrl/pinctrl-amd.c:587:25: warning: incorrect type in argument 2
(different address spaces)
drivers/pinctrl/pinctrl-amd.c:587:25:expected void volatile [noderef]
*addr
drivers/pinctrl/pinctrl-amd.c:587:25:got unsigned int [usertype] *
Signed-off-by: Ben Dooks (Codethink
?
Signed-off-by: Ben Dooks (Codethink)
---
Cc: "David S. Miller"
Cc: net...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
include/net/hwbm.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/net/hwbm.h b/include/net/hwbm.h
index 81643cf8a1c4..cb
it be static?
drivers/net/ethernet/marvell/mvneta_bm.h:182:6: warning: symbol 'mvneta_bm_put'
was not declared. Should it be static?
Signed-off-by: Ben Dooks (Codethink)
---
Cc: "David S. Miller"
Cc: net...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/net/ethern
?
./include/net/hwbm.h:25:5: warning: symbol 'hwbm_pool_refill' was not declared.
Should it be static?
./include/net/hwbm.h:26:5: warning: symbol 'hwbm_pool_add' was not declared.
Should it be static?
Signed-off-by: Ben Dooks (Codethink)
---
Cc: "David S. Miller"
Cc: net...@vger.kernel.org
: warning: symbol 'xfs_fs_get_uuid' was not declared.
Should it be static?
fs/xfs/xfs_pnfs.c:77:1: warning: symbol 'xfs_fs_map_blocks' was not declared.
Should it be static?
fs/xfs/xfs_pnfs.c:226:1: warning: symbol 'xfs_fs_commit_blocks' was not
declared. Should it be static?
Signed-off-by: Ben Dooks
it be static?
drivers/net/ethernet/marvell/mvneta_bm.h:182:6: warning: symbol 'mvneta_bm_put'
was not declared. Should it be static?
Signed-off-by: Ben Dooks (Codethink)
---
Cc: "David S. Miller"
Cc: net...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
v2:
- fixup formatting of chan
?
./include/net/hwbm.h:25:5: warning: symbol 'hwbm_pool_refill' was not declared.
Should it be static?
./include/net/hwbm.h:26:5: warning: symbol 'hwbm_pool_add' was not declared.
Should it be static?
Signed-off-by: Ben Dooks (Codethink)
---
Cc: "David S. Miller"
Cc: net...@vger.kernel.org
The trace functions should have __iomem on the addr
pointers. Add __iomem to avoid the following warnings
from sparse:
drivers/usb/musb/musb_core.c:253:55: warning: incorrect type in argument 2
(different address spaces)
drivers/usb/musb/musb_core.c:253:55:expected void const *addr
It looks like some of the xhci debug code is passing
u32 to functions directly from __le32/__le64 fields. Fix
this by using le{32,64}_to_cpu() on these to fix the
following sparse warnings;
drivers/usb/host/xhci-debugfs.c:205:62: warning: incorrect type in argument 1
(different base types)
Fix the type of buf in __usbhsg_recip_send_status to
be __le16 to avoid the following sparse warning:
drivers/usb/renesas_usbhs/mod_gadget.c:335:14: warning: incorrect type in
assignment (different base types)
drivers/usb/renesas_usbhs/mod_gadget.c:335:14:expected unsigned short
The follow items are not declared but also not exported
so use __attribute__((__externally_visible__)) to silence
the following sparse warnings:
./include/linux/decompress/mm.h:31:30: warning: symbol 'malloc_ptr' was not
declared. Should it be static?
./include/linux/decompress/mm.h:32:20:
Fix the warnings generated by casting to/from __le16 without
using the correct functions.
Fixes the following sparse warnings:
drivers/usb/renesas_usbhs/common.c:165:25: warning: incorrect type in
assignment (different base types)
drivers/usb/renesas_usbhs/common.c:165:25:expected
The writel() takes standard integers, not __le32 so
fix the following sparse warnings by removing the
cpu_to_le32() calls.
drivers/power/reset/at91-reset.c:134:9: warning: cast from restricted __le32
drivers/power/reset/at91-reset.c:143:9: warning: cast from restricted __le32
This has made no
The xhci_ec_base variable is a pointer, so don't compare
it with an integer.
Signed-off-by: Ben Dooks
---
Cc: Al Cooper
Cc: Kishon Vijay Abraham I
Cc: linux-kernel@vger.kernel.org
Cc: bcm-kernel-feedback-l...@broadcom.com
---
drivers/phy/broadcom/phy-brcm-usb-init.c | 2 +-
1 file changed, 1
The register address should have __iomem attributes
so fix this to remove the following sparse warnings:
drivers/phy/broadcom/phy-brcm-usb-init.c:459:30: warning: cast removes address
space '' of expression
drivers/phy/broadcom/phy-brcm-usb-init.c:459:30: warning: incorrect type in
argument 2
Fix __iomem attribute on msg variable passed to readl() in
the decode_msi_hwirq() function. Fixes the following sparse
warning:
drivers/pci/controller/pcie-iproc-msi.c:301:17: warning: incorrect type in
argument 1 (different address spaces)
drivers/pci/controller/pcie-iproc-msi.c:301:17:
The mvebu_pci_bridge_emul_ops is not exported outside
of the driver, so make it static to avoid the following
sparse warning:
drivers/pci/controller/pci-mvebu.c:557:28: warning: symbol
'mvebu_pci_bridge_emul_ops' was not declared. Should it be static?
Signed-off-by: Ben Dooks
---
Cc: Thomas
Fix the return type of mvebu_pcie_map_registers in the
error path to have __iomem on it. Fixes the following
sparse warning:
drivers/pci/controller/pci-mvebu.c:716:31: warning: incorrect type in return
expression (different address spaces)
drivers/pci/controller/pci-mvebu.c:716:31:expected
The cpdma_chan_split_pool() function is not used outside of
the driver, so make it static to avoid the following sparse
warning:
drivers/net/ethernet/ti/davinci_cpdma.c:725:5: warning: symbol
'cpdma_chan_split_pool' was not declared. Should it be static?
Signed-off-by: Ben Dooks
---
Cc:
The tc_flow_parsers is not used outside of the driver, so
make it static to avoid the following sparse warning:
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c:516:3: warning: symbol
'tc_flow_parsers' was not declared. Should it be static?
Signed-off-by: Ben Dooks
---
Cc: Giuseppe Cavallaro
The stmmac_pcs_ctrl_ane() expects a register address as
argument 1, but for some reason the mac_device_info is
being passed.
Fix the warning (and possible bug) from sparse:
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17: warning: incorrect
type in argument 1 (different address
From: Ben Dooks
The pci_bridge_groups and pcie_dev_groups objects are
not exported and not used at-all, so remove them to
fix the following warnings from sparse:
drivers/pci/pci-sysfs.c:1546:30: warning: symbol 'pci_bridge_groups' was not
declared. Should it be static?
The stmmac_pcs_ctrl_ane() expects a register address as
argument 1, but for some reason the mac_device_info is
being passed.
Fix the warning (and possible bug) from sparse:
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17: warning: incorrect
type in argument 1 (different address
mm_init.c needs to include for the
definition of vm_committed_as_batch. Fixes the following
sparse warning:
mm/mm_init.c:141:5: warning: symbol 'vm_committed_as_batch' was not declared.
Should it be static?
Signed-off-by: Ben Dooks
---
Cc: Andrew Morton
Cc: linux...@kvack.org
Cc:
The huge_pte_offset() returns a pte_t *, not an integer
so when huge-tlb is off, the replacement inline macro
should return a pte_t * too.
This fixes the following sparse warning:
mm/page_vma_mapped.c:156:29: warning: Using plain integer as NULL pointer
Signed-off-by: Ben Dooks
---
Cc: Mike
The call to exportfs_encode_inode_fh() takes an pointer
as the 4th argument, so replace the integer 0 with the
NULL pointer.
This fixes the following sparse warning:
fs/notify/fdinfo.c:53:87: warning: Using plain integer as NULL pointer
Signed-off-by: Ben Dooks
---
Cc: Jan Kara
Cc: Amir
In set_dent_cookie() the result of prandom_u32() is
assinged to an __le32 type. Make this a forced conversion
to remove the following sparse warning:
fs/ubifs/journal.c:506:30: warning: incorrect type in assignment (different
base types)
fs/ubifs/journal.c:506:30:expected restricted __le32
In the ubifs_jnl_write_inode() functon, it calls ubifs_iget()
with xent->inum. The xent->inum is __le64, but the ubifs_iget()
takes native cpu endian.
I think that this should be changed to passing le64_to_cpu(xent->inum)
to fix the following sparse warning:
fs/ubifs/journal.c:902:58: warning:
The sup->hash_algo is a __le16, and whilst 0x is
the same in __le16 and u16, it would be better to use
cpu_to_le16() anyway (which should deal with constants)
and silence the following sparse warning:
fs/ubifs/sb.c:187:32: warning: incorrect type in assignment (different base
types)
The sb_init_dio_done_wq() is declared in internal.h but
fs/direct-io.c does not include this file. Fix the warning
by including internal.h
fs/direct-io.c:612:5: warning: symbol 'sb_init_dio_done_wq' was not declared.
Should it be static?
Signed-off-by: Ben Dooks
---
Cc: Alexander Viro
Cc:
The add_hwgenerator_randomness() is declared in
but this is not being included in drivers/char/random.c so fix
the following sparse warning by including it:
drivers/char/random.c:2489:6: warning: symbol 'add_hwgenerator_randomness' was
not declared. Should it be static?
Signed-off-by: Ben
There are a number of structs in net/core/filter.c
that are not exported or declared outside of the
file. Fix the following warnings by making these
all static:
net/core/filter.c:8465:31: warning: symbol 'sk_filter_verifier_ops' was not
declared. Should it be static?
net/core/filter.c:8472:27:
In bpf_skb_load_helper_8_no_cache and
bpf_skb_load_helper_16_no_cache they
read a u16/u32 where actually these
are __be16 and __be32.
Fix the following by making the types
match:
net/core/filter.c:215:32: warning: cast to restricted __be16
net/core/filter.c:215:32: warning: cast to restricted
The __kthread_queue_delayed_work is not exported so
make it static, to avoid the following sparse warning:
kernel/kthread.c:869:6: warning: symbol '__kthread_queue_delayed_work' was not
declared. Should it be static?
Signed-off-by: Ben Dooks
---
Cc: linux-kernel@vger.kernel.org
Cc:
It looks like in hci_init4_req() the request is being
initialised from cpu-endian data but the packet is specified
to be little-endian. This causes an warning from sparse due
to __le16 to u16 conversion.
Fix this by using cpu_to_le16() on the two fields in the packet.
The safexcel_pci_remove, pcireg_rc and ofreg_rc are
not exported or declared externally so make them static.
This avoids the following sparse warnings:
drivers/crypto/inside-secure/safexcel.c:1760:6: warning: symbol
'safexcel_pci_remove' was not declared. Should it be static?
The parse_acpi_topology() is not declared anywhere which
causes the following sparse warning:
drivers/base/arch_topology.c:522:19: warning: symbol 'parse_acpi_topology' was
not declared. Should it be static?
RFC: is this the best place to put it?
Signed-off-by: Ben Dooks (Codethink)
---
Cc
The following commit has been merged into the timers/urgent branch of tip:
Commit-ID: 086ee46b08634a999bcd1707eabe3b0dc1806674
Gitweb:
https://git.kernel.org/tip/086ee46b08634a999bcd1707eabe3b0dc1806674
Author:Ben Dooks (Codethink)
AuthorDate:Tue, 22 Oct 2019 14:12:26 +01
52 matches
Mail list logo