TODO advice for octeon-usb?

2019-05-20 Thread Aaro Koskinen
Hi, I'm looking for input what should be done next to get drivers/staging/octeon-usb out of staging. Thousands of checkpatch errors/warnings have been fixed (starting point was ), also the size of the driver has shrunken considerably.

[PATCH v4 6/8] staging: kpc2000: use IDA to assign card numbers.

2019-05-20 Thread Jeremy Sowden
Previously the next card number was assigned from a static int local variable. Replaced it with an IDA. Avoids the assignment of ever- increasing card-numbers by allowing them to be reused. Updated TODO. Corrected format-specifier for unsigned pcard->card_num. Signed-off-by: Jeremy Sowden

[PATCH v4 8/8] staging: kpc2000: removed superfluous NULL checks from device attribute call-backs.

2019-05-20 Thread Jeremy Sowden
All the attribute show call-backs check whether pcard is NULL. However, pci_set_drvdata(pdev, pcard) is called before the sysfs files are created during probe, and pci_set_drvdata(pdev, NULL) is not called until after they are destroyed during remove; therefore, pcard will not be NULL, and we can

[PATCH v4 3/8] staging: kpc2000: improved formatting of core.c.

2019-05-20 Thread Jeremy Sowden
* Indented with tabs. * Broke lines over 80 columns where possible. * Removed braces from one-statement blocks. * Tidied up some comments. * Removed multiple blank lines. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 810 ++--- 1 file

[PATCH v4 4/8] staging: kpc2000: added a helper to get struct kp2000_device from struct device.

2019-05-20 Thread Jeremy Sowden
The attribute call-backs all use the same code to get the pcard from dev: struct pci_dev *pdev = to_pci_dev(dev); struct kp2000_device *pcard; if (!pdev) return -ENXIO; pcard = pci_get_drvdata(pdev); if (!pcard) return -ENXIO; Added a function to reduce the duplicated code.

[PATCH v4 5/8] staging: kpc2000: added separate show functions for readable kp device attributes, defined them as read-only, and declared them static.

2019-05-20 Thread Jeremy Sowden
Defineed separate simple show functions for each attribute instead of having a one big one containing a chain of conditionals. Replaced calls to scnprintf with sprintf since all the outputs are single integers. All the readable device attributes are read-only, so used DEVICE_ATTR_RO to define

[PATCH v4 2/8] staging: kpc2000: removed two kpc_uio_class device attributes.

2019-05-20 Thread Jeremy Sowden
The show functions of two attributes output nothing and they are unused. Removed them. Signed-off-by: Jeremy Sowden Reported-by: Matt Sickler --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 16 1 file changed, 16 deletions(-) diff --git

[PATCH v4 7/8] staging: kpc2000: simplified kp2000_device retrieval in device attribute call-backs.

2019-05-20 Thread Jeremy Sowden
All the call-backs used the same formula to retrieve the pcard from dev: struct pci_dev *pdev = to_pci_dev(dev); struct kp2000_device *pcard; if (!pdev) return NULL; pcard = pci_get_drvdata(pdev); Since to_pci_dev is a wrapper for container_of, it will not return NULL, and since

git-send-email cock-up [Was: Re: [PATCH v3 0/6] staging: kpc2000: another batch of fixes]

2019-05-20 Thread Jeremy Sowden
I've mucked up sending out v4 of this series. Please ignore the messages I just sent. I'll send the right ones out as v5 shortly. Sorry for the noise. J. signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org

Re: [PATCH] staging: fieldbus: solve warning incorrect type dev_core.c

2019-05-20 Thread Oscar Gomez Fuente
Hi Sven, Yes. Oscar Gomez Fuente Óscar Gómez Fuente Electronic Engineer & Degree in Physical Sciences Mobile: 659.28.97.90 Email: oscargom...@gmail.com Website: www.oscargomezf.com On Mon, 20 May 2019 at 21:39, Sven Van Asbroeck wrote: > > On Mon, May 20, 2019 at 2:35 PM Sven Van Asbroeck

[PATCH 1/8] staging: kpc2000: added separate show functions for kpc_uio_class device attributes, defined them as read-only and declared them static.

2019-05-20 Thread Jeremy Sowden
Defined separate simple show functions for each attribute instead of having a one big one containing a chain of conditionals. Replaced scnprintf calls with sprintf since all the outputs are short bounded strings or single integers. All of the device attributes are read-only, so used

[PATCH 7/8] staging: kpc2000: simplified kp2000_device retrieval in device attribute call-backs.

2019-05-20 Thread Jeremy Sowden
All the call-backs used the same formula to retrieve the pcard from dev: struct pci_dev *pdev = to_pci_dev(dev); struct kp2000_device *pcard; if (!pdev) return NULL; pcard = pci_get_drvdata(pdev); Since to_pci_dev is a wrapper for container_of, it will not return NULL, and since

[PATCH 8/8] staging: kpc2000: removed superfluous NULL checks from device attribute call-backs.

2019-05-20 Thread Jeremy Sowden
All the attribute show call-backs check whether pcard is NULL. However, pci_set_drvdata(pdev, pcard) is called before the sysfs files are created during probe, and pci_set_drvdata(pdev, NULL) is not called until after they are destroyed during remove; therefore, pcard will not be NULL, and we can

[PATCH 6/8] staging: kpc2000: use IDA to assign card numbers.

2019-05-20 Thread Jeremy Sowden
Previously the next card number was assigned from a static int local variable. Replaced it with an IDA. Avoids the assignment of ever- increasing card-numbers by allowing them to be reused. Updated TODO. Corrected format-specifier for unsigned pcard->card_num. Signed-off-by: Jeremy Sowden

[PATCH 3/8] staging: kpc2000: improved formatting of core.c.

2019-05-20 Thread Jeremy Sowden
* Indented with tabs. * Broke lines over 80 columns where possible. * Removed braces from one-statement blocks. * Tidied up some comments. * Removed multiple blank lines. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 810 ++--- 1 file

[PATCH 4/8] staging: kpc2000: added a helper to get struct kp2000_device from struct device.

2019-05-20 Thread Jeremy Sowden
The attribute call-backs all use the same formula to get the pcard from dev: struct pci_dev *pdev = to_pci_dev(dev); struct kp2000_device *pcard; if (!pdev) return -ENXIO; pcard = pci_get_drvdata(pdev); if (!pcard) return -ENXIO; Added a function to reduce the duplicated code.

[PATCH v4 0/8] staging: kpc2000: another batch of fixes

2019-05-20 Thread Jeremy Sowden
There are a number relating to device attributes, one formatting patch, and another that changes how card numbers are assigned. Greg reckoned that the changes to the code in the attribute call-backs that gets the struct kpc2000 object from the struct device object were broken. I've reviewed them

[PATCH 5/8] staging: kpc2000: added separate show functions for readable kp device attributes, defined them as read-only, and declared them static.

2019-05-20 Thread Jeremy Sowden
Defineed separate simple show functions for each attribute instead of having a one big one containing a chain of conditionals. Replaced calls to scnprintf with sprintf since all the outputs are single integers. All the readable device attributes are read-only, so used DEVICE_ATTR_RO to define

[PATCH 2/8] staging: kpc2000: removed two kpc_uio_class device attributes.

2019-05-20 Thread Jeremy Sowden
The show functions of two attributes output nothing and they are unused. Removed them. Signed-off-by: Jeremy Sowden Reported-by: Matt Sickler --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 16 1 file changed, 16 deletions(-) diff --git

[PATCH v4 1/8] staging: kpc2000: added separate show functions for kpc_uio_class device attributes, defined them as read-only and declared them static.

2019-05-20 Thread Jeremy Sowden
Defined separate simple show functions for each attribute instead of having a one big one containing a chain of conditionals. Replaced scnprintf calls with sprintf since all the outputs are short bounded strings or single integers. All of the device attributes are read-only, so used

Re: [PATCH] staging: fieldbus: solve warning incorrect type dev_core.c

2019-05-20 Thread Sven Van Asbroeck
On Mon, May 20, 2019 at 2:35 PM Sven Van Asbroeck wrote: > > Hi Oscar, thank you for your contribution! I have a question, see inline. > > On Fri, May 17, 2019 at 1:50 PM Oscar Gomez Fuente > wrote: > > > > These changes solve a warning realated to an incorrect type inilizer in the > > function

Re: [PATCH] staging: fieldbus: solve warning incorrect type dev_core.c

2019-05-20 Thread Sven Van Asbroeck
Hi Oscar, thank you for your contribution! I have a question, see inline. On Fri, May 17, 2019 at 1:50 PM Oscar Gomez Fuente wrote: > > These changes solve a warning realated to an incorrect type inilizer in the > function > fieldbus_poll. > Where is this warning generated? Could you provide

[PATCH] Staging: rtl8192u: ieee80211: Fix if-else coding style issue

2019-05-20 Thread Puranjay Mohan
Fix following checkpatch.pl warning by adding braces around if statement: CHECK: braces {} should be used on all arms of this statement Signed-off-by: Puranjay Mohan --- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH] Staging: rtl8188eu: core: Remove else after break

2019-05-20 Thread Puranjay Mohan
Remove else after break statements to fix following checkpatch.pl warnings: WARNING: else is not generally useful after a break or return. Signed-off-by: Puranjay Mohan --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 26 +++ 1 file changed, 12 insertions(+), 14 deletions(-)

[PATCH 2/7] staging: vt6656: clean function's error path in usbpipe.c

2019-05-20 Thread Quentin Deslandes
Avoid discarding called function's returned value. Store it instead in order to act accordingly. Update error path to return 0 on success and a negative errno value on error. Signed-off-by: Quentin Deslandes --- drivers/staging/vt6656/usbpipe.c | 115 +--

[PATCH 6/7] staging: vt6656: clean-up registers initialization error path

2019-05-20 Thread Quentin Deslandes
Avoid discarding function's return code during register initialization. Handle it instead and return 0 on success or a negative errno value on error. Signed-off-by: Quentin Deslandes --- drivers/staging/vt6656/main_usb.c | 163 ++ 1 file changed, 96 insertions(+), 67

[PATCH 0/7] staging: vt6656: clean-up error path on init

2019-05-20 Thread Quentin Deslandes
This patchset aims to cleanup vt6656 driver's error path during the initialization process. During a call to vnt_start(), none of the functions called would return a meaningful error code nor handle the one returned from the functions they call themselves. The first patch of the series fixes a

[PATCH 5/7] staging: vt6656: use meaningful error code during buffer allocation

2019-05-20 Thread Quentin Deslandes
Check on called function's returned value for error and return 0 on success or a negative errno value on error instead of a boolean value. Signed-off-by: Quentin Deslandes --- drivers/staging/vt6656/main_usb.c | 42 --- 1 file changed, 28 insertions(+), 14

[PATCH 4/7] staging: vt6656: clean error path for firmware management

2019-05-20 Thread Quentin Deslandes
Avoid discarding return value of functions called during firmware management process. Handle such return value and return 0 on success or a negative errno value on error. Signed-off-by: Quentin Deslandes --- drivers/staging/vt6656/firmware.c | 91 ++- 1 file changed,

[PATCH 3/7] staging: vt6656: avoid discarding called function's return code

2019-05-20 Thread Quentin Deslandes
Change some of the driver's functions in order to handle error codes instead of discarding them. These function now returns 0 on success and a negative errno value on error. Signed-off-by: Quentin Deslandes --- drivers/staging/vt6656/baseband.c | 130 --

[PATCH 7/7] staging: vt6656: manage error path during device initialization

2019-05-20 Thread Quentin Deslandes
Check for error during device initialization callback and return a meaningful error code or zero on success. Signed-off-by: Quentin Deslandes --- drivers/staging/vt6656/main_usb.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git

[PATCH 1/7] staging: vt6656: fix potential NULL pointer dereference

2019-05-20 Thread Quentin Deslandes
vnt_free_tx_bufs() relies on priv->tx_context elements to be NULL if they are not initialized (as vnt_free_rx_bufs() does). Add a check to these elements in order to avoid NULL pointer dereference. Signed-off-by: Quentin Deslandes --- drivers/staging/vt6656/main_usb.c | 3 +++ 1 file changed, 3

[PATCH] staging: pi433: fix misspelling of packet

2019-05-20 Thread Yannick Loeck
Fixes the misspelling of packet in Signed-off-by: Yannick Loeck --- drivers/staging/pi433/rf69.c | 4 ++-- drivers/staging/pi433/rf69_registers.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index

Re: [PATCH 10/10] docs: fix broken documentation links

2019-05-20 Thread Wolfram Sang
On Mon, May 20, 2019 at 11:47:39AM -0300, Mauro Carvalho Chehab wrote: > Mostly due to x86 and acpi conversion, several documentation > links are still pointing to the old file. Fix them. > > Signed-off-by: Mauro Carvalho Chehab Thanks, didn't notice that. >

[PATCH 10/10] docs: fix broken documentation links

2019-05-20 Thread Mauro Carvalho Chehab
Mostly due to x86 and acpi conversion, several documentation links are still pointing to the old file. Fix them. Signed-off-by: Mauro Carvalho Chehab --- Documentation/acpi/dsd/leds.txt | 2 +- Documentation/admin-guide/kernel-parameters.rst | 6 +++---

WARNING in binder_transaction_buffer_release

2019-05-20 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:72cf0b07 Merge tag 'sound-fix-5.2-rc1' of git://git.kernel.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=17c7d4bca0 kernel config: https://syzkaller.appspot.com/x/.config?x=d103f114f9010324

Re: [RESEND PATCH] staging: iio: ad7192: create of_device_id array

2019-05-20 Thread Alexandru Ardelean
On Sun, May 19, 2019 at 8:53 PM Jonathan Cameron wrote: > > On Sat, 18 May 2019 19:44:35 -0300 > Bárbara Fernandes wrote: > I don't have anything else on top of what Jonathan added. Acked-by: Alexandru Ardelean CC-ing my work-email There are some issues with it and mailing lists; I'll

Re: [PATCH 2/2] staging: iio: ad2s1210: Add devicetree yaml doc

2019-05-20 Thread Alexandru Ardelean
On Sun, May 19, 2019 at 8:18 PM Jonathan Cameron wrote: > > On Sat, 18 May 2019 19:15:58 -0300 > Tallys Martins wrote: > CC-ing my work-email There are some issues with it and mailing lists; I'll hopefully sort them out in the next weeks. > > The driver currently has no devicetree

Re: [PATCH] staging:iio:ad7150: fix threshold mode config bit

2019-05-20 Thread Alexandru Ardelean
On Sun, May 19, 2019 at 8:38 PM Jonathan Cameron wrote: > > On Sat, 18 May 2019 22:04:56 -0300 > Melissa Wen wrote: > > > According to the AD7150 configuration register description, bit 7 assumes > > value 1 when the threshold mode is fixed and 0 when it is adaptive, > > however, the operation

Re: [RESEND PATCH] staging: iio: adt7316: create of_device_id array

2019-05-20 Thread Alexandru Ardelean
On Sun, May 19, 2019 at 8:54 PM Jonathan Cameron wrote: > > On Sat, 18 May 2019 19:43:33 -0300 > Bárbara Fernandes wrote: > > > Create structure of type of_device_id in order to register all devices > > the driver is able to manage. > > > > Signed-off-by: Bárbara Fernandes > > Signed-off-by:

Re: [Patch v2] staging: rtl8723bs: hal: odm_HWConfig: odm_HWConfig: Unneeded variable: "result". Return "HAL_STATUS_SUCCESS"

2019-05-20 Thread Greg Kroah-Hartman
On Sun, May 19, 2019 at 10:57:24PM +0530, Hariprasad Kelam wrote: > This patch fixes below warnings reported by coccicheck > > drivers/staging/rtl8723bs/hal/odm_HWConfig.c:501:4-10: Unneeded > variable: "result". Return "HAL_STATUS_SUCCESS" on line 526 > > Signed-off-by: Hariprasad Kelam >

Re: [PATCH] staging: rtl8723bs: core: rtw_mlme_ext: fix warning Unneeded variable: "ret"

2019-05-20 Thread Greg Kroah-Hartman
On Sun, May 19, 2019 at 10:42:27PM +0530, Hariprasad Kelam wrote: > This patch fixes below warnings reported by coccicheck > > drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1888:14-17: Unneeded > variable: "ret". Return "_FAIL" on line 1920 > drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:466:5-8:

Re: [PATCH] staging: rtl8723bs: os_dep: os_intfs: fix warning Unneeded variable: "status". Return "_SUCCESS"

2019-05-20 Thread Greg Kroah-Hartman
On Sun, May 19, 2019 at 10:27:58PM +0530, Hariprasad Kelam wrote: > This patch fixes below warnings reported by coccicheck > > drivers/staging/rtl8723bs/os_dep/os_intfs.c:228:6-12: Unneeded variable: > "status". Return "_SUCCESS" on line 333 > drivers/staging/rtl8723bs/os_dep/os_intfs.c:607:4-7:

Re: [PATCH] staging: rtl8723bs: core: rtw_ap: fix Unneeded variable: "ret". Return "0"

2019-05-20 Thread Greg Kroah-Hartman
On Sun, May 19, 2019 at 10:14:45PM +0530, Hariprasad Kelam wrote: > This patch fixes below warnings reported by coccicheck > > drivers/staging/rtl8723bs/core/rtw_ap.c:1400:5-8: Unneeded variable: > "ret". Return "0" on line 1441 > drivers/staging/rtl8723bs/core/rtw_ap.c:2195:5-8: Unneeded

Re: [PATCH] Staging: rtl8723bs: os_dep: Remove unneeded variable for return

2019-05-20 Thread Greg KH
On Sat, May 18, 2019 at 12:22:47PM +0530, Puranjay Mohan wrote: > Remove unneeded variable "ret" and directly return 0 in functions. > Fix following coccicheck warning: > Unneeded variable: "ret". Return "0". > > Signed-off-by: Puranjay Mohan > --- >

Re: [PATCH] staging: iio: ad9832: Add device tree support

2019-05-20 Thread Alexandru Ardelean
On Sun, May 19, 2019 at 8:17 PM Jonathan Cameron wrote: > > On Sat, 18 May 2019 17:48:25 -0300 > João Seckler wrote: > > > Add a of_device_id struct variable and subsequent call to > > MODULE_DEVICE_TABLE macro to support device tree. > > > > Signed-off-by: João Seckler > > Signed-off-by:

Re: [PATCH v1 5/6] staging: rtl8723bs: use help instead of ---help--- in Kconfig

2019-05-20 Thread Greg KH
On Sat, May 18, 2019 at 12:03:40PM +0530, Moses Christopher wrote: > - Resolve the following warning from the Kconfig, > "WARNING: prefer 'help' over '---help---' for new help texts" > > Signed-off-by: Moses Christopher > --- > drivers/staging/rtl8723bs/Kconfig | 2 +- > 1 file changed, 1

[PATCH v2 4/7] staging: kpc2000: move the spi driver out of its subdirectory

2019-05-20 Thread Greg Kroah-Hartman
There is no need for a subdirectory for just a single .c file. So move it out of kpc_spi/ and rename it to the module name that we want the file to build to, saving one more linking stage. Cc: Matt Sickler Signed-off-by: Greg Kroah-Hartman --- v2: no changes drivers/staging/kpc2000/Makefile

[PATCH v2 6/7] staging: kpc2000: dma_common_defs.h: remove unused inline functions

2019-05-20 Thread Greg Kroah-Hartman
The functions GetBackEndStatus() and BackEndControlSetClear() are never used by any code, so just remove them. Cc: Matt Sickler Signed-off-by: Greg Kroah-Hartman --- v2: no changes drivers/staging/kpc2000/kpc2000/dma_common_defs.h | 14 -- 1 file changed, 14 deletions(-) diff

[PATCH v2 7/7] staging: kpc2000: remove SetBackEndControl() function

2019-05-20 Thread Greg Kroah-Hartman
As this is only called twice, just call writel() like a normal driver should :) At the same time, clean up the formatting for the irq handler, as there is no need to have that be incorrect, it just hurts the eyes... Cc: Matt Sickler Signed-off-by: Greg Kroah-Hartman --- v2: no changes

[PATCH v2 5/7] staging: kpc2000: move the i2c driver out of its subdirectory

2019-05-20 Thread Greg Kroah-Hartman
There is no need for a subdirectory for just a single .c file. So move it out of kpc_i2c/ and rename it to the module name that we want the file to build to, saving one more linking stage. Cc: Matt Sickler Signed-off-by: Greg Kroah-Hartman --- v2: no changes drivers/staging/kpc2000/Makefile

[PATCH v2 1/7] staging: kpc2000: remove fileops.c file.

2019-05-20 Thread Greg Kroah-Hartman
The fileops.c file does not need to be stand-alone, so move it into the core.c file. This lets us make some functions static, reducing the global namespace of the driver. Cc: Matt Sickler Signed-off-by: Greg Kroah-Hartman --- v2: fix kbuild issues drivers/staging/kpc2000/kpc2000/Makefile |

[PATCH v2 3/7] staging: kpc2000: remove spi_parts.h

2019-05-20 Thread Greg Kroah-Hartman
The structures defined in spi_parts.h belong in the .c file that uses it. So move it directly into spi_driver.c to make things simpler to manage. Cc: Matt Sickler Signed-off-by: Greg Kroah-Hartman --- v2: no changes drivers/staging/kpc2000/kpc_spi/spi_driver.c | 43 +-

[PATCH v2 2/7] staging: kpc2000: fix coding style in pcie.h

2019-05-20 Thread Greg Kroah-Hartman
Use tabs in pcie.h, like is mandated. Cc: Matt Sickler Signed-off-by: Greg Kroah-Hartman --- v2: no changes drivers/staging/kpc2000/kpc2000/pcie.h | 106 - 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/pcie.h

[PATCH v2 0/7] staging: kpc2000: fix a bunch of orginization and header file issues

2019-05-20 Thread Greg Kroah-Hartman
Second try at some kpc2000 patches to clean up some header file issues and move things around to make it a bit cleaner. Some of the v1 series have already been applied to the tree, and this series builds on some other patches that have also been merged from other developers. v2: fix build issues

Re: [PATCH] dt-bindings: iio: adc: add adi,ad7780.yaml binding

2019-05-20 Thread Ardelean, Alexandru
On Sun, 2019-05-19 at 12:32 +0100, Jonathan Cameron wrote: > [External] > > > On Sat, 18 May 2019 19:41:12 -0300 > Renato Lui Geh wrote: > > > This patch adds a YAML binding for the Analog Devices AD7780/1 and > > AD7170/1 analog-to-digital converters. > > > > Signed-off-by: Renato Lui Geh >

Re: [PATCH 0/5] Updates to staging driver: kpc_i2c

2019-05-20 Thread Greg Kroah-Hartman
On Sat, May 18, 2019 at 02:29:55AM +, Geordan Neukum wrote: > Attached are an assortment of updates to the kpc_i2c driver in the > staging subtree. All now queued up. I'll rebase my patches that move this file on top of yours, as kbuild found some problems with mine, and I'll resend them to

Re: [PATCH] media: cedrus: Allow different mod clock rates

2019-05-20 Thread Maxime Ripard
On Sat, May 18, 2019 at 07:44:15PM +0200, Jernej Skrabec wrote: > Some VPU variants may run at higher clock speeds. They actually need > extra speed to be capable of decoding more complex codecs like HEVC or > bigger image sizes (4K). > > Expand variant structure with mod_rate information. > >