Re: [PATCH] comedi: dmm32at: Fix coding style - use BIT macro

2015-11-18 Thread Dan Carpenter
On Wed, Nov 18, 2015 at 04:26:52PM +, Ian Abbott wrote: > >+#define DMM32AT_AI_CFG_SCINT_10US (BIT(5) & ~BIT(4)) > >+#define DMM32AT_AI_CFG_SCINT_5US(BIT(5) | BIT(4)) > > The values of DMM32AT_AI_CFG_SCINT_20US etc. are numerically > correct, but look a bit strange. The `(BIT(5) & ~BIT(

Re: [PATCH 26/28] staging: most: rearrange function aim_write

2015-11-18 Thread Dan Carpenter
On Wed, Nov 18, 2015 at 01:43:50PM +0100, Christian Gromm wrote: > This patch rearranges the code of function aim_write() of module aim-cdev. > It is needed to remove the error lable and make the code straighter. > I like error labels. > Signed-off-by: Christian Gromm > --- > drivers/staging/m

[PATCH 25/26] staging: wilc1000: rename pJoinParams in CfgScanResult function

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames pJoinParams to join_params that is fourth argument of CfgScanResult function to avoid camelcase. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-)

[PATCH 26/26] staging: wilc1000: rename pstrNetworkInfo in get_rssi_avg function

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames pstrNetworkInfo to network_info that is first argument of get_rssi_avg function to avoid camelcase. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH 22/26] staging: wilc1000: rename enuScanEvent in CfgScanResult function

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames enuScanEvent to scan_event that is first argument of CfgScanResult function to avoid camelcase. And, remove the relation comment. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 14 +++--- 1 file c

[PATCH 20/26] staging: wilc1000: rename pUserVoid in is_network_in_shadow function

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames pUserVoid to user_void that is second argument of is_network_in_shadow function to avoid camelcase. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

[PATCH 23/26] staging: wilc1000: rename pstrNetworkInfo in CfgScanResult function

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames pstrNetworkInfo to network_info that is second argument of CfgScanResult function to avoid camelcase. And, remove the relation comment. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 41 ++

[PATCH 24/26] staging: wilc1000: rename pUserVoid in CfgScanResult function

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames pUserVoid to user_void that is third argument of CfgScanResult function to avoid camelcase. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --g

[PATCH 21/26] staging: wilc1000: rename pUserVoid in add_network_to_shadow function

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames pUserVoid to user_void that is second argument of add_network_to_shadow function to avoid camelcase. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

[PATCH 14/26] staging: wilc1000: rename pUserVoid in refresh_scan function

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames pUserVoid to user_void that is first argument of refresh_scan function to avoid camelcase. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

[PATCH 19/26] staging: wilc1000: update_scan_time: remove unused argument

2015-11-18 Thread Glen Lee
From: Leo Kim This patch removes pUserVoid that is first argument of update_scan_time function because it is not used in this function. Remove argument in the function call also. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 5 ++--- 1

[PATCH 10/26] staging: wilc1000: rename bWilc_ie variable

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames bWilc_ie variable to wilc_ie to avoid camelcase. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/staging/wilc1000/

[PATCH 18/26] staging: wilc1000: reset_shadow_found: remove unused argument

2015-11-18 Thread Glen Lee
From: Leo Kim This patch removes pUserVoid that is first argument of reset_shadow_found function because it is not used in this function. Remove argument in the function call also. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 ++

[PATCH 17/26] staging: wilc1000: rename s32Freq variable

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames s32Freq variable to freq to avoid camelcase. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgope

[PATCH 16/26] staging: wilc1000: rename pstrNetworkInfo variable

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames pstrNetworkInfo variable to network_info to avoid camelcase. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/driver

[PATCH 15/26] staging: wilc1000: rename bDirectScan in refresh_scan function

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames bDirectScan to direct_scan that is third argument of refresh_scan function to avoid camelcase. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[PATCH 13/26] staging: wilc1000: clear_shadow_scan: remove unused argument

2015-11-18 Thread Glen Lee
From: Leo Kim This patch removes pUserVoid that is first argument of clear_shadow_scan function because it is not used in this function. Remove argument in the function call also. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++-- 1

[PATCH 11/26] staging: wilc1000: rename duringIP_TIME variable

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames duringIP_TIME variable to during_ip_time to avoid camelcase. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/

[PATCH 08/26] staging: wilc1000: rename u8P2Precvrandom variable

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames u8P2Precvrandom variable to p2p_recv_random to avoid camelcase. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 24 +++ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/d

[PATCH 12/26] staging: wilc1000: rename wilc_connected_SSID variable

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames wilc_connected_SSID variable to wilc_connected_ssid to avoid camelcase. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/host_interface.c | 22 +++--- drivers/staging/wilc1000/host_interface.h | 2 +-

[PATCH 09/26] staging: wilc1000: rename u8P2P_vendorspec variable

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames u8P2P_vendorspec variable to p2p_vendor_spec to avoid camelcase. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging

[PATCH 03/26] staging: wilc1000: rename WILC_WFI_2ghz_channels variable

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames WILC_WFI_2ghz_channels variable to ieee80211_2ghz_channels to avoid camelcase. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/driver

[PATCH 07/26] staging: wilc1000: rename u8P2Plocalrandom variable

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames u8P2Plocalrandom variable to p2p_local_random to avoid camelcase. And, remove the relation comment. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 35 --- 1 file changed, 18 insertions

[PATCH 01/26] staging: wilc1000: rename u32LastScannedNtwrksCountShadow variable

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames u32LastScannedNtwrksCountShadow variable to last_scanned_cnt to avoid camelcase. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 50 +++ 1 file changed, 24 insertions(+), 26 deletions(-

[PATCH 06/26] staging: wilc1000: rename u8P2P_oui variable

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames u8P2P_oui variable to p2p_oui to avoid camelcase. And, remove the relation comment. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) dif

[PATCH 02/26] staging: wilc1000: rename astrLastScannedNtwrksShadow variable

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames astrLastScannedNtwrksShadow variable to last_scanned_shadow to avoid camelcase. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 124 ++ 1 file changed, 58 insertions(+), 66 deletions(-)

[PATCH 05/26] staging: wilc1000: rename u8WLANChannel variable

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames u8WLANChannel variable to wlan_channel to avoid camelcase. And, remove the relation comment. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 29 +-- 1 file changed, 11 insertions(+), 18

[PATCH 04/26] staging: wilc1000: rename WILC_WFI_rates variable

2015-11-18 Thread Glen Lee
From: Leo Kim This patch renames WILC_WFI_rates variable to ieee80211_bitrates to avoid camelcase. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wil

Re: [PATCH 3/4] staging: wilc1000: rename index to tcp_pending_ack_idx

2015-11-18 Thread glen lee
On 2015년 11월 19일 15:23, Dan Carpenter wrote: On Thu, Nov 19, 2015 at 11:06:00AM +0900, Glen Lee wrote: This patch renames "index" of struct txq_entry_t to tcp_pending_ack_idx since this name could be confused index of txq_entry_t. It is index of tcp pending ack. It fixes 8e55639d066f4ef402ba8

Re: [PATCH 1/4] staging: wilc1000: remove define COMPLEMENT_BOOT

2015-11-18 Thread glen lee
On 2015년 11월 19일 15:19, Dan Carpenter wrote: On Thu, Nov 19, 2015 at 11:05:58AM +0900, Glen Lee wrote: This patch removes define COMPLEMENT_BOOT in Makefile. The feature was removed by the following commit but the define was not removed. So remove completely. b46d68825c2d3af70ad18b53dfed6516e3

Re: [PATCH 3/4] staging: wilc1000: rename index to tcp_pending_ack_idx

2015-11-18 Thread Dan Carpenter
On Thu, Nov 19, 2015 at 11:06:00AM +0900, Glen Lee wrote: > This patch renames "index" of struct txq_entry_t to tcp_pending_ack_idx since > this name could be confused index of txq_entry_t. It is index of tcp pending > ack. > > It fixes 8e55639d066f4ef402ba88fca08ed1be70e1c4da > It is just a cle

Re: [PATCH 1/4] staging: wilc1000: remove define COMPLEMENT_BOOT

2015-11-18 Thread Dan Carpenter
On Thu, Nov 19, 2015 at 11:05:58AM +0900, Glen Lee wrote: > This patch removes define COMPLEMENT_BOOT in Makefile. The feature was removed > by the following commit but the define was not removed. So remove completely. > > b46d68825c2d3af70ad18b53dfed6516e393b7fa Put some human readable text next

Re: linux-4.4-rc1/drivers/staging/rts5208/sd.c:4170: bad if test ?

2015-11-18 Thread Dan Carpenter
On Thu, Nov 19, 2015 at 09:45:40AM +0530, Sudip Mukherjee wrote: > > David has mentioned it in bugzilla for 3.14-rc1. > (https://bugzilla.kernel.org/show_bug.cgi?id=69881) > > The patch has been submitted multiple times. > https://lkml.org/lkml/2014/2/15/24 > > and then again on: > http://driver

Re: [PATCH 06/28] staging: most: fix mbo leak

2015-11-18 Thread Sudip Mukherjee
On Wed, Nov 18, 2015 at 01:43:30PM +0100, Christian Gromm wrote: > This patch fixes a potential MBO leak in case function aim_read() > exits right after the MBO has been fetched from kfifo and before > it has been saved to the variable stacked_mbo. > > Signed-off-by: Christian Gromm > --- > driv

Re: linux-4.4-rc1/drivers/staging/rts5208/sd.c:4170: bad if test ?

2015-11-18 Thread Sudip Mukherjee
On Wed, Nov 18, 2015 at 09:31:36AM -0800, Greg Kroah-Hartman wrote: > On Wed, Nov 18, 2015 at 05:25:38PM +, David Binderman wrote: > > Hello there Greg, > > > > > > > Date: Wed, 18 Nov 2015 09:14:41 -0800 > > > From: gre...@linuxfoundation.org > > > To:

Re: staging: wilc1000: call linux_sdio_init instead of io_init

2015-11-18 Thread glen lee
On 2015년 11월 18일 19:30, Dan Carpenter wrote: Hello Glen Lee, The patch de11ee8b214e: "staging: wilc1000: call linux_sdio_init instead of io_init" from Nov 6, 2015, leads to the following static checker warning: drivers/staging/wilc1000/wilc_sdio.c:574 sdio_init() info: ignorin

[PATCH 3/4] staging: wilc1000: rename index to tcp_pending_ack_idx

2015-11-18 Thread Glen Lee
This patch renames "index" of struct txq_entry_t to tcp_pending_ack_idx since this name could be confused index of txq_entry_t. It is index of tcp pending ack. It fixes 8e55639d066f4ef402ba88fca08ed1be70e1c4da Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wlan.c | 12 ++-- d

[PATCH 2/4] staging: wilc1000: remove wilc memory allocation config

2015-11-18 Thread Glen Lee
This patch remove memory allocation options in Kconfig. It was used a long time ago to aquire memory, which we will not use this config anymore. Remove it's config, related define and codes as well. We will take PREALLOCATE_AT_LOADING_DRIVER as it is default. Signed-off-by: Glen Lee --- drivers/

[PATCH 4/4] staging: wilc1000: use kernel define byte order macros

2015-11-18 Thread Glen Lee
This patch removes define BIG_ENDIAN and use kernel define byte order macros instead of swap itself. Remove unused BYTE_SWAP macro and __CHECK_ENDIAN__ in Makefile also. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/Makefile| 2 +- drivers/staging/wilc1000/wilc_sdio.c | 8 ++

[PATCH 1/4] staging: wilc1000: remove define COMPLEMENT_BOOT

2015-11-18 Thread Glen Lee
This patch removes define COMPLEMENT_BOOT in Makefile. The feature was removed by the following commit but the define was not removed. So remove completely. b46d68825c2d3af70ad18b53dfed6516e393b7fa Signed-off-by: Glen Lee --- drivers/staging/wilc1000/Makefile | 2 -- 1 file changed, 2 deletions

[PATCH] staging/emxx_udc: fix 64-bit warnings

2015-11-18 Thread Arnd Bergmann
ARCH_SHMOBILE is coming to arm64, which creates new warnings in allmodconfig: drivers/staging/emxx_udc/emxx_udc.c: In function '_nbu2ss_out_dma': drivers/staging/emxx_udc/emxx_udc.c:843:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] _nbu2ss_writel(&preg->EP_

[PATCH 6/6] staging: rtl8712: Remove unused CamelCase define

2015-11-18 Thread Michael Hornung
* Remove unused CamelCase in order to get rid of the corresponding checkpatch.pl "CHECK: Avoid CamelCase: " Signed-off-by: Michael Hornung --- drivers/staging/rtl8712/ieee80211.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/i

[PATCH 4/6] staging: rtl8712: Replace FSF mailing address by URL

2015-11-18 Thread Michael Hornung
* Fix checkpatch.pl output about not including the paragraph about writing to the Free Software Foundation's mailing address Signed-off-by: Michael Hornung --- drivers/staging/rtl8712/ieee80211.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8712/ieee

[PATCH 5/6] staging: rtl8712: Coding style: Fix alignment

2015-11-18 Thread Michael Hornung
* Fix alignment which did not match open parenthesis Signed-off-by: Michael Hornung --- drivers/staging/rtl8712/ieee80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/ieee80211.h index 830452b..e5ec6c2 100644

[PATCH 0/6] staging: rtl8712: Coding style cleanups

2015-11-18 Thread Michael Hornung
* Do coding style cleanups on file ieee80211.h and get rid of all checkpatch.pl output. Michael Hornung (6): staging: rtl8712: Coding style: Remove multiple blank lines staging: rtl8712: Coding style: Make use of BIT macro staging: rtl8712: Coding style: Fix missing spaces staging: rtl87

[PATCH 1/6] staging: rtl8712: Coding style: Remove multiple blank lines

2015-11-18 Thread Michael Hornung
* Remove multiple blank lines in order to get rid of checkpatch.pl "CHECK" output Signed-off-by: Michael Hornung --- drivers/staging/rtl8712/ieee80211.h | 12 1 file changed, 12 deletions(-) diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/ieee80211.h i

[PATCH 3/6] staging: rtl8712: Coding style: Fix missing spaces

2015-11-18 Thread Michael Hornung
* Add missing spaces around bitwise OR operation in order to get rid of checkpatch.pl's "CHECK: spaces preferred around that '|'" Signed-off-by: Michael Hornung --- drivers/staging/rtl8712/ieee80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/i

[PATCH 2/6] staging: rtl8712: Coding style: Make use of BIT macro

2015-11-18 Thread Michael Hornung
* Replace all occurences of (1< --- drivers/staging/rtl8712/ieee80211.h | 92 ++--- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/ieee80211.h index bba978e..8ca3444 100644 --- a/drivers

[PATCH 1/2] Drivers: hv: vmbus: Fix a Host signaling bug

2015-11-18 Thread K. Y. Srinivasan
Currently we have two policies for deciding when to signal the host: One based on the ring buffer state and the other based on what the VMBUS client driver wants to do. Consider the case when the client wants to explicitly control when to signal the host. In this case, if the client were to defer s

[PATCH 2/2] drivers/hv: correct tsc page sequence invalid value

2015-11-18 Thread K. Y. Srinivasan
From: Andrey Smetanin Hypervisor Top Level Functional Specification v3/4 says that TSC page sequence value = -1(0x) is used to indicate that TSC page no longer reliable source of reference timer. Unfortunately, we found that Windows Hyper-V guest side implementation uses sequence value =

[PATCH 0/2] Drivers: hv: vmbus: Fix a couple of bugs

2015-11-18 Thread K. Y. Srinivasan
Fix a couple of bugs. Andrey Smetanin (1): drivers/hv: correct tsc page sequence invalid value K. Y. Srinivasan (1): Drivers: hv: vmbus: Fix a Host signaling bug drivers/hv/channel.c | 18 ++ drivers/hv/hv.c|4 ++-- include/linux/hyperv.h | 12

[PATCH] Staging: comedi: comedi.h Fixed multiple coding style issues

2015-11-18 Thread Daniel H. Hemmingsen
Fixed multiple comments and spacing coding style issues. Signed-off-by: Daniel H. Hemmingsen --- drivers/staging/comedi/comedi.h | 307 +++- 1 file changed, 177 insertions(+), 130 deletions(-) diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/com

RE: [PATCH 17/33] staging: comedi: adv_pci_dio: remove defines used for the do registers

2015-11-18 Thread Hartley Sweeten
On Wednesday, November 18, 2015 11:34 AM, Ian Abbott wrote: > On 18/11/15 17:07, H Hartley Sweeten wrote: >> These defines are only used to initialize the diosubd_data 'addr' members >> in the boardinfo. For aesthetics, just open-code the values and remove the >> defines. >> >> Signed-off-by: H Har

Re: [PATCH 00/33] staging: comedi: adv_pci_dio: cleanup driver

2015-11-18 Thread Ian Abbott
On 18/11/15 17:07, H Hartley Sweeten wrote: With the PCI-1760 support moved to a separate driver this one can now be simplified and cleaned up pretty nicely. Tidy up this driver and fix all the checkpatch.pl issues. This series applies after: "staging: comedi: adv_pci_dio: separate out PCI-1760

Re: [PATCH 17/33] staging: comedi: adv_pci_dio: remove defines used for the do registers

2015-11-18 Thread Ian Abbott
On 18/11/15 17:07, H Hartley Sweeten wrote: These defines are only used to initialize the diosubd_data 'addr' members in the boardinfo. For aesthetics, just open-code the values and remove the defines. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/stagin

Re: [PATCH] staging: media: bcm2048: fix brace coding style issue in radio-bcm2048.c

2015-11-18 Thread Mauro Carvalho Chehab
Em Wed, 18 Nov 2015 23:05:27 +0530 Jitendra escreveu: > > > On Wednesday 18 November 2015 10:42 PM, Greg KH wrote: > > On Wed, Nov 18, 2015 at 09:25:22PM +0530, Jitendra Kumar Khasdev wrote: > >> This is a patch to the radio-bcm2048.c file that fixes up a brace warning > >> found by the checkpa

[PATCH 8/8] staging: comedi: check for more errors for zero-length write

2015-11-18 Thread Ian Abbott
If the "write" file operation handler, `comedi_write()` is passed 0 for the amount to write, some error conditions are currently skipped and the function just returns 0. Change it to check those error conditions and return an error value if appropriate. The trickiest case is the check for when th

[PATCH 5/8] staging: comedi: allow buffer wraparound in comedi_write()

2015-11-18 Thread Ian Abbott
`comedi_write()` copies data from the user buffer to the acquisition data buffer, which is cyclic, using a single call to `copy_from_user()`. It currently avoids having to deal with wraparound of the cyclic buffer by limiting the amount it copies (and the amount returned to the user). Change it to

[PATCH 4/8] staging: comedi: avoid bad truncation of a size_t in comedi_write()

2015-11-18 Thread Ian Abbott
At one point in `comedi_write()`, the variable `n` gets assigned to the minimum of the parameter `nbytes` and the amount of writeable buffer space. The way that is done currently is unsafe in the unlikely case that `nbytes` exceeds `UINT_MAX`, so fix it. Signed-off-by: Ian Abbott --- drivers/st

[PATCH 7/8] staging: comedi: simplify returned errors for comedi_write()

2015-11-18 Thread Ian Abbott
In order to perform a "write" file operation, an asynchronous COMEDI command in the "write" direction needs to have been set up by the current file object on the COMEDI "write" subdevice associated with the file object. If there is a "write" subdevice, but a command has not been set up by the file

[PATCH 1/8] staging: comedi: rearrange comedi_write() code

2015-11-18 Thread Ian Abbott
Rearrange the code in `comedi_write()` to reduce the amount of indentation. The code never reiterates the `while` loop once `count` has become non-zero, so we can check that in the `while` condition to save an indentation level. (Note that `nbytes` has been checked to be non-zero before entering

[PATCH 0/8] staging: comedi: some comedi_write() changes

2015-11-18 Thread Ian Abbott
Tidy up the "write" file operation handler, `comedi_write()` a bit and improve the error handling. 1) staging: comedi: rearrange comedi_write() code 2) staging: comedi: do extra checks for becoming non-busy for "write" 3) staging: comedi: make some variables unsigned in comedi_write() 4) staging:

[PATCH 3/8] staging: comedi: make some variables unsigned in comedi_write()

2015-11-18 Thread Ian Abbott
In `comedi_write()`, the `n` and `m` variables are of type `int`. Change them to `unsigned int` as they are used to measure a positive number of bytes. The `count` variable is also of type `int` and holds the returned number of bytes written. Change it to type `ssize_t` to match the function's re

[PATCH 6/8] staging: comedi: return error on "write" if no command set up

2015-11-18 Thread Ian Abbott
The "write" file operation handler, `comedi_write()` returns an error for pretty much any condition that prevents a "write" going ahead. One of the conditions that prevents a "write" going ahead is that no asynchronous command has been set up, but that currently results in a return value of 0 (unl

[PATCH 2/8] staging: comedi: do extra checks for becoming non-busy for "write"

2015-11-18 Thread Ian Abbott
`comedi_write()` is the handler for the "write" file operation for COMEDI devices. It mostly runs without using the main mutex of the COMEDI device, but uses the `attach_lock` rw_semaphore to protect against the COMEDI device becoming "detached". A file object can write data for a COMEDI asynchon

Re: [PATCH] staging: media: bcm2048: fix brace coding style issue in radio-bcm2048.c

2015-11-18 Thread Jitendra
On Wednesday 18 November 2015 10:42 PM, Greg KH wrote: > On Wed, Nov 18, 2015 at 09:25:22PM +0530, Jitendra Kumar Khasdev wrote: >> This is a patch to the radio-bcm2048.c file that fixes up a brace warning >> found by the checkpatch.pl tool. >> >> Signed-off-by: Jitendra Kumar Khasdev >> --- >>

Re: linux-4.4-rc1/drivers/staging/rts5208/sd.c:4170: bad if test ?

2015-11-18 Thread Greg Kroah-Hartman
On Wed, Nov 18, 2015 at 05:25:38PM +, David Binderman wrote: > Hello there Greg, > > > > Date: Wed, 18 Nov 2015 09:14:41 -0800 > > From: gre...@linuxfoundation.org > > To: dcb...@hotmail.com > > CC: de...@driverdev.osuosl.org > > Subject: Re: linux-4.4-

Re: linux-4.4-rc1/drivers/staging/rts5208/sd.c:4170: bad if test ?

2015-11-18 Thread Greg Kroah-Hartman
On Wed, Nov 18, 2015 at 08:53:51AM +, David Binderman wrote: > hello there, > > [linux-4.4-rc1/drivers/staging/rts5208/sd.c:4170]: (style) Expression '(X & > 0x1e) != 0x3' is always true. > > Source code is > >   if ((ptr[3] & 0x1E) != 0x03) { > > Suggest code rework. Great, please send a

Re: [PATCH] staging: media: bcm2048: fix brace coding style issue in radio-bcm2048.c

2015-11-18 Thread Greg KH
On Wed, Nov 18, 2015 at 09:25:22PM +0530, Jitendra Kumar Khasdev wrote: > This is a patch to the radio-bcm2048.c file that fixes up a brace warning > found by the checkpatch.pl tool. > > Signed-off-by: Jitendra Kumar Khasdev > --- > drivers/staging/media/bcm2048/radio-bcm2048.c | 4 ++-- > 1 fil

[PATCH 19/33] staging: comedi: adv_pci_dio: use a default case in pci_dio_reset()

2015-11-18 Thread H Hartley Sweeten
For aesthetics, use a default case in the switch (board->cardtype) used to reset the various boards. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci_dio.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --gi

[PATCH 31/33] staging: comedi: adv_pci_dio: move pci_dio_override_cardtype()

2015-11-18 Thread H Hartley Sweeten
This function is called as part of the pci_driver (*probe) before doing the (*auto_attach) of the comedi driver. For aesthetics, move the function to a more logical place in the driver. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ad

[PATCH 03/33] staging: comedi: adv_pci_dio: remove 'main_pci_region' boardinfo

2015-11-18 Thread H Hartley Sweeten
All the boards use PCI BAR2 for the dev->iobase except for the pci1736 which uses PCI BAR0. Just use the board->cardtype to determine which PCI BAR to use. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci_dio.c | 30 +++--

[PATCH 18/33] staging: comedi: adv_pci_dio: remove defines used for the dio (8255) registers

2015-11-18 Thread H Hartley Sweeten
These defines are only used to initialize the diosubd_data 'addr' members in the boardinfo. For aesthetics, just open-code the values and remove the defines. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci_dio.c | 14 +--

[PATCH 30/33] staging: comedi: adv_pci_dio: move and rename the MAX_*_SUBDEV[SG] defines

2015-11-18 Thread H Hartley Sweeten
For aesthetics, move these defines after the register defines and rename them to have namespace associated with the driver. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci_dio.c | 22 +++--- 1 file changed, 11 in

[PATCH 22/33] staging: comedi: adv_pci_dio: use common defines for PCI-173[036] registers

2015-11-18 Thread H Hartley Sweeten
These boards use the same offsets for the interrupt control registers. For aesthetics, remove the current defines and use common ones. Fix the switch() in pci_dio_reset() to use common code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/driv

[PATCH 27/33] staging: comedi: adv_pci_dio: cleanup PCI-1762 interrupt registers

2015-11-18 Thread H Hartley Sweeten
For aesthetics, use a common define for the interrupt control and status registers. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci_dio.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging

[PATCH 23/33] staging: comedi: adv_pci_dio: use common defines for PCI-1739/175[01] registers

2015-11-18 Thread H Hartley Sweeten
These boards use the same offsets for the interrupt control registers. For aesthetics, remove the current defines and use common ones. Fix the switch() in pci_dio_reset() to use common code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/driv

[PATCH 29/33] staging: comedi: adv_pci_dio: move and rename enum hw_cards_id

2015-11-18 Thread H Hartley Sweeten
For aesthetics, move this enum after the register defines and rename it to have namespace associated with the driver. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci_dio.c | 29 1 file changed, 17 in

[PATCH 10/33] staging: comedi: adv_pci_dio: use the diosubd_data 'addr' for di/do s->private

2015-11-18 Thread H Hartley Sweeten
Currently the di/do subdevices store a pointer to the diosubd_data in s->private. The (*insn_bits) functions then use that to get to the 'addr' needed to access the registers. The only member of diosubd_data that is needed by the (*insn_bits) functions is the 'addr'. For aesthetics, just store th

[PATCH 16/33] staging: comedi: adv_pci_dio: reset digital outputs in subdevice init

2015-11-18 Thread H Hartley Sweeten
Currently the board reset function also resets the digital output channels to 0. This works but it makes the reset function a bit messy and each board type has to be handled special. Move the digital output reset into the subdevice init where it can be handle based on the subdevice setup. Signed-

[PATCH 01/33] staging: comedi: adv_pci_dio: remove unnecessary function separation comments

2015-11-18 Thread H Hartley Sweeten
These are not necessary and just add cruft. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci_dio.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/staging/comedi/drivers/adv_pci_dio.c b/drivers/s

[PATCH 12/33] staging: comedi: adv_pci_dio: remove defines used for the 'timer_regbase'

2015-11-18 Thread H Hartley Sweeten
These defines are only used to initialize the 'timer_regbase' boardinfo. For aesthetics, just open-code the values and remove the defines. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci_dio.c | 6 ++ 1 file changed, 2 inser

[PATCH 21/33] staging: comedi: adv_pci_dio: cleanup "disable and clear interrupts" comments

2015-11-18 Thread H Hartley Sweeten
For aesthetics, use a common comment for the switch() that disables and clears interrupts. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci_dio.c | 24 ++-- 1 file changed, 6 insertions(+), 18 deletions(-) di

[PATCH 24/33] staging: comedi: adv_pci_dio: cleanup PCI-1753 interrupt register defines

2015-11-18 Thread H Hartley Sweeten
For aesthetics, replace these defines with some macros. Refactor the switch in pci_dio_reset() to not require the fallthrough comment. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci_dio.c | 33 1 f

[PATCH 33/33] staging: comedi: adv_pci_dio: update the MODULE_DESCRIPTION

2015-11-18 Thread H Hartley Sweeten
Change the MODULE_DESCRIPTION to something more useful than the generic "Comedi low-level driver". Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci_dio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH 28/33] staging: comedi: adv_pci_dio: remove boardinfo 'cardtype'

2015-11-18 Thread H Hartley Sweeten
This member of the boardinfo is identical to the offset of the boardinfo in the boardtypes array. It's also passed as the 'context' to the driver (*auto_attach). The 'cardtype' is only needed by the (*auto_attach) to determine which PCI BAR to use and in pci_dio_reset() to handle the board specifi

[PATCH 20/33] staging: comedi: adv_pci_dio: disable channel freeze outside of switch

2015-11-18 Thread H Hartley Sweeten
For aesthetics, move the disable of the channel freeze for the PCI-1752 and PCI-1756 boards out of the switch used to disable and clear interrupts. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci_dio.c | 10 -- 1 file ch

[PATCH 07/33] staging: comedi: adv_pci_dio: absorb pci_dio_add_di()

2015-11-18 Thread H Hartley Sweeten
This function initializes a digitial input subdevices. For aesthetics, absorb it into the (*auto_attach). Remove the improper initialization of the SDF_LSAMPL subdev_flag and len_chanlist. These are only used by subdevices that support async commands. Also, remove the unnecessary 'specflags' from

[PATCH 15/33] staging: comedi: adv_pci_dio: do board reset early in (*auto_attach)

2015-11-18 Thread H Hartley Sweeten
The board reset function disables and clears all interrupts. It also resets all the digital output channels to 0. Interrupts are not currently used by this driver. For asthetics, do the board reset early in the (*auto_attach) to make sure the interrupts are disabled in case this feature is added.

[PATCH 32/33] staging: comedi: adv_pci_dio: tidy up the comedi comment block

2015-11-18 Thread H Hartley Sweeten
The Description is a bit long winded and the same information is in the Devices. Shorten the Description and tidy up the Devices. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci_dio.c | 9 +++-- 1 file changed, 3 insertions(

[PATCH 11/33] staging: comedi: adv_pci_dio: simplify the 'boardid' boardinfo

2015-11-18 Thread H Hartley Sweeten
The "board id" register is always 4-bits (4 di channels) and the register used to read the bits is always > 0. Simplify the 'boardid' boardinfo by replacing it with a 'id_reg' member and open-coding the subdevice n_chan. For aesthetics, remove all the *_BOARDID defines and just open-code the regi

[PATCH 06/33] staging: comedi: adv_pci_dio: absorb pci_dio_add_do()

2015-11-18 Thread H Hartley Sweeten
This function initializes a digitial output subdevice. For aesthetics, absorb it into the (*auto_attach). Remove the improper initialization of the SDF_LSAMPL subdev_flag and len_chanlist. These are only used by subdevices that support async commands. Also remove the unnecessary initilaization of

[PATCH 00/33] staging: comedi: adv_pci_dio: cleanup driver

2015-11-18 Thread H Hartley Sweeten
With the PCI-1760 support moved to a separate driver this one can now be simplified and cleaned up pretty nicely. Tidy up this driver and fix all the checkpatch.pl issues. This series applies after: "staging: comedi: adv_pci_dio: separate out PCI-1760 support" H Hartley Sweeten (33): staging:

[PATCH 09/33] staging: comedi: adv_pci_dio: remove need for diosubd_data 'regs' member

2015-11-18 Thread H Hartley Sweeten
Currently the (*insn_bits) functions used the 'regs' member to determine how many registers need to be read or written to update the subdevice. We can use the subdevice 'n_chan' to determine this and make the code a bit clearer. The (*auto_attach) also uses this member to determine how many 8255 d

[PATCH 05/33] staging: comedi: adv_pci_dio: use a const pointer to the diosubd_data

2015-11-18 Thread H Hartley Sweeten
For aesthetics, use a const pointer to access the diosubd_data in the boardinfo when doing the (*auto_attach).. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci_dio.c | 31 +--- 1 file changed, 19 insertio

[PATCH 26/33] staging: comedi: adv_pci_dio: rename PCI1752_6_CFC define

2015-11-18 Thread H Hartley Sweeten
For aesthetics, rename this define and fix the alignment. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci_dio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/adv_pci_dio.

[PATCH 02/33] staging: comedi: adv_pci_dio: tidy up comedi driver block comment

2015-11-18 Thread H Hartley Sweeten
Reformat the bolck comment in the kernel CodingStyle. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci_dio.c | 40 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/drivers/staging/comed

[PATCH 25/33] staging: comedi: adv_pci_dio: cleanup PCI-175[46] interrupt registers

2015-11-18 Thread H Hartley Sweeten
For aesthetics, replace these defines with a macro. Refactor the switch in pci_dio_reset() to use common code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci_dio.c | 21 + 1 file changed, 9 insertions(+), 1

[PATCH 08/33] staging: comedi: adv_pci_dio: refactor 'io_access' boardinfo

2015-11-18 Thread H Hartley Sweeten
The boards supported by this driver either use 8-bit or 16-bit I/O. The 'io_access' member of the boardinfo is used by the (*auto_attach) to determine which (*insn_bits) function to use. Simplify the boardinfo a bit by refactoring the 'io_access' member into a bit-field flag 'is_16bit'. Use the ne

[PATCH 14/33] staging: comedi: adv_pci_dio: remove board reset during (*detach)

2015-11-18 Thread H Hartley Sweeten
The board reset function disables and clears all interrupts. It also resets all the digital output channels to 0. Interrupts are not used by this driver so the disable/clear during the (*detach) is not necessary. Reseting all the digital outputs to 0 might not be desired depending on what the out

  1   2   >