Re: [staging:staging-testing 41/59] drivers/staging/wfx/main.c:47:14-21: ERROR: PTR_ERR applied after initialization to constant on line 42

2019-10-08 Thread Rong Chen
On 10/7/19 4:36 PM, Jerome Pouiller wrote: On Friday 4 October 2019 12:48:32 CEST kbuild test robot wrote: [...] drivers/staging/wfx/main.c:47:14-21: ERROR: PTR_ERR applied after initialization to constant on line 42 vim +47 drivers/staging/wfx/main.c 30 31 struct gpio_desc *wfx

[PATCH] KPC2000: kpc2000_spi.c: Fix alignment and style problems.

2019-10-08 Thread Chandra Annamaneni
Fixed alignment and style issues raised by checkpatch.pl Signed-off-by: Chandra Annamaneni --- drivers/staging/kpc2000/kpc2000_spi.c | 49 --- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/

[PATCH v3] staging: vc04_services: Avoid NULL comparison

2019-10-08 Thread Nachammai Karuppiah
Remove NULL comparison. Issue found using checkpatch.pl Signed-off-by: Nachammai Karuppiah --- Changes in V2 - Remove all NULL comparisons in vc04_services/interface directory. --- changes in V3 - Fixed warnings. Reported-by: kbuild test robot --- Signed-off-by: Nachammai Karuppiah --

RE: [PATCH v2] PCI: PM: Move to D0 before calling pci_legacy_resume_early()

2019-10-08 Thread Dexuan Cui
> From: Bjorn Helgaas > Sent: Tuesday, October 8, 2019 12:56 PM > ... > Wordsmithing nit: what the patch does is not "fix the error message"; > what it does is fix the *problem*, i.e., the fact that we can't > operate the device because we can't enable MSI-X. The message is only > a symptom. I t

[PATCH v3] staging: rtl8723bs: Remove set but not used variable 'i'

2019-10-08 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/core/rtw_xmit.c: In function update_attrib: drivers/staging/rtl8723bs/core/rtw_xmit.c:680:7: warning: variable i set but not used [-Wunused-but-set-variable] It is not used since commit 554c0a3abf21 ("staging: Add rtl8723bs

Re: [PATCH][next] staging: wfx: fix spelling mistake "hexdecimal" -> "hexadecimal"

2019-10-08 Thread Jerome Pouiller
On Tuesday 8 October 2019 10:22:05 CEST Colin King wrote: > From: Colin Ian King > > There is a spelling mistake in the documentation and a module parameter > description. Fix these. > > Signed-off-by: Colin Ian King > --- > .../devicetree/bindings/net/wireless/siliabs,wfx.txt| 2 +

Re: [PATCH v2] PCI: PM: Move to D0 before calling pci_legacy_resume_early()

2019-10-08 Thread Bjorn Helgaas
On Tue, Oct 08, 2019 at 07:32:27PM +0200, Rafael J. Wysocki wrote: > On 10/7/2019 8:57 PM, Dexuan Cui wrote: > > > -Original Message- > > > From: Bjorn Helgaas > > > Sent: Monday, October 7, 2019 6:24 AM > > > To: Dexuan Cui > > > Cc: lorenzo.pieral...@arm.com; linux-...@vger.kernel.org;

Re: [PATCH] staging: wlan-ng: p80211wep.c: use lib/crc32

2019-10-08 Thread Thomas Meyer
Dan Carpenter writes: > On Mon, Oct 07, 2019 at 06:15:23PM +0200, Thomas Meyer wrote: >> Dan Carpenter writes: >> >> so... what do you think? > > Could you send your test program? sure, here you go: cc crc32.c -o crc32 lib/crc32.o #include #include #include typedef uint8_t u8; typedef ui

Re: [PATCH] binder: prevent UAF read in print_binder_transaction_log_entry()

2019-10-08 Thread Joel Fernandes
On Tue, Oct 08, 2019 at 03:01:59PM +0200, Christian Brauner wrote: > When a binder transaction is initiated on a binder device coming from a > binderfs instance, a pointer to the name of the binder device is stashed > in the binder_transaction_log_entry's context_name member. Later on it > is used

Re: [PATCH v2] PCI: PM: Move to D0 before calling pci_legacy_resume_early()

2019-10-08 Thread Rafael J. Wysocki
On 10/7/2019 8:57 PM, Dexuan Cui wrote: -Original Message- From: Bjorn Helgaas Sent: Monday, October 7, 2019 6:24 AM To: Dexuan Cui Cc: lorenzo.pieral...@arm.com; linux-...@vger.kernel.org; Michael Kelley ; linux-hyp...@vger.kernel.org; linux-ker...@vger.kernel.org; driverdev-devel@linu

Re: [PATCH] staging: vchiq: don't leak kernel address

2019-10-08 Thread Greg Kroah-Hartman
On Tue, Oct 08, 2019 at 05:25:17PM +0300, Dan Carpenter wrote: > On Tue, Oct 08, 2019 at 04:21:54PM +0200, Matteo Croce wrote: > > On Tue, Oct 8, 2019 at 3:16 PM Dan Carpenter > > wrote: > > > > > > The subject doesn't match the patch. It should just be "remove useless > > > printk". > > > > > >

Re: [PATCH v2 5/6] staging: comedi: Remove set but not used variable 'hi'

2019-10-08 Thread Greg KH
On Tue, Oct 08, 2019 at 01:56:49PM +0100, Ian Abbott wrote: > On 08/10/2019 08:41, zhengbin wrote: > > Fixes gcc '-Wunused-but-set-variable' warning: > > > > drivers/staging/comedi/drivers/dt2815.c: In function dt2815_ao_insn: > > drivers/staging/comedi/drivers/dt2815.c:91:19: warning: variable hi

Re: [PATCH v2 4/6] staging: comedi: Remove set but not used variable 'data'

2019-10-08 Thread Greg KH
On Tue, Oct 08, 2019 at 01:55:01PM +0100, Ian Abbott wrote: > On 08/10/2019 08:41, zhengbin wrote: > > Fixes gcc '-Wunused-but-set-variable' warning: > > > > drivers/staging/comedi/drivers/dt2814.c: In function dt2814_interrupt: > > drivers/staging/comedi/drivers/dt2814.c:193:6: warning: variable

Re: [PATCH 0/7] Fix various compilation issues with wfx driver

2019-10-08 Thread Greg Kroah-Hartman
On Tue, Oct 08, 2019 at 09:42:47AM +, Jerome Pouiller wrote: > From: Jérôme Pouiller > > Most of problems are related to big-endian architectures. kbuild still reports 2 errors with these patches applied: Regressions in current branch: drivers/staging/wfx/hif_tx.c:82:2-8: preceding lock on

Re: [PATCH] staging: vchiq: don't leak kernel address

2019-10-08 Thread Dan Carpenter
On Tue, Oct 08, 2019 at 04:21:54PM +0200, Matteo Croce wrote: > On Tue, Oct 8, 2019 at 3:16 PM Dan Carpenter wrote: > > > > The subject doesn't match the patch. It should just be "remove useless > > printk". > > > > regards, > > dan carpenter > > > > Well, it avoids leaking an address by removin

Re: [PATCH] staging: vchiq: don't leak kernel address

2019-10-08 Thread Matteo Croce
On Tue, Oct 8, 2019 at 3:16 PM Dan Carpenter wrote: > > The subject doesn't match the patch. It should just be "remove useless > printk". > > regards, > dan carpenter > Well, it avoids leaking an address by removing an useless printk. It seems that GKH already picked the patch in his staging tre

Re: [PATCH] staging: fieldbus: make use of devm_platform_ioremap_resource

2019-10-08 Thread Sven Van Asbroeck
On Tue, Oct 8, 2019 at 2:11 AM hariprasad Kelam wrote: > > From: Hariprasad Kelam > > fix below issues reported by coccicheck > drivers/staging//fieldbus/anybuss/arcx-anybus.c:135:1-5: WARNING: Use > devm_platform_ioremap_resource for base > drivers/staging//fieldbus/anybuss/arcx-anybus.c:248:1-1

Re: [PATCH] staging: vchiq: don't leak kernel address

2019-10-08 Thread Dan Carpenter
The subject doesn't match the patch. It should just be "remove useless printk". regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH] binder: prevent UAF read in print_binder_transaction_log_entry()

2019-10-08 Thread Christian Brauner
When a binder transaction is initiated on a binder device coming from a binderfs instance, a pointer to the name of the binder device is stashed in the binder_transaction_log_entry's context_name member. Later on it is used to print the name in print_binder_transaction_log_entry(). By the time prin

Re: [PATCH v2 6/6] staging: comedi: Remove set but not used variable 'aref'

2019-10-08 Thread Ian Abbott
On 08/10/2019 08:41, zhengbin wrote: Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/comedi/drivers/dt3000.c: In function dt3k_ai_insn_read: drivers/staging/comedi/drivers/dt3000.c:511:27: warning: variable aref set but not used [-Wunused-but-set-variable] It is not used since c

Re: [PATCH v2 5/6] staging: comedi: Remove set but not used variable 'hi'

2019-10-08 Thread Ian Abbott
On 08/10/2019 08:41, zhengbin wrote: Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/comedi/drivers/dt2815.c: In function dt2815_ao_insn: drivers/staging/comedi/drivers/dt2815.c:91:19: warning: variable hi set but not used [-Wunused-but-set-variable] It is not used since commit

Re: [PATCH v2 4/6] staging: comedi: Remove set but not used variable 'data'

2019-10-08 Thread Ian Abbott
On 08/10/2019 08:41, zhengbin wrote: Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/comedi/drivers/dt2814.c: In function dt2814_interrupt: drivers/staging/comedi/drivers/dt2814.c:193:6: warning: variable data set but not used [-Wunused-but-set-variable] It is not used since com

Re: [PATCH v2] staging: rtl8723bs: Remove set but not used variable 'i'

2019-10-08 Thread Greg KH
On Tue, Oct 08, 2019 at 09:25:03AM +0800, zhengbin wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/staging/rtl8723bs/core/rtw_xmit.c: In function update_attrib: > drivers/staging/rtl8723bs/core/rtw_xmit.c:680:7: warning: variable i set but > not used [-Wunused-but-set-variable

Re: [PATCH] staging: media: sunxi: make use of devm_platform_ioremap_resource

2019-10-08 Thread Greg Kroah-Hartman
On Tue, Oct 08, 2019 at 12:29:34PM +0530, haripra...@osuosl.org wrote: > From: Hariprasad Kelam > > fix below issue reported by coccicheck > drivers/staging//media/sunxi/cedrus/cedrus_hw.c:229:1-10: WARNING: Use > devm_platform_ioremap_resource for dev -> base > > Signed-off-by: Hariprasad Kelam

Re: [PATCH] rtl8723bs: core: Remove code valid only for 5GHZ

2019-10-08 Thread Greg Kroah-Hartman
On Sun, Sep 29, 2019 at 07:24:57PM +0530, haripra...@osuosl.org wrote: > From: Hariprasad Kelam > > As per TODO ,remove code valid only for 5 GHz(channel > 14). > > Signed-off-by: Hariprasad Kelam > --- > drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 19 ++- > 1 file changed

Re: [PATCH v2] staging: vc04_services: Avoid NULL comparison

2019-10-08 Thread Greg Kroah-Hartman
On Mon, Oct 07, 2019 at 03:29:28PM -0700, Nachammai Karuppiah wrote: > Remove NULL comparison. Issue found using checkpatch.pl > > Signed-off-by: Nachammai Karuppiah > > --- > > Changes in V2 >- Remove all NULL comparisons in vc04_services/interface directory. > --- > .../interface/vchiq_a

[PATCH] staging: vchiq: don't leak kernel address

2019-10-08 Thread Matteo Croce
Since commit ad67b74d2469d9b8 ("printk: hash addresses printed with %p"), an obfuscated kernel pointer is printed at boot: vchiq: vchiq_init_state: slot_zero = (ptrval) Remove the the print completely, as it's useless without the address. Signed-off-by: Matteo Croce --- drivers/sta

Re: [PATCH 6/7] staging: wfx: drop calls to BUG_ON()

2019-10-08 Thread Dan Carpenter
On Tue, Oct 08, 2019 at 09:43:01AM +, Jerome Pouiller wrote: > @@ -56,9 +56,9 @@ static uint8_t fill_tkip_pair(struct hif_tkip_pairwise_key > *msg, > { > uint8_t *keybuf = key->key; > > - WARN_ON(key->keylen != sizeof(msg->tkip_key_data) > -+ sizeof(msg

Re: [PATCH 4/7] staging: wfx: correctly cast data on big-endian targets

2019-10-08 Thread Dan Carpenter
On Tue, Oct 08, 2019 at 09:43:00AM +, Jerome Pouiller wrote: > From: Jérôme Pouiller > > When built for a big-endian target, original code caused error: > > include/uapi/linux/swab.h:242:29: note: expected '__u32 * {aka unsigned > int *}' but argument is of type 'struct hif_mib_protecte

Re: [PATCH 1/7] staging: wfx: simplify memory allocation in wfx_update_filtering()

2019-10-08 Thread Dan Carpenter
These patches are good. I just have a few nits to point out for future reference. On Tue, Oct 08, 2019 at 09:42:58AM +, Jerome Pouiller wrote: > static inline int hif_set_beacon_filter_table(struct wfx_vif *wvif, > - struct hif_mib_bcn_filter_table

[PATCH 6/7] staging: wfx: drop calls to BUG_ON()

2019-10-08 Thread Jerome Pouiller
From: Jérôme Pouiller Most of calls to BUG_ON() could replaced by WARN(). By the way, this patch also try to favor WARN() (that include a comment about the problem) instead of WARN_ON(). Reported-by: Andrew Lunn Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 4 ++-- d

[PATCH 5/7] staging: wfx: fix copy_{to,from}_user() usage

2019-10-08 Thread Jerome Pouiller
From: Jérôme Pouiller On error, copy_to_user() returns number of bytes remaining. Driver should return -EFAULT. Fixes: 4f8b7fabb15d ("staging: wfx: allow to send commands to chip") Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Jérôme Pouiller --- drivers/staging/wf

[PATCH 7/7] staging: wfx: avoid namespace contamination

2019-10-08 Thread Jerome Pouiller
From: Jérôme Pouiller tx_policy_init() was already defined in driver cw1200. So, compilation failed when wfx and cw1200 were both built-in. In order to keep a coherent naming scheme, this patch prefixes all "tx_policy_*" functions with "wfx_". Fixes: 9bca45f3d692 ("staging: wfx: allow to send 8

[PATCH 3/7] staging: wfx: le16_to_cpus() takes a reference as parameter

2019-10-08 Thread Jerome Pouiller
From: Jérôme Pouiller Original code caused an (100% reproducible) invalid memory access on big-endian targets. Fixes: b0998f0c040d "staging: wfx: add IRQ handling" Reported-by: kbuild test robot Reported-by: Stephen Rothwell Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 4 ++-

[PATCH 2/7] staging: wfx: remove misused call to cpu_to_le16()

2019-10-08 Thread Jerome Pouiller
From: Jérôme Pouiller Indeed, hif_msg->id is a uint8_t, so use of cpu_to_le16() is a madness. Fixes: 9bca45f3d692 ("staging: wfx: allow to send 802.11 frames") Reported-by: kbuild test robot Reported-by: Stephen Rothwell Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 2 +-

[PATCH 1/7] staging: wfx: simplify memory allocation in wfx_update_filtering()

2019-10-08 Thread Jerome Pouiller
From: Jérôme Pouiller Original code did not handle case where kmalloc failed. By the way, it is more convenient to allocate and build HIF message in hif_set_beacon_filter_table() instead of to ask to caller function to build it. Fixes: 40115bbc40e2 ("staging: wfx: implement the rest of mac80211

[PATCH 0/7] Fix various compilation issues with wfx driver

2019-10-08 Thread Jerome Pouiller
From: Jérôme Pouiller Most of problems are related to big-endian architectures. Jérôme Pouiller (7): staging: wfx: simplify memory allocation in wfx_update_filtering() staging: wfx: remove misused call to cpu_to_le16() staging: wfx: le16_to_cpus() takes a reference as parameter staging:

[PATCH 4/7] staging: wfx: correctly cast data on big-endian targets

2019-10-08 Thread Jerome Pouiller
From: Jérôme Pouiller When built for a big-endian target, original code caused error: include/uapi/linux/swab.h:242:29: note: expected '__u32 * {aka unsigned int *}' but argument is of type 'struct hif_mib_protected_mgmt_policy *' Fixes: f95a29d40782 ("staging: wfx: add HIF commands helper

Re: [PATCH v2] staging: vc04_services: Avoid NULL comparison

2019-10-08 Thread kbuild test robot
Hi Nachammai, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on staging/staging-testing] url: https://github.com/0day-ci/linux/commits/Nachammai-Karuppiah/staging-vc04_services-Avoid-NULL-comparison/20191008-143400 config: x86_64-allyesconfig (attached as

Re: [PATCH] staging: media: imx: make use devm_platform_ioremap_resource

2019-10-08 Thread Rui Miguel Silva
Hi Hariprasad, Thanks for the patch On Tue 08 Oct 2019 at 07:17, nobody wrote: > From: Hariprasad Kelam > Something went wrong formating the patch email, no To: nor From: > > fix below issue reported by coccicheck > drivers/staging//media/imx/imx7-mipi-csis.c:973:1-12: WARNING: Use > devm_platfo

[PATCH][next] staging: wfx: fix spelling mistake "hexdecimal" -> "hexadecimal"

2019-10-08 Thread Colin King
From: Colin Ian King There is a spelling mistake in the documentation and a module parameter description. Fix these. Signed-off-by: Colin Ian King --- .../devicetree/bindings/net/wireless/siliabs,wfx.txt| 2 +- drivers/staging/wfx/main.c | 2 +-

Re: [PATCH v2 0/6] staging: Remove a bounch set of set but not used variables

2019-10-08 Thread Dan Carpenter
Looks good. Thanks! Reviewed-by: Dan Carpenter regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH v2 1/6] staging: bcm2835-audio: Need to judge the return value of vchi_msg_dequeue in audio_vchi_callback

2019-10-08 Thread zhengbin
If vchi_msg_dequeue return -1, variable m is not assigined, need to return. Reported-by: Hulk Robot Signed-off-by: zhengbin --- drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-

[PATCH v2 6/6] staging: comedi: Remove set but not used variable 'aref'

2019-10-08 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/comedi/drivers/dt3000.c: In function dt3k_ai_insn_read: drivers/staging/comedi/drivers/dt3000.c:511:27: warning: variable aref set but not used [-Wunused-but-set-variable] It is not used since commit 2e310235ca8f ("staging: comedi: d

[PATCH v2 4/6] staging: comedi: Remove set but not used variable 'data'

2019-10-08 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/comedi/drivers/dt2814.c: In function dt2814_interrupt: drivers/staging/comedi/drivers/dt2814.c:193:6: warning: variable data set but not used [-Wunused-but-set-variable] It is not used since commit 7806012e97ed ("staging: comedi: ref

[PATCH v2 0/6] staging: Remove a bounch set of set but not used variables

2019-10-08 Thread zhengbin
v1->v2: need to judge the value of status, If status != 0, just return zhengbin (6): staging: bcm2835-audio: Need to judge the return value of vchi_msg_dequeue in audio_vchi_callback staging: sm750fb: Remove set but not used variable 'uiActualPixelClk' staging: sm750fb: Remove set but no

[PATCH v2 5/6] staging: comedi: Remove set but not used variable 'hi'

2019-10-08 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/comedi/drivers/dt2815.c: In function dt2815_ao_insn: drivers/staging/comedi/drivers/dt2815.c:91:19: warning: variable hi set but not used [-Wunused-but-set-variable] It is not used since commit d6a929b7608a ("Staging: comedi: add dt2

[PATCH v2 3/6] staging: sm750fb: Remove set but not used variable 'actual_mx_clk'

2019-10-08 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/sm750fb/ddk750_chip.c: In function set_chip_clock: drivers/staging/sm750fb/ddk750_chip.c:59:15: warning: variable actual_mx_clk set but not used [-Wunused-but-set-variable] It is not used since commit f0977109a577 ("staging: sm750fb:

[PATCH v2 2/6] staging: sm750fb: Remove set but not used variable 'uiActualPixelClk'

2019-10-08 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/sm750fb/ddk750_mode.c: In function ddk750_setModeTiming: drivers/staging/sm750fb/ddk750_mode.c:212:15: warning: variable uiActualPixelClk set but not used [-Wunused-but-set-variable] It is not used since commit 81dee67e215b ("staging

Re: [PATCH] staging: media: sunxi: make use of devm_platform_ioremap_resource

2019-10-08 Thread Paul Kocialkowski
Hi, On Tue 08 Oct 19, 12:29, hariprasadkelamhariprasad.ke...@gmail.com wrote: > From: Hariprasad Kelam > > fix below issue reported by coccicheck > drivers/staging//media/sunxi/cedrus/cedrus_hw.c:229:1-10: WARNING: Use > devm_platform_ioremap_resource for dev -> base Looks good, thanks! Acked-

[PATCH] staging: media: sunxi: make use of devm_platform_ioremap_resource

2019-10-08 Thread hariprasad
From: Hariprasad Kelam fix below issue reported by coccicheck drivers/staging//media/sunxi/cedrus/cedrus_hw.c:229:1-10: WARNING: Use devm_platform_ioremap_resource for dev -> base Signed-off-by: Hariprasad Kelam --- drivers/staging/media/sunxi/cedrus/cedrus_hw.c | 4 +--- 1 file changed, 1 ins