Hi Jerome,
On Mon, May 11, 2020 at 5:53 PM Jerome Pouiller
wrote:
> From: Jérôme Pouiller
>
> The struct hif_msg is received from the hardware. So, it declared as
> little endian. However, it is also accessed from many places in the
> driver. Sparse complains about that:
>
> drivers/staging/
On Mon, May 11, 2020 at 02:46:58PM +, christian.gr...@microchip.com wrote:
> On Mon, 2020-05-11 at 13:47 +0200, Greg KH wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you
> > know the content is safe
> >
> > On Mon, May 11, 2020 at 11:51:15AM +0200, Christian Gromm wr
We need to release the tx_lock on the error path before returning.
Fixes: d1c015b4ef6f ("staging: wfx: rewrite wfx_hw_scan()")
Signed-off-by: Dan Carpenter
---
>From static analysis. Not tested.
drivers/staging/wfx/scan.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/d
ion_heap_pages_zero() function is not used at all, so remove it to
simplify the ion_heap_sglist_zero() function later.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v4 00/38] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread:
https://lore.kernel.org/dri-devel/20
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function
returns the number of the created entries in the DMA address space.
However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and
dma_unmap_sg must be called with the original number of the entries
passed to the dma_
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function
returns the number of the created entries in the DMA address space.
However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and
dma_unmap_sg must be called with the original number of the entries
passed to the dma_
On Tuesday 12 May 2020 10:36:56 CEST Dan Carpenter wrote:
>
> We need to release the tx_lock on the error path before returning.
>
> Fixes: d1c015b4ef6f ("staging: wfx: rewrite wfx_hw_scan()")
> Signed-off-by: Dan Carpenter
> ---
> From static analysis. Not tested.
>
> drivers/staging/wfx/sca
On Tuesday 12 May 2020 09:43:34 CEST Geert Uytterhoeven wrote:
> Hi Jerome,
>
> On Mon, May 11, 2020 at 5:53 PM Jerome Pouiller
> wrote:
> > From: Jérôme Pouiller
> >
> > The struct hif_msg is received from the hardware. So, it declared as
> > little endian. However, it is also accessed from man
On Mon, 2020-05-11 at 18:33 +0200, Greg KH wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
>
> On Mon, May 11, 2020 at 02:46:58PM +,
> christian.gr...@microchip.com wrote:
> > On Mon, 2020-05-11 at 13:47 +0200, Greg KH wrote:
> > > EXTERNA
From: Jérôme Pouiller
The attribute event_id is little-endian. We have to take to the
endianness when we access it.
Signed-off-by: Jérôme Pouiller
---
drivers/staging/wfx/hif_rx.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/st
From: Jérôme Pouiller
The struct hif_cnf_tx contains only little endian values. Thus, it is
necessary to fix byte ordering before to use them. Especially, sparse
detected wrong access to fields media_delay and tx_queue_delay.
Signed-off-by: Jérôme Pouiller
---
drivers/staging/wfx/data_tx.c | 3
From: Jérôme Pouiller
The structs hif_{req,cnf}_read_mib contain only little endian values.
Thus, it is necessary to fix byte ordering before to use them.
Especially, sparse detected wrong accesses to fields mib_id and length.
Signed-off-by: Jérôme Pouiller
---
drivers/staging/wfx/hif_tx.c | 1
From: Jérôme Pouiller
The attribute ps_mode_error is little-endian. We have to take to the
endianness when we access it.
Signed-off-by: Jérôme Pouiller
---
drivers/staging/wfx/hif_rx.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/wfx/hif_rx.c b/dri
From: Jérôme Pouiller
The field 'status' appears in most of structs returned by the hardware.
This field is encoded as little endian. Sparse complains this field is
not always correctly accessed:
drivers/staging/wfx/data_rx.c:53:16: warning: restricted __le32 degrades to
integer
drivers
From: Jérôme Pouiller
Sparse detects that le16_to_cpup() expects a __le16 * as argument.
Change the cast operator to be compliant with sparse.
Signed-off-by: Jérôme Pouiller
---
drivers/staging/wfx/bh.c | 2 +-
drivers/staging/wfx/traces.h | 2 +-
2 files changed, 2 insertions(+), 2 delet
From: Jérôme Pouiller
The struct hif_ind_startup is received from the hardware. So it is
declared as little endian. However, it is also stored in the main driver
structure and used on different places in the driver. Sparse complains
about that:
drivers/staging/wfx/data_tx.c:388:43: warning:
From: Jérôme Pouiller
The field wakeup_period_max from struct hif_mib_beacon_wake_up_period is
a u8. So, assigning it a __le16 produces a nasty bug on big-endian
architectures.
Signed-off-by: Jérôme Pouiller
---
drivers/staging/wfx/hif_tx_mib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletio
From: Jérôme Pouiller
The field 'channel_number' from the structs hif_ind_rx and hif_req_start
is a __le32. Sparse complains this field is not always correctly
accessed:
drivers/staging/wfx/data_rx.c:95:55: warning: incorrect type in argument 1
(different base types)
drivers/staging/wfx
From: Jérôme Pouiller
le32_to_cpu(*x) can be advantageously converted in le32_to_cpup(x).
Signed-off-by: Jérôme Pouiller
---
drivers/staging/wfx/hif_rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c
index ac4ec4
From: Jérôme Pouiller
Update the TODO list associated to the wfx driver with the last
progresses.
Signed-off-by: Jérôme Pouiller
---
drivers/staging/wfx/TODO | 19 ---
1 file changed, 19 deletions(-)
diff --git a/drivers/staging/wfx/TODO b/drivers/staging/wfx/TODO
index fca333
From: Jérôme Pouiller
The struct hif_rx_stats contains only little endian values. Thus, it is
necessary to fix byte ordering before to use them.
Signed-off-by: Jérôme Pouiller
---
drivers/staging/wfx/debug.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/driver
From: Jérôme Pouiller
Sparse detected that le32_to_cpu should be used instead of cpu_to_le32.
Signed-off-by: Jérôme Pouiller
---
drivers/staging/wfx/hwio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/wfx/hwio.c b/drivers/staging/wfx/hwio.c
index d878cb3e
From: Jérôme Pouiller
The attribute indication_type is little-endian. We have to take to the
endianness when we access it.
Signed-off-by: Jérôme Pouiller
---
drivers/staging/wfx/hif_rx.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/wfx/hif_rx.c b/
From: Jérôme Pouiller
The field packet_id is not interpreted by the device. It is only used as
identifier for the device answer. So it is not necessary to declare it
little endian. It fixes some warnings raised by Sparse without
complexifying the code.
Signed-off-by: Jérôme Pouiller
---
driver
From: Jérôme Pouiller
The field 'num_tx_confs' from the struct hif_cnf_multi_transmit is a
__le32. Sparse complains this field is not always correctly accessed:
drivers/staging/wfx/hif_rx.c:82:9: warning: restricted __le32 degrades to
integer
drivers/staging/wfx/hif_rx.c:87:29: warning:
From: Jérôme Pouiller
Hello,
As already discussed here[1], this series improves support for big
endian hosts. All warnings raised by sparse are now fixed.
Note, this series aims to be applied on top of PR named "staging: wfx:
fix Out-Of-Band IRQ"
[1] https://lore.kernel.org/lkml/201920285
From: Jérôme Pouiller
Sparse complains about the accesses to the field 'len' from struct hif_msg:
drivers/staging/wfx/bh.c:88:32: warning: restricted __le16 degrades to
integer
drivers/staging/wfx/bh.c:88:32: warning: restricted __le16 degrades to
integer
drivers/staging/wfx/bh.c:9
On Mon, May 11, 2020 at 07:20:15PM +0800, Samuel Zou wrote:
> Fix the following sparse warning:
>
> drivers/staging/media/tegra-video/tegra210.c:589:33: warning: symbol
> 'tegra210_video_formats' was not declared.
>
> The tegra210_video_formats has only call site within tegra210.c
> It should be
28 matches
Mail list logo