Re: [PATCH] staging: android: ion: Fix compilation warning

2018-09-08 Thread Dan Carpenter
It doesn't make the patch harder to review. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: android: ion: Fix compilation warning

2018-09-08 Thread Dan Carpenter
#x27;t match. What the heck is going on? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: android: ion: Add per-heap counters

2018-09-10 Thread Dan Carpenter
On Sun, Sep 09, 2018 at 01:44:31AM +0300, Alexey Skidanov wrote: > The heap statistics have been removed and currently even basics statistics > are missing. Remind me why did we remove them? What was the git hash? regards, dan carpenter ___

Re: [PATCH] staging: clocking-wizard: Add support for dynamic reconfiguration

2018-09-10 Thread Dan Carpenter
clkout_name, The line is indented too far. > + clk_name, 0, > + clk_wzrd->base, (WZRD_CLK_CFG_REG(2) + i * 12), > + WZRD_CLKOUT_DIVIDE_SHIFT, > +

Re: [PATCH 4.19 regression fix 1/2] staging: vboxvideo: Fix IRQs no longer working

2018-09-11 Thread Dan Carpenter
uninitialized variable warning. Just to spell it out a little more, the error code won't be printed for "if (ret)" because negatives are a subset of non-zero. Of course, if you do it consistently there won't be a warning message. I never see the consistent subsystems, so

Re: [PATCH 4.19 regression fix 1/2] staging: vboxvideo: Fix IRQs no longer working

2018-09-11 Thread Dan Carpenter
omeone then uses and unsigned type the error case would return as > success while the < 0 would be detected at compile time (or other static > code checkers). If the function returns int but ret is an unsigned int and we do "if (ret)", then ye

Re: [PATCH v2] staging: android: ion: Add per-heap counters

2018-09-11 Thread Dan Carpenter
+ heap->alloc_bytes_wm = 0; > + > + /* Create heap root directory. If creation is failed, we may continue */ > + heap_root = debugfs_create_dir(heap->name, dev->debug_root); > + if (!IS_ERR_OR_NULL(heap_root)) { Just remove this check. If debugfs_create_dir() fails, it doesn

Re: [PATCH v2] staging: android: ion: Add per-heap counters

2018-09-11 Thread Dan Carpenter
On Tue, Sep 11, 2018 at 12:11:23PM +0300, Alexey Skidanov wrote: > > > On 09/11/2018 11:59 AM, Greg KH wrote: > > On Tue, Sep 11, 2018 at 11:50:19AM +0300, Dan Carpenter wrote: > >> On Tue, Sep 11, 2018 at 11:17:10AM +0300, Alexey Skidanov wrote: > &g

Re: [PATCH 4/7] staging: erofs: return -EINVAL when specifying fault rate to 0

2018-09-12 Thread Dan Carpenter
On Wed, Sep 12, 2018 at 01:10:31PM +0800, Chengguang Xu wrote: > Set fault rate to 0 is useless and confusable, so add check to > avoid it. > I would have assumed setting rate to zero just disabled it. regards, dan carpenter ___ devel mailin

Re: [PATCH 4/7] staging: erofs: return -EINVAL when specifying fault rate to 0

2018-09-12 Thread Dan Carpenter
On Wed, Sep 12, 2018 at 10:05:26PM +0800, cgxu519 wrote: > On 09/12/2018 05:16 PM, Dan Carpenter wrote: > > On Wed, Sep 12, 2018 at 01:10:31PM +0800, Chengguang Xu wrote: > > > Set fault rate to 0 is useless and confusable, so add check to > > > avoid it. > > &g

Re: [PATCH] staging: rtl8188eu: remove code that is valid only for 5 GHz

2018-09-13 Thread Dan Carpenter
11OFDM5; > - else > - pdev_network->NetworkTypeInUse = Ndis802_11OFDM24; > - break; > default: > /* TODO */ > break; Are you sure about this chunk? I would have thought that <= 14 was not 5G. (I tr

Re: [PATCH 6/6] uio_hv_generic: defer opening vmbus until first use

2018-09-13 Thread Dan Carpenter
hv_uio_channel_cb, dev->channel); > + > + if (ret == 0) > + dev->channel->inbound.ring_buffer->interrupt_mask = 1; > + > + return ret; I think we should decrement pdata->refcnt if vmbus_connect_ring() fails? > +} regards, dan carpenter ___

Re: [PATCH] staging: rtl8188eu: remove code that is valid only for 5 GHz

2018-09-14 Thread Dan Carpenter
Ndis802_11OFDM24; > > > - break; > > > default: > > > /* TODO */ > > > break; > > > > Are you sure about this chunk? I would have thought that <= 14 was not > > 5G. (I try to avoid rhetorical questions and I d

Re: [PATCH 0/8] staging: erofs: error handing and more tracepoints

2018-09-18 Thread Dan Carpenter
ild the cross function DB twice to make the warning go away. It could be because it starts out with the old vle_get_logical_extent_head() information so it thinks it knows how that function works. regards, dan carpenter __

Re: [PATCH 29/29] staging: wilc1000: return exact error of register_netdev() from wilc_netdev_init()

2018-09-19 Thread Dan Carpenter
); 1127 if (ret) 1128 goto free_ndev; ret is cleared on the first iteration through the loop. 1129 1130 vif->iftype = STATION_MODE; 1131 vif->mac_opened = 0;

Re: [PATCH v7 4/4] gpiolib: Implement fast processing path in get/set array

2018-09-20 Thread Dan Carpenter
d_next_zero_bit(array_info->get_mask, > array_size, i); We could mark find_next_zero_bit() and friends as a __must_check functions so we avoid this bug in the future. I have a more complicated idea how to detect these bugs in a generic way using Smatch but it will take lo

Re: emxx_udc device tree bindings

2018-09-20 Thread Dan Carpenter
2ss_ep, ep); if (!ep) { We already know the _ep is non-NULL so that means container_of() can't be NULL. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: wilc1000: Remove unnecessary pointer check

2018-09-21 Thread Dan Carpenter
t has never been useful." That would help reviewing because now I know that you thought about it and I also can just look at the original commit. For this patch I did git log -p and the scrolled to the original commit, and the function name had changed so I had to scroll back and forth a bit to s

Re: [PATCH] Fix clang warning -Wpointer-bool-conversion by removing unnecessary check in regd.c

2018-09-22 Thread Dan Carpenter
The subject needs a subsystem prefix. It's also slightly long. [PATCH] Staging: rtlwifi: remove unnecessary NULL check regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/lis

Re: [PATCH] Fix clang warning -Wpointer-bool-conversion by removing unnecessary check in regd.c

2018-09-22 Thread Dan Carpenter
On Sat, Sep 22, 2018 at 01:40:19PM +, Karthik Nishanth wrote: > Do I submit a new patch with the modified subject? > Yeah. Put [PATCH v2] in the subject and then at the end of the patch description put: Signed-off-by: Your Name --- v2: changed the subject. regards, dan car

Re: [PATCH v2] Staging: rtlwifi: remove unnecessary NULL check

2018-09-22 Thread Dan Carpenter
Thanks! Reviewed-by: Dan Carpenter regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: rtl8188eu, rtl8723bs: fix spelling mistake "evet" -> "event"

2018-09-24 Thread Dan Carpenter
It's better to just delete these. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2 4/5] staging: vc04_services: Surround complex macros

2018-09-24 Thread Dan Carpenter
, x & 0xFF) > These are never used so far as I can see, but if they were, then this would probably break the code. Go through the git log and find out how they used to work and if they can be removed. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2 5/5] staging: vc04_services: Remove spaces after '*'

2018-09-24 Thread Dan Carpenter
tern /*@observer@*/ VCHI_CONNECTION_T *vchi_create_connection(const > VCHI_CONNECTION_API_T * function_table, >const > VCHI_MESSAGE_DRIVER_T * low_level); ^^^ Change these as well. regard

Re: [PATCH v2 0/5] staging: vc04_services: Fix checkpatch.pl errors

2018-09-24 Thread Dan Carpenter
On Sun, Sep 23, 2018 at 03:06:15PM +0100, Aymen Qader wrote: > v2: Added cover letter correctly > We weren't super stressed that the cover letter threading was wrong. We're not ogres. Anyway, just fixup the last two and resend a v3. regard

Re: [PATCH v4 0/4] staging: vc04_services: Fix checkpatch.pl errors

2018-09-25 Thread Dan Carpenter
Looks fine, thanks. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] fix error handling in drivers/staging/rtl8192u/ieee80211/ieee80211_module.c

2018-09-27 Thread Dan Carpenter
free_netdev(dev); When there is a "goto failed;" then it's called "one err style" error handling and we're just asking for bugs... In this case the bug is that we're not allowd to call ieee80211_networks_free() with a NULL "ieee" parameter.

Re: [PATCH v3] staging: ks7010: Add null pointer check for skb

2018-09-28 Thread Dan Carpenter
fix... regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v3] staging: ks7010: Add null pointer check for skb

2018-09-28 Thread Dan Carpenter
Btw, if you have the cross function DB built then Smatch says that the NULL check can be removed here no problem. $ smdb hostif_data_request [ snip ] drivers/staging/ks7010/ks_wlan_net.c | ks_wlan_start_xmit | hostif_data_request | PARAM_VALUE | 1 | skb | s64min-(-1),1-s64max regards, dan

Re: [PATCH v3] staging: ks7010: Add null pointer check for skb

2018-09-28 Thread Dan Carpenter
en you write a v2 patch wait until the next day to send it. Then you will be calm when you review it. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 05/13] staging:rtl8192u: Remove AdvCoding and GreenField - Style

2018-09-28 Thread Dan Carpenter
like we discussed this before. I'm pretty sure this comes from the firmware and so the format can't be changed. When I look at rtllib_parse_mife_generic() then I think that "info_element" probably comes from the firmware. I wouldn't want to accept this with out so

Re: [PATCH 06/13] staging:rtl8192u: Remove TxSTBC and RxSTBC - Style

2018-09-28 Thread Dan Carpenter
rtGI40Mhz:1; > - u8 TxSTBC:1; > - u8 RxSTBC:2; > u8 DelayBA:1; > u8 MaxAMSDUSize:1; > u8 DssCCk:1; Same thing. I suspect his is set by the firmware. regards, dan carpenter ___ devel mai

Re: [PATCH 07/13] staging:rtl8192u: Remove DelayBA, PSMP and Rsvd1 - Style

2018-09-28 Thread Dan Carpenter
Yeah... :( All the remaining patches are similar and risky. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 01/19] staging: rtl8188eu: cleanup inconsistent indenting

2018-09-30 Thread Dan Carpenter
The other related test about missing curly braces is pretty useful though. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] Staging: media: replaced deprecated probe method

2018-09-30 Thread Dan Carpenter
r interface > */ > -static int bcm2048_i2c_driver_probe(struct i2c_client *client, > - const struct i2c_device_id *id) > +static int bcm2048_i2c_driver_probe_new(struct i2c_client *client) Don't rename the function. Just remove the unused parameter. rega

Re: [PATCH 2/2] Staging: rts5208: rtsx_chip: Fixed multiple coding style issues

2018-10-01 Thread Dan Carpenter
You can't have two patches with the same subject. On Sat, Sep 29, 2018 at 12:43:54AM -0400, Maxime Desroches wrote: > Fixed multiple braces issues > Signed-off-by: Maxime Desroches Put a blank line between the patch description and the Signed-off-by regards, dan careptner _

Re: [PATCH 1/2] Staging: rts5208: rtsx_card: Fixed multiple coding style issues

2018-10-01 Thread Dan Carpenter
On Sat, Sep 29, 2018 at 12:44:31AM -0400, Maxime Desroches wrote: > Fixed multiple coding style issues > Too vague. Also inaccurate. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproje

Re: [PATCH 4/4] Staging: rts5208: sd: Fixed multiple coding style issues Fixed multiple braces issues

2018-10-01 Thread Dan Carpenter
Don't just add a 4/4 after a 3/3. Send it as a new series instead. Also the patch discription and sign off are missing. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/lis

Re: [PATCH] staging: rtlwifi: coding style fixes

2018-10-01 Thread Dan Carpenter
gt; > > if (ap_enable) { > > RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_DMESG, > > -"%s()<--dont leave lps under AP mode\n", __func__); > > +"%s()<--don't leave lps under AP mode\

Re: [PATCH resend 00/15] staging: vboxvideo: Convert to atomic modesetting API

2018-10-01 Thread Dan Carpenter
Why are you resending this? It's because you added some more patches on the end? Just send those as a new series... regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/lis

Re: [PATCH v3 00/29] staging: wilc1000: avoid static variables and cleanup changes

2018-10-01 Thread Dan Carpenter
ect error for failure in the second iteration Btw, I hate re-reviewing patches and I know everyone hates sending them. If someone complains about a 28/29 or a 29/29, then you can just ask Greg to apply the first 27 and redo the others in a follow on patchset. regards, dan carpenter

Re: [PATCH] Staging: media: replaced deprecated probe method

2018-10-01 Thread Dan Carpenter
ecated probe method > > Signed-off-by: Andrey Abramov > --- > drivers/staging/media/bcm2048/radio-bcm2048.c | 5 ++--- Then right after the --- line put: v3: fix commit message That part of the commit message will be removed when we apply the patch. regards, dan carpenter __

Re: [PATCH v3] Staging: media: replace deprecated probe method

2018-10-01 Thread Dan Carpenter
Thanks! regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: iio: adc: add missing spaces around minus sign

2018-10-01 Thread Dan Carpenter
e_available, > - in_voltage-voltage_scale_available, > + in_voltage - voltage_scale_available, >0444, ad7192_show_scale_available, NULL, 0); This doesn't work. That's not arithmatic, it's a string which is passed to a macro. It&

Re: [PATCH] staging: iio: adc: add missing spaces around minus sign

2018-10-01 Thread Dan Carpenter
On Mon, Oct 01, 2018 at 02:54:55PM +0200, Lars-Peter Clausen wrote: > On 10/01/2018 02:52 PM, Dan Carpenter wrote: > > On Mon, Oct 01, 2018 at 02:28:34PM +0200, Slawomir Stepien wrote: > >> The checkpatch.pl tool detected coding style problem: > >> > >>

Re: [PATCH] staging: iio: adc: ad7280a: fix 2 checks

2018-10-11 Thread Dan Carpenter
the only places which use this style and a lot of people bump into it. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH] staging: vboxvideo: unlock on error in vbox_cursor_atomic_update()

2018-10-11 Thread Dan Carpenter
We need to unlock before returning on this error path. Fixes: 35f3288c453e ("staging: vboxvideo: Atomic phase 1: convert cursor to universal plane") Signed-off-by: Dan Carpenter diff --git a/drivers/staging/vboxvideo/vbox_mode.c b/drivers/staging/vboxvideo/vbox_mode.c index 04

Re: Direct io failed with ion

2018-10-11 Thread Dan Carpenter
ese flags set. Could you give me any hit that could solve this > issue? > You must be using an old kernel because ion_mmap() was changed in April. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.

Re: [PATCH] staging: erofs: harden inode lookup for 32-bit platforms

2018-10-11 Thread Dan Carpenter
s that correct? Presumably in the current code it could lead to a Oops or something? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: erofs: harden inode lookup for 32-bit platforms

2018-10-11 Thread Dan Carpenter
On Thu, Oct 11, 2018 at 05:46:26PM +0800, Gao Xiang wrote: > > > On 2018/10/11 16:44, Dan Carpenter wrote: > > On Tue, Oct 09, 2018 at 10:07:13PM +0800, Gao Xiang wrote: > >> This patch introduces inode hash function, test and set callbacks, > >> and iget5_lock

Re: [PATCH] staging: erofs: harden inode lookup for 32-bit platforms

2018-10-11 Thread Dan Carpenter
On Thu, Oct 11, 2018 at 06:49:57PM +0800, Gao Xiang wrote: > Hi Dan, > > On 2018/10/11 18:18, Dan Carpenter wrote: > > On Thu, Oct 11, 2018 at 05:46:26PM +0800, Gao Xiang wrote: > >> > >> > >> On 2018/10/11 16:44, Dan Carpenter wrote: > >>&g

Re: [PATCH v2] staging: add nrf24 driver

2018-10-16 Thread Dan Carpenter
e); > + > + INIT_WORK(&device->isr_work, nrf24_isr_work_handler); > + INIT_KFIFO(device->tx_fifo); > + spin_lock_init(&device->lock); > + mutex_init(&device->tx_fifo_mutex); > + > + INIT_LIST_HEAD(&device->pipes); > + > + return device; > +} [ snip ] > +static ssize_t address_show(struct device *dev, > + struct device_attribute *attr, > + char *buf) > +{ > + struct nrf24_device *device = to_nrf24_device(dev->parent); > + u8 addr[16]; > + int ret; > + int count; > + int i; > + struct nrf24_pipe *pipe; > + > + pipe = nrf24_find_pipe_ptr(dev); > + if (IS_ERR(pipe)) > + return PTR_ERR(pipe); > + > + ret = nrf24_get_address(device->spi, pipe->id, addr); > + if (ret < 0) > + return ret; > + > + count = snprintf(buf, PAGE_SIZE, "0x"); > + for (i = --ret; i >= 0; i--) > + count += snprintf(buf + count, PAGE_SIZE, "%02X", addr[i]); ^^^ > + count += snprintf(buf + count, PAGE_SIZE, "\n"); ^^^ This isn't right. Use scnprintf(). The snprintf() function returns the nubmer of characters that would have been written if we had space. And it should be PAGE_SIZE - count. > + > + return count; > +} > + regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] Staging : Add RIFFA PCIe driver

2018-10-16 Thread Dan Carpenter
is staging and we will fix it, but I had wanted to read the Kconfig entry but it's not there... Anyway, this is a staging drive so we're not picky at all. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev

Re: [PATCH] staging: iio: adc: Add comments to prevent checks corrections

2018-10-16 Thread Dan Carpenter
n_v_m_v_scale_available, >in_voltage-voltage_scale_available, >0444, ad7192_show_scale_available, NULL, 0); No one will read that... :( It has to be on the same line. regards, dan carpenter ___ devel mail

Re: [PATCH 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-10-16 Thread Dan Carpenter
oid *in_msg, void > > *out_msg, int op) > > > > out->body.kvp_ip_val.dhcp_enabled = in->kvp_ip_val.dhcp_enabled; > > > > + __attribute__ ((fallthrough)); > > The comment should be sufficient for this, right? I haven't seen

Re: [PATCH 0/7] staging: vc04_services: Some dead code removal

2018-10-17 Thread Dan Carpenter
gt; https://github.com/raspberrypi/linux/tree/rpi-4.14.y/drivers/char/broadcom/vc_sm I feel like everyone else already knows the answer but why don't we just merge that code into staging? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2] staging: iio: ad7816: Switch to the gpio descriptor interface

2018-10-17 Thread Dan Carpenter
D_IN); > > + if (IS_ERR(chip->busy_pin)) { > > + ret = PTR_ERR(chip->busy_pin); > > + dev_err(&spi_dev->dev, "Failed to request busy GPIO: %d\n", > > + ret); > > return ret; > > } &g

Re: [PATCH] Staging iio/adc: fixes parenthesis alignment

2018-10-17 Thread Dan Carpenter
d an error handling bug and then I said, "Here is a bug, plus your label names are bad." When people have bad style but it doesn't lead to bugs then I let them get away with it. regards, dan carpenter ___ devel mailing list de...@li

Re: [PATCH V2 5/5] Tools: hv: kvp: Fix a warning of buffer overflow with gcc 8.0.1

2018-10-17 Thread Dan Carpenter
asic flow analysis would realize this was a false positive. We use at least three static analyzers which catch signedness bugs. Can we turn off GCC's warning on this until they improve it a bit? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[bug report] staging: mt7621-dma: ralink: add rt2880 dma engine

2018-10-18 Thread Dan Carpenter
tx_desc->flags |= HSDMA_DESC_LS0; ^^ Never initialized. 360 else 361 tx_desc->flags |= HSDMA_DESC_LS1; 362 363 /* rx desc */ 364 rx_idx = HSDMA_NEXT_DESC(chan->rx_idx); 365 l

Re: [PATCH 1/2] staging: iio: ad7606: Move out of staging

2018-10-18 Thread Dan Carpenter
t know the code very well). > + ad7606_reset(st); > + return -EIO; > + } > + > + data++; > + num--; > + } > + > + return st->bops->read_block(st->dev, num,

Re: [PATCH 1/2] staging: iio: ad7606: Move out of staging

2018-10-18 Thread Dan Carpenter
On Thu, Oct 18, 2018 at 07:19:36PM +0200, Lars-Peter Clausen wrote: > On 10/18/2018 02:55 PM, Dan Carpenter wrote: > > On Thu, Oct 18, 2018 at 12:10:32PM +0300, Stefan Popa wrote: > >> +static int ad7606_read_samples(struct ad7606_state *st) > >> +{ > >>

Re: [PATCH v3] staging: nrf24: add new driver for 2.4GHz radio transceiver

2018-10-18 Thread Dan Carpenter
Hi Marcin, Thank you for the patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Marcin-Ciupak/staging-nrf24-add-new-driver-for-2-4GHz-radio-transceiver/20181018-164230 smatch warnings: drivers/staging/nrf24/nrf24_if.c:538 nrf24_create_pipe() error: 'p->dev' d

Re: [PATCH 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-10-20 Thread Dan Carpenter
On Sat, Oct 20, 2018 at 04:42:07PM +0200, Miguel Ojeda wrote: > +On Wed, Oct 17, 2018 at 8:25 AM Dan Carpenter > wrote: > > > > It's not common at all. It should be wrapped in a macro and put into > > compiler.h. > > > > But I hope it does become ado

Re: [PATCH] staging: android: ion: Fixed uninitialized heap name access

2018-10-22 Thread Dan Carpenter
, I have added the check. > You keep saying uninitialized but you mean NULL. ion_carveout_heap_create() is never called so far as I can see so this isn't an issue in real life. It feels like it would be detected right away when that code was u

Re: [PATCH] staging: iio: adt7316: Switch to the gpio descriptor interface

2018-10-22 Thread Dan Carpenter
_pin); > + dev_err(dev, "Failed to request ldac GPIO: %d\n", > + ret); This can fit on one line: dev_err(dev, "Failed to request ldac GPIO: %d\n", ret); regards, dan carpenter > + return ret; > + }

Re: [PATCH v2] staging: mt7621-dma: Add braces around else branches

2018-10-24 Thread Dan Carpenter
patch so no one is very picky. There isn't a Fixes tag for this but if there were I add the person who wrote the original patch to the To header. Hopefully, they review and Ack my patch. I feel like that's very important. regards, dan carpenter __

Re: [PATCH] staging: comedi: ni_mio_common: scale ao INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS

2018-10-24 Thread Dan Carpenter
844f15de0e906be5333bfbbc8d). I feel like we should be using the Fixes tag for this. Like so: Fixes: 51fd36738383 ("staging: comedi: ni_mio_common: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS") Signed-off-by: Your regards, dan carpenter _

Re: [PATCH] staging: comedi: ni_mio_common: scale ao INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS

2018-10-24 Thread Dan Carpenter
On Wed, Oct 24, 2018 at 08:26:51AM -0600, Spencer Olson wrote: > On Wed, Oct 24, 2018 at 8:18 AM Dan Carpenter > wrote: > > > > On Wed, Oct 24, 2018 at 07:59:45AM -0600, Spencer E. Olson wrote: > > > Changes implementation of INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS

Re: [PATCH v2] staging: comedi: ni_mio_common: scale ao INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS

2018-10-24 Thread Dan Carpenter
That works. Thanks! regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: axis-fifo: Fix line over 80 characters error

2018-10-24 Thread Dan Carpenter
LE_TIMEOUT); The original was fine. Just leave it. Checkpatch.pl is only useful if it improves the readability for humans. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[bug report] staging: vc04_services: add vchiq_pagelist_info structure

2018-10-25 Thread Dan Carpenter
then when I look at it more, it's not clear to me if it matters that "pagelist->length" is out of sync with "num_pages"... Anyway, that's why I'm forwarding this static checker output to you instead of trying to fix it myself.

Re: [PATCH RFC 04/11] staging: vchiq_arm: Fix platform device unregistration

2018-10-26 Thread Dan Carpenter
for platform_device_register_data() errors in probe. That would be a better fix. This is obviously a bug, but is it a real life bug, btw? I would be surprised if platform_device_register_data() actually failed. regards, dan carpenter ___ devel mailing

Re: [PATCH RFC 06/11] staging: vchiq_arm: Register a platform device for audio

2018-10-26 Thread Dan Carpenter
> MAJOR(vchiq_devid), MINOR(vchiq_devid)); > > bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera"); > + bcm2835_audio = vchiq_register_child(pdev, "bcm2835_audio"); Same thing. Check here and not in the remove function. regards,

Re: [PATCH RFC 06/11] staging: vchiq_arm: Register a platform device for audio

2018-10-26 Thread Dan Carpenter
On Fri, Oct 26, 2018 at 11:09:31AM +0300, Dan Carpenter wrote: > On Thu, Oct 25, 2018 at 05:29:30PM +0200, Stefan Wahren wrote: > > Following Eric's commit 37b7b3087a2f ("staging/vc04_services: Register a > > platform device for the camera driver.") this register the

Re: [PATCH 2/4] stagign: wilc1000: validate cfg parameters before scheduling the work

2018-10-26 Thread Dan Carpenter
On Thu, Oct 25, 2018 at 09:11:00PM +, adham.aboza...@microchip.com wrote: You'll need to resend these because your email from header is in the wrong format. Also there is a typo in the subject. s/stagign/staging/. regards, dan carp

Re: [PATCH 5/6] staging:iio:ad2s90: Add IIO_CHAN_INFO_SCALE to channel spec and read_raw

2018-10-26 Thread Dan Carpenter
dding your S-o-B here as well because the patch is passing through your hands. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v3] driver-staging: vsoc.c: Add sysfs support for examining the permissions of regions.

2018-11-09 Thread Dan Carpenter
> + int ret; > + ssize_t written = 0; > + > + row = kzalloc(sizeof(char) * 128, GFP_KERNEL); > + if (!row) > + return 0; Don't allocate this, just snprintf() directly into the buffer. regards, dan carpenter _

[PATCH] media: cedrus: Fix a NULL vs IS_ERR() check

2018-11-26 Thread Dan Carpenter
The devm_ioremap_resource() function doesn't return NULL pointers, it returns error pointers. Fixes: 50e761516f2b ("media: platform: Add Cedrus VPU decoder driver") Signed-off-by: Dan Carpenter --- drivers/staging/media/sunxi/cedrus/cedrus_hw.c | 4 ++-- 1 file changed, 2 i

Re: [PATCH] staging: pi433: fix potential null dereference

2018-11-26 Thread Dan Carpenter
> + goto cdev_failed; > + } > device->cdev->owner = THIS_MODULE; > cdev_init(device->cdev, &pi433_fops); > retval = cdev_add(device->cdev, device->devt, 1); There is a second related bug here if we cdev_add() fa

Re: [PATCH v2 4/7] staging: mt7621-pci: fix reset lines for each pcie port

2018-11-26 Thread Dan Carpenter
t and deassert mean the opposite but I feel like this should be commented in the code as well or people reading this code will be very confused. Also it would be better if we could change this from a white list to a black list. In other words, if they were to come out with new revs of the hardw

Re: [PATCH v2 5/7] staging: mt7621-pci: avoid using clk_* operations

2018-11-26 Thread Dan Carpenter
't complain. Also you don't need to put a blank line between the Reported-by and the S-o-b. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 04/26] Staging: fbtft: flexfb: Switch to the gpio descriptor interface

2018-11-26 Thread Dan Carpenter
e checks as well in the same patch. Otherwise it breaks `git bisect`. (I don't know this code well. But it just feels like it has to be breaking git bisect just from from glancing at the patches. Perhaps I have misunderstood). regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: iio: adc: ad7280a: check for devm_kasprint() failure

2018-11-26 Thread Dan Carpenter
ev_attr.attr.name) It's slightly more readable that way. Keep in mind that we increment cnt++ in the middle of the loop so you'll have to update attr as well. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: iio: adc: ad7280a: check for devm_kasprint() failure

2018-11-26 Thread Dan Carpenter
On Mon, Nov 26, 2018 at 02:10:09PM +0100, Nicholas Mc Guire wrote: > On Mon, Nov 26, 2018 at 04:00:32PM +0300, Dan Carpenter wrote: > > On Mon, Nov 26, 2018 at 10:39:04AM +0100, Nicholas Mc Guire wrote: > > > devm_kasprintf() may return NULL on failure of internal allocat

Re: [PATCH] staging: pi433: add missing call to cdev_del()

2018-11-26 Thread Dan Carpenter
On Mon, Nov 26, 2018 at 06:53:55PM +0100, Michael Straube wrote: > If cdev_add() fails, cdev_del() should be called. > Add the missing cdev_del() call as pointed out by > Dan Carpenter. > > Signed-off-by: Michael Straube > --- > drivers/staging/pi433/pi433_if.c | 1 +

Re: [PATCH v2 4/7] staging: mt7621-pci: fix reset lines for each pcie port

2018-11-26 Thread Dan Carpenter
On Mon, Nov 26, 2018 at 08:57:09PM +0100, Sergio Paracuellos wrote: > On Mon, Nov 26, 2018 at 10:57 AM Dan Carpenter > wrote: > > > > On Sat, Nov 24, 2018 at 06:54:54PM +0100, Sergio Paracuellos wrote: > > > Depending of chip revision reset lines are inverted. It is a

Re: [PATCH v2] staging: pi433: add missing call to cdev_del()

2018-11-26 Thread Dan Carpenter
On Mon, Nov 26, 2018 at 07:18:20PM +0100, Michael Straube wrote: > If cdev_add() fails, cdev_del() should be called. > Add the missing cdev_del() call as pointed out by > Dan Carpenter. > > Signed-off-by: Michael Straube > --- Thanks! Looks good. rega

Re: [PATCH 2/2] staging: emxx_udc: Added a temporary variable with address.

2018-11-26 Thread Dan Carpenter
u32 *tmp; > + > + tmp = (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i); > + reg_data = _nbu2ss_readl(tmp); What problem are you trying to solve? Shouldn't it just be: reg_data = _nbu2ss_readl(IO_ADDRESS(USB_BASE_ADDRESS + i)); regards, dan carpenter _

Re: [PATCH v2 4/7] staging: mt7621-pci: fix reset lines for each pcie port

2018-11-26 Thread Dan Carpenter
On Tue, Nov 27, 2018 at 01:12:42PM +1100, NeilBrown wrote: > On Tue, Nov 27 2018, Dan Carpenter wrote: > > > On Mon, Nov 26, 2018 at 08:57:09PM +0100, Sergio Paracuellos wrote: > >> On Mon, Nov 26, 2018 at 10:57 AM Dan Carpenter > >> wrote: > >> > >

Re: [PATCH] staging: rtl8188eu: Fix off-by-one in core/rtw_mlme_ext.c

2018-11-27 Thread Dan Carpenter
ssocReqFail; 3266 } else { 3267 pstapriv->sta_aid[pstat->aid - 1] = pstat; ^^ So this is fine. 3268 DBG_88E("allocate new AID=

Re: [PATCH] staging: rtl8188eu: Fix off-by-one in core/rtw_mlme_ext.c

2018-11-27 Thread Dan Carpenter
true in the for > loop.  If the condition never satisfies, then there is an off-by-one > access in line 3267. > > If you can prove it, then the patch is unnecessary. > Ugh... Patch ef9209b642f isn't right. :( Do you want to send a patch to change that back to the way it w

Re: [PATCH] staging: rtl8188eu: Fix off-by-one in core/rtw_mlme_ext.c

2018-11-27 Thread Dan Carpenter
set in _rtw_init_sta_priv() or rtw_set_beacon(). You can see that it's <= MAX_STA. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH V5 00/10] x86/KVM/Hyper-v: Add HV ept tlb range flush hypercall support in KVM

2018-11-27 Thread Dan Carpenter
d? They didn't show up on driver-devel. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] Revert commit ef9209b642f "staging: rtl8723bs: Fix indenting errors and an off-by-one mistake in core/rtw_mlme_ext.c"

2018-11-27 Thread Dan Carpenter
Thanks! Reviewed-by: Dan Carpenter regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] scsi: vmw_pscsi: Rearrange code to avoid multiple calls to free_irq during unload

2018-11-27 Thread Dan Carpenter
ck trace. To solve the problem > pvscsi_shutdown_intr has been moved out of pvscsi_release_resources. > > Signed-off-by: Cathy Avery > Reviewed-by: Ewan D. Milne That bug has been there since the driver was introduced in 2009. It's so amazing that no one has fixed it until now..

Re: [PATCH] staging: rtl8723bs: Fix possible buffer overrun

2018-11-27 Thread Dan Carpenter
The original code is OK. On Wed, Nov 28, 2018 at 02:22:31AM +, Yang Xiao wrote: > From: Young Xiao > > In routine rtw_report_sec_ie(), the code could set the length > of the buffer to 256; however, that value is one larger than the > corresponding memory allocation. > > See commit 8b7a13c3f

Re: [PATCH] staging: rtl8712: Fix possible buffer overrun

2018-11-28 Thread Dan Carpenter
Thanks! Reviewed-by: Dan Carpenter regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 1/6] staging: rtl8188eu: use __func__ in hal8188e_rate_adaptive.c

2018-11-28 Thread Dan Carpenter
("odm_RateDown_8188E(): pRaInfo is NULL\n")); > + ("%s(): pRaInfo is NULL\n", __func__)); It pRaInfo is never NULL so this is dead code. A lot of this trace output could just be deleted. regards, dan carpenter

[bug report] staging: Import the BCM2835 MMAL-based V4L2 camera driver.

2018-11-29 Thread Dan Carpenter
x].component = component; 1643 spin_lock_init(&component->input[idx].slock); 1644 INIT_LIST_HEAD(&component->input[idx].buffers); 1645 ret = port_info_get(instance, &component->input[idx]); 1646

  1   2   3   4   5   6   7   8   9   10   >