Re: [PATCH v2 1/2] staging: rtl8192u: Add or remove spaces to fix style issues

2019-08-27 Thread Dan Carpenter
(priv->card_8192_version == VERSION_819XU_A || priv->card_8192_version == VERSION_819XU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */ Probably do this in a separate patch. It's sort of not really related to the other changes. re

Re: [PATCH] staging: vt6656: Use common error handling code in vnt_alloc_bufs()

2019-08-24 Thread Dan Carpenter
The original code is fine. There was no chance we were going to apply the patch so there is no need for any discussion. I don't know why Markus sent it when he knows. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http

Re: rtl8192u - meaning of TO_DO_LIST?

2019-08-23 Thread Dan Carpenter
d I verified > that it is the case. I can't find any comment or documentation about what > the goal of this "to do" item is. > > Does anybody know what this is there for? If not, does it make sense to > just go ahead and remove the code there? If the code is dead, just

Re: [PATCH] Staging: isdn/gigaset : Fix bare unsigned warnings and trailing lines errors

2019-08-22 Thread Dan Carpenter
5 characters for commit messages (like an email). regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: rtl8192u: remove redundant assignment to pointer crypt

2019-08-22 Thread Dan Carpenter
On Thu, Aug 22, 2019 at 09:46:09AM +0100, Colin King wrote: > From: Colin Ian King > > The pointer crypt is being set with a value that is never read, > the assignment is redundant and hence can be removed. > > Thanks to Dan Carpenter for sanity checking that this was

Re: Added Realtek rtl8192u driver to staging - static analysis report.

2019-08-22 Thread Dan Carpenter
ility |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY); 844 So let's leave it as-is, just delete the crypt assignment. If you want, you can send this patch and I can give you a Reviewed-by tag or if you want I can send the patch and give you Reported-by credit. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [RFC PATCH 15/15] drivers/acrn: add the support of offline SOS cpu

2019-08-19 Thread Dan Carpenter
if (cpu_possible(cpu)) { You can't pass unchecked cpu values to cpu_possible() or it results in an out of bounds read if cpu is >= than nr_cpu_ids. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [RFC PATCH 08/15] drivers/acrn: add VM memory management for ACRN char device

2019-08-19 Thread Dan Carpenter
potential security problem. Security matters for IoT... :( regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [RFC PATCH 11/15] drivers/acrn: add the support of handling emulated ioreq

2019-08-16 Thread Dan Carpenter
d); > + put_vm(vm); > + return -EINVAL; > + } > + > + client = acrn_ioreq_get_client(client_id); > + if (unlikely(!client)) { > + pr_err("failed to get the client.\n"); > + put_vm(vm); > +

Re: [RFC PATCH 10/15] drivers/acrn: add interrupt injection support

2019-08-16 Thread Dan Carpenter
lt; 0) { > + pr_err("acrn-dev: monitor intr data err=%ld\n", ret); > + return -EFAULT; > + } > + break; > + } > + regards, dan carpenter ___ devel mailing list

Re: [RFC PATCH 09/15] drivers/acrn: add passthrough device support

2019-08-16 Thread Dan Carpenter
> + if (ret < 0) { > + pr_err("acrn: failed to set intr info for ptdev!\n"); > + return -EFAULT; > + } > + > + break; > + } regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [RFC PATCH 08/15] drivers/acrn: add VM memory management for ACRN char device

2019-08-16 Thread Dan Carpenter
_order(page); > + > + ret = add_guest_map(vm, vm0_gpa, guest_gpa, pagesize); > + if (ret < 0) { > + pr_err("failed to add memseg for huge page!\n"); > + goto err; So then here, it would be: pr_

Re: [RFC PATCH 04/15] drivers/acrn: add the basic framework of acrn char device driver

2019-08-16 Thread Dan Carpenter
later on and it turns out we do. Fold the two patches together so that we don't have to review patches like this one. Each patch should do "one thing" which makes sense and can be reviewed independently. regards, dan carpenter ___

Re: [PATCH v2 1/2] binder: Add default binder devices through binderfs when configured

2019-08-09 Thread Dan Carpenter
On Wed, Aug 07, 2019 at 09:51:46AM -0700, Hridya Valsaraju wrote: > On Wed, Aug 7, 2019 at 4:02 AM Dan Carpenter wrote: > > > > On Tue, Aug 06, 2019 at 11:40:05AM -0700, Hridya Valsaraju wrote: > > > @@ -467,6 +466,9 @@ static int binderfs_fill_super(struct super_block &g

Re: [PATCH 10/10] staging: rtl8712: r8712_xmit_classifier(): Change return values and type

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

Re: [PATCH 07/10] staging: rtl8712: init_drv_sw(): Change return values

2019-08-08 Thread Dan Carpenter
someone addressed this in a later patch). It's better to "return 0;" here because that's clear without needing to read back a few lines to see what ret is. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://d

[bug report] staging: wilc1000: added support to dynamically add/remove interfaces

2019-08-08 Thread Dan Carpenter
if (tqe && (i < (WILC_VMM_TBL_SIZE - 1))) { regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: isdn: hysdn_procconf_init() remove parantheses from return value

2019-08-07 Thread Dan Carpenter
This driver is going to be deleted soon so we aren't accepting cleanups. Thanks! regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 3/6] staging: wilc1000: remove unused members

2019-08-07 Thread Dan Carpenter
On Tue, Aug 06, 2019 at 07:32:08PM +, adham.aboza...@microchip.com wrote: > Hi Dan > > On 8/6/19 5:46 AM, Dan Carpenter wrote: > > External E-Mail > > > > > > On Thu, Jul 25, 2019 at 09:31:34PM +, adham.aboza...@microchip.com > > wrote: >

Re: [PATCH v2 1/2] binder: Add default binder devices through binderfs when configured

2019-08-07 Thread Dan Carpenter
p before returning... The error handling code would probably be tricky to write though and it's not super common. > + name += len; > + if (*name == ',') > + name++; > + > + } > + > + return 0; > + Remove this extra blank

Re: [PATCH] Staging: rtl8188eu: core: rtw_security: tidy up crc32_init()

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

Re: [PATCH 3/6] staging: wilc1000: remove unused members

2019-08-06 Thread Dan Carpenter
On Thu, Jul 25, 2019 at 09:31:34PM +, adham.aboza...@microchip.com wrote: > From: Adham Abozaeid > > remove obtaining_ip from struct wilc_vif > How is this "unused"? It looks like it is used to me. regards, dan carpenter

Re: [PATCH] Staging: rtl8188eu: core: rtw_security: fixed a coding style issue

2019-08-06 Thread Dan Carpenter
e back one tab and it makes the function a lot more readable. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] rtl8712: rtl871x_ioctl_linux.c: fix unnecessary typecast

2019-08-06 Thread Dan Carpenter
this. You're not allowed to use floats in the kernel (because they make context switching slow). I could have sworn that we use the -nofp to stop the compile when people use floats but this compiles fine for me. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: isdn: remove unnecessary parentheses

2019-08-05 Thread Dan Carpenter
This driver is obselete so we're just keeping it around for a couple kernel releases and then deleting it. We're not taking cleanups for it. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http

Re: [PATCH] staging: pi433 line over 80 characters in multiple places

2019-08-05 Thread Dan Carpenter
The subject needs a colon after "pi433:" but also this change isn't really an improvement so far as readability goes. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailma

Re: [PATCH] Fix the following checkpatch warnings:

2019-08-05 Thread Dan Carpenter
The subject isn't right and I don't really feel that the change makes the code more beautiful to look at. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev

Re: [PATCH] Staging : rtl8188eu : rtw_security.c - Fixed warning: coding style issues - Fixed warning: if statement containing return with an else - Fixed check: coding style issues

2019-08-05 Thread Dan Carpenter
> goto free_crypto_private; Introduce an "int ret;" or something. ret = crypto_ops->set_key(); if (ret < 0) goto free_crypto_private; > @@ -201,16 +211,20 @@ void rtw_wep_encrypt(struct adapter *padapter, u8 > *pxmitframe) >

Re: [PATCH] staging: wilc1000: Merge memcpy + le32_to_cpus to get_unaligned_le32

2019-07-19 Thread Dan Carpenter
On Fri, Jul 19, 2019 at 05:01:33PM +0300, Dan Carpenter wrote: > On Fri, Jul 19, 2019 at 12:05:07PM +, ajay.kat...@microchip.com wrote: > > > > On 7/19/2019 5:16 PM, Chuhong Yuan wrote: > > > > > > 于2019年7月19日周五 下午7:34写道: > > >> &g

Re: [PATCH] staging: wilc1000: Merge memcpy + le32_to_cpus to get_unaligned_le32

2019-07-19 Thread Dan Carpenter
for different patches. > > > > These two patches are in the same subsystem and solve the same problem. > > I splitted them into two patches by mistake since I did not notice the > > problems > > in the second patch when I sent the first one. > > Should I merge

Re: [OSSNA] Intro to kernel hacking tutorial

2019-07-19 Thread Dan Carpenter
d everyone else is in my good books so that's fine. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 1/2] staging: rts5208: Rewrite redundant if statement to improve code style

2019-07-17 Thread Dan Carpenter
On Sun, Jun 30, 2019 at 04:12:44PM +0200, Tobias Nießen wrote: > Am 26.06.2019 um 16:56 schrieb Dan Carpenter: > > Both these patches seem fine. > > > > On Wed, Jun 26, 2019 at 04:28:56PM +0200, Tobias Nießen wrote: > >> This commit uses the fact that > >> &

Re: [PATCH 01/10] staging/rtl8723bs/hal: fix comparison to true/false is error prone

2019-06-29 Thread Dan Carpenter
You sent 10 patches with the same subject. Btw, I can't recall ever seeing a bug caused by a true false comparison. I agree on style principles with the checkpatch warning, but I do think it over states the risk (which is as far as I can see is zero). regards, dan carpenter

Re: [PATCH 29/31] staging: bcm2835-camera: Add sanity checks for queue_setup/CREATE_BUFS

2019-06-28 Thread Dan Carpenter
se patches look really nice. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 06/31] staging: bcm2835-camera: Return early on errors

2019-06-28 Thread Dan Carpenter
return ret; return 0; Or you can make the last check a little special if you want... return vchiq_mmal_port_enable(dev->instance, src, NULL); Either format is good. regards, dan carpenter ___

Re: [PATCH 01/31] staging: bcm2835-camera: Ensure H264 header bytes get a sensible timestamp

2019-06-28 Thread Dan Carpenter
ktime_t kernel_start_ts; > + /* Timestamp of last frame */ > + u64 last_timestamp; Not directly related to this patch but the indenting in this .h file is all higgle-piggledy. regards, dan carpenter ___ devel mailing list

Re: [PATCH] media: bcm2048: Macros with complex values should be enclosed in parentheses

2019-06-27 Thread Dan Carpenter
This breaks the build. :( regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] fbtft: Cleanup line over 80 character warnings

2019-06-27 Thread Dan Carpenter
Sorry, I don't feel like this makes it more readable. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] media: staging/imx: Fix NULL deref in find_pipeline_entity()

2019-06-27 Thread Dan Carpenter
evice(start)) { > - vfd = media_entity_to_video_device(pad->entity); > + vfd = media_entity_to_video_device(start); Can we also remove the "pad = NULL" assignment at the start of the function? Otherwise static checkers and new versions of GCC will warn that the assi

Re: [PATCH] staging: rtl8723bs: hal: sdio_halinit: Remove set but unused varilable pHalData

2019-06-27 Thread Dan Carpenter
d to delete one of those blank lines or it introduces a new checkpatch warning. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH V2] staging: bcm2835-camera: Restore return behavior of ctrl_set_bitrate()

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

Re: [PATCH 1/2] staging: rts5208: Rewrite redundant if statement to improve code style

2019-06-26 Thread Dan Carpenter
f tag to use as well or instead such as Co-Developed-by, Reviewed-by or Suggested-by. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 0/8] staging: kpc2000: style refactoring

2019-06-26 Thread Dan Carpenter
This is better. Reviewed-by: Dan Carpenter regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: comedi: use dma_mmap_coherent for DMA-able buffer mmap

2019-06-25 Thread Dan Carpenter
On Tue, Jun 25, 2019 at 02:21:41PM +0100, Ian Abbott wrote: > On 25/06/2019 12:47, Dan Carpenter wrote: > > On Tue, Jun 25, 2019 at 12:26:59PM +0100, Ian Abbott wrote: > > > + } else { > > > + for (i = 0; i < bm->n_pages; i++) { &g

Re: [PATCH 6/8] staging: kpc2000: introduce 'unsigned int'

2019-06-25 Thread Dan Carpenter
*rx_buf = transfer->rx_buf; > - unsignedlen = transfer->len; > + unsigned int len = transfer->len; This white space isn't correct. regards, dan carpenter ___ devel mailing lis

Re: [PATCH 4/8] staging: kpc2000: add spaces

2019-06-25 Thread Dan Carpenter
che >= 0)){ > + if ((idx == KP_SPI_REG_CONFIG) && (cs->conf_cache >= 0)) > return cs->conf_cache; > - } This doesn't match the patch description. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 1/8] staging: kpc2000: add line breaks

2019-06-25 Thread Dan Carpenter
ct spi_message *m) > dev_dbg(kpspi->dev, " transfer -EINVAL\n"); > return -EINVAL; > } > - if (transfer->speed_hz && (transfer->speed_hz < (KP_SPI_CLK >> > 15))) { > + if (transfer->speed_hz

Re: [PATCH] staging: comedi: use dma_mmap_coherent for DMA-able buffer mmap

2019-06-25 Thread Dan Carpenter
;virt_addr)); I think we need a NULL check here: if (!buf->virt_addr) continue; > free_page((unsigned long)buf->virt_addr); > } > } > @@ -57,7 +58,8 @@ static void __comedi_buf_free(struct comedi_device *dev, regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: bcm2835-camera: Restore return behavior of ctrl_set_bitrate()

2019-06-25 Thread Dan Carpenter
ing to find out why it's failing or otherwise we could add a comment. /* * FIXME: port_parameter_set() sometimes fails with * -MMAL_MSG_STATUS_EINVAL and we don't know why so we're * ignoring those errors for now. * */ return 0; regards, dan carpenter _

Re: [PATCH] staging: rtl8723bs: hal: hal_btcoex: Remove variables pHalData and pU1Tmp

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

Re: [PATCH] staging: kpc2000: simplify error handling in kp2000_pcie_probe

2019-06-19 Thread Dan Carpenter
taging code so the original code is just strange. Reviewed-by: Dan Carpenter > Also, this change was proposed by Dan Carpenter. Should I add anything > in the commit message to show this? There is a Suggested-by: tag for this, but don't resend because I don't care and I've already revi

Re: kernel BUG at drivers/android/binder_alloc.c:LINE! (4)

2019-06-18 Thread Dan Carpenter
It's weird that that binder_alloc_copy_from_buffer() is a void function. It would be easier to do the error handling at that point, instead of in the callers. It feels like we keep hitting similar bugs to this. regards, dan carpenter ___ devel mailing

Re: [Patch v2] staging: rtl8723bs: os_dep: ioctl_linux: make use of kzalloc

2019-06-18 Thread Dan Carpenter
The in_atomic() check is not accurate when preempt is disabled. In this code we are not in IRQ context and we are not holding any spin_locks so GFP_KERNEL is safe. regards, dan carpenter ___ devel mailing list de...@linuxd

Re: [PATCH] staging: iio: ad7150: use ternary operating to ensure 0/1 value

2019-06-17 Thread Dan Carpenter
- foo = (bar == baz) ? 1 : 0; + foo = (bar == baz); patches and I thought it was an improvement at the time... regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: use exact allocation for dma coherent memory

2019-06-17 Thread Dan Carpenter
;phys_addr = virt_to_phys(sq->queue); 136 dma_unmap_addr_set(sq, mapping, sq->dma_addr); 137 return 0; 138 } Is this a bug? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: rtl8723bs: os_dep: ioctl_linux: Make use rtw_zmalloc

2019-06-16 Thread Dan Carpenter
ndis_802_11_wep, KeyMaterial); > - pwep = rtw_malloc(wep_total_len); > + pwep = rtw_zmalloc(wep_total_len); We should not introduce new uses of rtw_malloc() or rtw_zmalloc(). They are buggy garbage. Use normall kmalloc() and kzalloc(). regards, da

Re: [PATCH V2 08/15] staging: unisys: visorhba: use sg helper to operate sgl

2019-06-13 Thread Dan Carpenter
a chained sg, which > is like a link pointer, then may cause trouble for driver. > So from a user perspective it results in an Oops? It would be really cool if you had the copy of the Oops btw so people could grep the git history for it. (You need to resend with the improved commit message).

Re: [PATCH 01/11] staging: rtl8723bs: core: Remove function eeprom_read_sz()

2019-06-13 Thread Dan Carpenter
On Thu, Jun 13, 2019 at 01:53:20PM +0530, Nishka Dasgupta wrote: > On 13/06/19 12:15 PM, Dan Carpenter wrote: > > On Wed, Jun 12, 2019 at 11:34:29PM +0530, Nishka Dasgupta wrote: > > > Remove unused function eeprom_read_sz. > > > Issue found with Coccinelle. > &g

Re: [PATCH 01/11] staging: rtl8723bs: core: Remove function eeprom_read_sz()

2019-06-13 Thread Dan Carpenter
patches have this problem as well so please check them and resend the whole set. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] media: imx7-media-csi: get csi upstream endpoint

2019-06-12 Thread Dan Carpenter
UX) > + src = >sd.entity; This would be easier to read if the white space were tweaked a little: if (src->function != MEDIA_ENT_F_VID_IF_BRIDGE && src->function != MEDIA_ENT_F_VID_MUX) src = >sd.ent

Re: [PATCH 2/2] staging: kpc2000: remove unnecessary comments in kp2000_pcie_probe

2019-06-12 Thread Dan Carpenter
p the Register BAR Greg, are we moving the C++ style comments? Linus is fine with them. I don't like them but whatever... > reg_bar_phys_addr = pci_resource_start(pcard->pdev, REG_BAR); > reg_bar_phys_len = pci_resource_len(pcard->pdev, R

Re: [PATCH 1/2] staging: kpc2000: improve label names in kp2000_pcie_probe

2019-06-12 Thread Dan Carpenter
Thanks! Reviewed-by: Dan Carpenter Not related to your patch (IOW ignore if you want to) the error handling is slightly more complicated than required: drivers/staging/kpc2000/kpc2000/core.c 356 * Step 4: Setup the Register BAR 357 */ 358 reg_bar_phys_addr

Re: [PATCH 1/2] staging: rtl8712: r8712_setdatarate_cmd(): Change

2019-06-10 Thread Dan Carpenter
On Mon, Jun 10, 2019 at 10:02:27AM +0530, Nishka Dasgupta wrote: > On 07/06/19 7:45 PM, Dan Carpenter wrote: > > Probably you sent this patch unintentionally. The subject doesn't make > > any sort of sense. :P > > So the problem with the subject line is that g

Re: [PATCH 2/2] staging: rtl8712: r8712_createbss_cmd(): Change

2019-06-07 Thread Dan Carpenter
check for 0 instead of _SUCCESS. > (Instead of !=0, simply passing the function output to the conditional ^^ > will do.) ^ Remove this line. Otherwise it looks ok. Please resend. rega

Re: [PATCH 1/2] staging: rtl8712: r8712_setdatarate_cmd(): Change

2019-06-07 Thread Dan Carpenter
if (ret) return ret; return 0; Or you could write it like: return r8712_setdatarate_cmd(padapter, datarates); Which ever one you prefer is fine. regards, dan carpenter ___ devel mailing list de...@linuxdrive

Re: [PATCH 3/7] media: cedrus: Fix decoding for some H264 videos

2019-06-06 Thread Dan Carpenter
edrus_write(dev, VE_H264_TRIGGER_TYPE, 0x3 | (current << 8)) ^^^ This should be "tmp << 8" instead of "current << 8" though. > > while (...) > >... > > > > curren

Re: [PATCH 7/7] staging: kpc2000: fix incorrect code comment in core.c

2019-06-06 Thread Dan Carpenter
532 pcard->regs_bar_base = NULL; Something like that is way more useful because then you don't have to scroll back and forth because new the label names are useful. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] Staging: emxx_udc: fix warning "sum of probable bitmasks, consider |"

2019-06-06 Thread Dan Carpenter
anything? > > > > thanks, > > > > greg k-h > > Ok . Treating this as false postive from coccicheck. I liked the patch. | is way more normal and readable than +. It's just the commit message was bogus. I would be very surprised if this coccicheck found anything that wasn't a compile time constant like this. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: comedi: Remove variable runflags

2019-05-31 Thread Dan Carpenter
Anyway, Greg was never going to apply this so it's not worth worrying about too much. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: kpc2000: replace bogus variable name in core.c

2019-05-31 Thread Dan Carpenter
On Wed, May 29, 2019 at 09:42:22PM +0200, Simon Sandström wrote: > "struct kp2000_regs temp" has nothing to do with temperatures, so > replace it with the more proper name "regs". > > Signed-off-by: Simon Sandström > --- Reviewed-by: Dan

Re: [PATCH] staging: rtl8712: ieee80211.c: Remove leading p from variable names

2019-05-31 Thread Dan Carpenter
On Fri, May 31, 2019 at 02:33:59AM +0530, Nishka Dasgupta wrote: > Remove leading p from the names of the following pointer variables: > - pregistrypriv > - pdev_network > - pie > - pbuf. > Issue found with Coccinelle. > > Signed-off-by: Nishka Dasgupta Reviewed-by: Dan

Re: [PATCH] staging: rtl8712: Replace function r8712_init_mlme_priv

2019-05-31 Thread Dan Carpenter
non-static) int, from static sint. > > Signed-off-by: Nishka Dasgupta > --- Reviewed-by: Dan Carpenter Looks good, thanks. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/ma

Re: [PATCH 3/4] staging: kpc2000: add missing spaces in core.c

2019-05-29 Thread Dan Carpenter
On Wed, May 29, 2019 at 05:54:19PM +0200, Simon Sandström wrote: > On Mon, May 27, 2019 at 10:31:59AM +0300, Dan Carpenter wrote: > > On Fri, May 24, 2019 at 01:08:01PM +0200, Simon Sandström wrote: > > > [..] > > > - ret = copy_to_user((void*)ioctl_param,

Re: [PATCH v2 2/2] staging: erofs: fix i_blocks calculation

2019-05-28 Thread Dan Carpenter
le32_to_cpu(v2->i_ctime_nsec); > > > > inode->i_size = le64_to_cpu(v2->i_size); > > + > > + /* total blocks for compressed files */ > > + if (vi->data_mapping_mode == EROFS_INODE_LAYOUT_COMPRESSION) > > +

Re: [PATCH 3/4] staging: kpc2000: add missing spaces in core.c

2019-05-27 Thread Dan Carpenter
if (copy_to_user((void __user *)ioctl_param, , sizeof(temp))) return -EFAULT; temp is really the wrong name. "temp" is for temperatures. "tmp" means temporary. But also "tmp" is wrong h

Re: [PATCH] staging: kpc2000: simplify nested conditionals that just return a boolean.

2019-05-25 Thread Dan Carpenter
return (interrupt_active & irq_check_mask) && > +(interrupt_mask_inv & irq_check_mask); Yeah. I would prefer this. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: ks7010: Remove initialisation

2019-05-24 Thread Dan Carpenter
mpletely and just use "ret" instead. No need for two variables. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging/gasket: Fix string split

2019-05-23 Thread Dan Carpenter
On Thu, May 23, 2019 at 05:11:56PM +0200, 李天正 wrote: > Hello, > we are doing a project in the university and we cooperated to make this > patch. Some warnings are found by Mr.Zhang. Use the Reported-by to show who found the bug or Co-developed-by: if you both wrote code. regards, dan

Re: [PATCH] staging: fieldbus: anybuss: Remove unnecessary variables

2019-05-23 Thread Dan Carpenter
ce ABI. It requires >verification/sign-off by multiple users. > > Contact: Sven Van Asbroeck Sven, you should add yourself to the MAINTAINERS file. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: rtl8723bs: Add missing blank lines

2019-05-22 Thread Dan Carpenter
memcpy(adapter->mlmepriv.roam_tgt_addr, addr, ETH_ALEN); If num != 6 then return -EINVAL; 387 388 DBG_871X("set roam_tgt_addr to "MAC_FMT"\n", MAC_ARG(adapter->mlmepriv.roam_tgt_addr)); 389 } 390 391 return c

Re: [PATCH] staging: rtl8192u: Remove an unnecessary NULL check

2019-05-22 Thread Dan Carpenter
member, obviously. > > and usually I trust -Wpointer-bool-conversion, but > > this is a special case because of the flexible array member: Nah. It's the same thing. That patch is fine. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: rtl8192u: Remove an unnecessary NULL check

2019-05-22 Thread Dan Carpenter
t would have pointed out the comparison against NULL is also false: > Heh. Weird. Why would people disable one and not the other? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging/gasket: Fix string split

2019-05-21 Thread Dan Carpenter
y? Reviewed-by? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: fieldbus: anybuss: force address space conversion

2019-05-21 Thread Dan Carpenter
gt; static int read_reg_bus(void *context, unsigned int reg, > unsigned int *val) > { > - void __iomem *base = context; > + void __iomem *base = (__force void __iomem *)context; There is no need to use __force. Just: void __iomem *base =

Re: [PATCH v3] staging: fieldbus: core: fix ->poll() annotation

2019-05-21 Thread Dan Carpenter
ded __poll_t > constants (EPOLLxxx). > > Signed-off-by: Oscar Gomez Fuente > --- If you're resending someone's patch, you have to add your own Signed off by line as well. Everyone who touches a patch has to sign that they didn't add any of SCO's all powerful UnixWare source code int

Re: [PATCH v3 3/6] staging: kpc2000: simplified kp2000_device retrieval in device attributes call-backs.

2019-05-21 Thread Dan Carpenter
); > > if (!pcard) > return -ENODEV; > > that is IF the driver really is setting the pci dev data to NULL when > the device is removed from the driver. Is it? Yes. The pci_get_drvdata() is only set to NULL after

Re: [PATCH] staging: rtl8723bs: core: rtw_recv: fix warning Comparison to NULL

2019-05-16 Thread Dan Carpenter
th to sta =" MAC_FMT " for the > reason(7)\n", MAC_ARG(pattrib->src)); > regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2 0/5] staging: kpc2000: assorted fixes

2019-05-15 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 3/5] staging: kpc2000: added designated initializers to two structs.

2019-05-15 Thread Dan Carpenter
On Wed, May 15, 2019 at 02:09:49PM +0300, Dan Carpenter wrote: > On Wed, May 15, 2019 at 11:34:52AM +0100, Jeremy Sowden wrote: > > Fixed the following two sparse warnings by using designated > > initializers: > > > > drivers/staging/kpc2000/kpc2000/cell_probe.c:1

Re: [PATCH 3/5] staging: kpc2000: added designated initializers to two structs.

2019-05-15 Thread Dan Carpenter
going to fix it up later in the patch series, perhaps but that's not how it's done. Each patch should do "one thing", not "half and thing and then half a thing later in the series possibly (I am reviewing the patches in order so I don't know)". regards, dan carpenter __

[PATCH] staging: kpc2000: double unlock in error handling in kpc_dma_transfer()

2019-05-15 Thread Dan Carpenter
The goto err_descr_too_many; calls unlock_engine() so this unlocks twice. Fixes: 7df95299b94a ("staging: kpc2000: Add DMA driver") Signed-off-by: Dan Carpenter --- drivers/staging/kpc2000/kpc_dma/fileops.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/kpc20

[PATCH] staging: wilc1000: Fix some double unlock bugs in wilc_wlan_cleanup()

2019-05-15 Thread Dan Carpenter
If ->hif_read_reg() or ->hif_write_reg() fail then the code unlocks and keeps executing. It should just return. Fixes: c5c77ba18ea6 ("staging: wilc1000: Add SDIO/SPI 802.11 driver") Signed-off-by: Dan Carpenter --- drivers/staging/wilc1000/wilc_wlan.c | 8 ++-- 1 file chang

[PATCH] staging: vc04_services: prevent integer overflow in create_pagelist()

2019-05-15 Thread Dan Carpenter
I have added an integer overflow check for that as well. The Raspberry PI doesn't offer the same level of memory protection that x86 does so these sorts of bugs are probably not super critical to fix. Fixes: 71bad7f08641 ("staging: add bcm2708 vchiq driver") Signed-off-by: Dan Car

Re: [PATCH V2 1/5] Staging: rtl8192u: ieee80211: Fix coding style warning

2019-05-14 Thread Dan Carpenter
t; So please just resend this whole thing, in a threaded email series (such > > that they are all grouped together. You are sending these as individual > > emails, and so email clients do not link them, making them harder to > > manage :( > > > > thanks, > >

Re: [PATCH 5/5] Staging: rtl8192u: ieee80211: Use !x in place of NULL comparison

2019-05-13 Thread Dan Carpenter
*crypt) || (*crypt)->ops != ops) { ^ ^ Please don't add these parentheses. > struct ieee80211_crypt_data *new_crypt; > > ieee80211_crypt_delayed_deinit(ieee, crypt); regards, dan carpenter _

Re: [PATCH 3/5] Staging: rtl8192u: ieee80211: Fix coding style errors

2019-05-13 Thread Dan Carpenter
= WME_AC_BK; > - } > + Or here. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 1/5] Staging: rtl8192u: ieee80211: Fix coding style warning

2019-05-13 Thread Dan Carpenter
gt;dev,beacon,>current_network); > - } > + > } We don't want the blank line. Just delete the '}' regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH] Staging: vc04_services: Fix a couple error codes

2019-05-13 Thread Dan Carpenter
These are accidentally returning positive EINVAL instead of negative -EINVAL. Some of the callers treat positive values as success. Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") Signed-off-by: Dan Carpenter --- drivers/staging/vc04_services/bcm2

Re: [PATCH v3 1/8] Staging: kpc2000: kpc_dma: Resolve trailing whitespace error reported by checkpatch

2019-05-13 Thread Dan Carpenter
2000/kpc_dma/kpc_dma_driver.c | 46 +++ > .../staging/kpc2000/kpc_dma/kpc_dma_driver.h | 16 +-- > 4 files changed, 131 insertions(+), 131 deletions(-) > regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driv

Re: [PATCH] drivers: staging :rtl8723bs :os_dep Remove Unneeded variable ret

2019-05-13 Thread Dan Carpenter
Please "drivers" out of the subject line. We know it's drivers, so that doesn't add any information. The "staging: " bit tells you which git tree this path is in, and the "rtl8723bs: " tells you which driver it is. regards, dan carpenter ___

<    3   4   5   6   7   8   9   10   11   12   >