Re: [PATCH 05/18] staging: gasket: sysfs mapping creation fixups

2018-07-16 Thread Greg Kroah-Hartman
On Mon, Jul 16, 2018 at 02:14:27PM -0700, Todd Poynor wrote: > On Fri, Jul 13, 2018 at 11:32 PM, Greg Kroah-Hartman > wrote: > > On Fri, Jul 13, 2018 at 10:58:03PM -0700, Todd Poynor wrote: > >> From: Todd Poynor > >> > >> Return EBUSY for attempt to create a mapping already in use. > > > > Why?

[PATCH 31/32] staging: gasket: remove extra parens in gasket_write_mappable_regions

2018-07-16 Thread Todd Poynor
From: Todd Poynor Remove unneeded parentheses around subexpressions. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket_core.

[PATCH 32/32] staging: gasket: fix multi-line comment syntax in gasket_core.h

2018-07-16 Thread Todd Poynor
From: Todd Poynor Use consistent kernel-style multi-line comment syntax. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket

[PATCH 25/32] staging: gasket: apex_ioctl_check_permissions use bool return type

2018-07-16 Thread Todd Poynor
From: Todd Poynor Convert from int return to bool. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/gasket/apex_driver.c b/drivers

[PATCH 30/32] staging: gasket: gasket_mmap use PAGE_MASK

2018-07-16 Thread Todd Poynor
From: Todd Poynor Instead of math on PAGE_SIZE. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/

[PATCH 27/32] staging: gasket: remove else clause after return in if clause

2018-07-16 Thread Todd Poynor
From: Todd Poynor Else after return is unnecessary and may cause static code checkers to complain. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --

[PATCH 24/32] staging: gasket: apex_clock_gating simplify logic, reduce indentation

2018-07-16 Thread Todd Poynor
From: Todd Poynor Collapse together two checks and return immediately, avoid conditional indentation for most of function code. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 44 +--- 1 file ch

[PATCH 22/32] staging: gasket: don't treat no device reset callback as an error

2018-07-16 Thread Todd Poynor
From: Todd Poynor It is not an error for a device to not have a reset callback registered. Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/gasket/gasket_core

[PATCH 23/32] staging: gasket: gasket_mmap return error instead of valid BAR index

2018-07-16 Thread Todd Poynor
From: Todd Poynor When offset to be mapped matches both a BAR region and a coherent mapped region return an error as intended, not the BAR index. Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 29/32] staging: gasket: remove unnecessary parens in page table code

2018-07-16 Thread Todd Poynor
From: Todd Poynor gasket_alloc_coherent_memory() extra parentheses in statement. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/g

[PATCH 13/32] staging: gasket: gasket_wait_with_reschedule use 32 bits of retry count

2018-07-16 Thread Todd Poynor
From: Todd Poynor Don't need a 64-bit retry counter. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4 ++-- drivers/staging/gasket/gasket_core.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 08/32] staging: gasket: Remove stale pointers on error allocating attr array

2018-07-16 Thread Todd Poynor
From: Todd Poynor If gasket_sysfs_create_mapping() hits errors allocating the attribute array, remove stale pointers to device info from the mapping object. Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_sysfs.c | 2 ++ 1 file changed, 2 insertions(+)

[PATCH 17/32] staging: gasket: annotate ioctl arg with __user

2018-07-16 Thread Todd Poynor
From: Todd Poynor For sparse checking. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 12 ++--- drivers/staging/gasket/gasket_core.c | 6 ++- drivers/staging/gasket/gasket_core.h | 4 +- drivers/staging/gasket

[PATCH 12/32] staging: gasket: gasket_wait_with_reschedule return when condition hit

2018-07-16 Thread Todd Poynor
From: Todd Poynor Return right away instead of break out of while and then return. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ga

[PATCH 26/32] staging: gasket: gasket page table functions use bool return type

2018-07-16 Thread Todd Poynor
From: Todd Poynor Convert from int to bool return type for gasket page table functions that return values used as booleans. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 58 +++--- drivers/stagi

[PATCH 11/32] staging: gasket: gasket_wait_with_reschedule use msleep

2018-07-16 Thread Todd Poynor
From: Todd Poynor Replace schedule_timeout() call with msleep(). Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket_core

[PATCH 19/32] staging: gasket: remove code for no physical device

2018-07-16 Thread Todd Poynor
From: Todd Poynor gasket_enable_dev code for enabling a gasket device with no physical PCI device registered shouldn't be necessary. Reported-by: Greg Kroah-Hartman Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 12 +--- 1 file changed, 1 insertion(+), 11 deleti

[PATCH 07/32] staging: gasket: Return EBUSY on mapping create when already in use

2018-07-16 Thread Todd Poynor
From: Todd Poynor gasket_sysfs_create_mapping() return EBUSY if sysfs mapping already in use. Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket_sysfs.

[PATCH 14/32] staging: gasket: bail out of reset sequence on device callback error

2018-07-16 Thread Todd Poynor
From: Todd Poynor If device reset callback returns an error, error out at the gasket level. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/driver

[PATCH 04/32] staging: gasket: whitespace fix in gasket_page_table_init

2018-07-16 Thread Todd Poynor
From: Todd Poynor Tab replaced with space. Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket_page_table.c b/drivers/staging/gasket/gasket_page_t

[PATCH 28/32] staging: gasket: fix comment syntax in apex.h

2018-07-16 Thread Todd Poynor
From: Todd Poynor Use kernel-style multi-line comment syntax. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/gasket/apex.h b/drivers/st

[PATCH 01/32] staging: gasket: remove X86 Kconfig restriction

2018-07-16 Thread Todd Poynor
From: Todd Poynor The gasket and apex drivers are to be used on other architectures besides X86. Signed-off-by: Todd Poynor --- drivers/staging/gasket/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket/Kconfig b/drivers/staging/gasket/Kconfig ind

[PATCH 00/32 v2] staging: gasket: sundry fixes and fixups

2018-07-16 Thread Todd Poynor
From: Todd Poynor Various fixes mainly from the chromium review of the gasket and apex drivers. More to come. Various (32): staging: gasket: remove X86 Kconfig restriction staging: gasket: fix typo in apex_enter_reset staging: gasket: fix typo in gasket_core.h comments staging: gasket:

[PATCH 16/32] staging: gasket: always allow root open for write

2018-07-16 Thread Todd Poynor
From: Todd Poynor Always allow root to open device for writing. Drop special-casing of ioctl permissions for root vs. owner. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor Reviewed-by: Dmitry Torokhov --- drivers/staging/gasket/apex_driver.c | 9 +++

[PATCH 15/32] staging: gasket: drop gasket_cdev_get_info, use container_of

2018-07-16 Thread Todd Poynor
From: Todd Poynor Remove gasket_cdev_get_info(), use container_of() directly instead, drop unnecessary NULL checks. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 26 -- 1 file changed, 4 in

[PATCH 09/32] staging: gasket: convert gasket_mmap_has_permissions to bool return

2018-07-16 Thread Todd Poynor
From: Todd Poynor gasket_mmap_has_permissions() should return a boolean value. Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/gasket/gasket_core.c b

[PATCH 05/32] staging: gasket: remove driver registration on class creation failure

2018-07-16 Thread Todd Poynor
From: Todd Poynor If class_create() fails, remove the gasket driver from the global registration table. Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/gasket/g

[PATCH 06/32] staging: gasket: hold mutex on gasket driver unregistration

2018-07-16 Thread Todd Poynor
From: Todd Poynor Take the global mutex on driver unregistration updates for proper ordering of updates and consistent access procedures. Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4 1 file changed, 4 insertions(+) diff --git a/drive

[PATCH 21/32] staging: gasket: remove unnecessary code in coherent allocator

2018-07-16 Thread Todd Poynor
From: Todd Poynor Remove extraneous statement in gasket_config_coherent_allocator() Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_ioctl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/stagi

[PATCH 03/32] staging: gasket: fix typo in gasket_core.h comments

2018-07-16 Thread Todd Poynor
From: Todd Poynor Grammar fixup in gasket_core.h comments describing struct gasket_interrupt_desc. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket_core.h b/drivers/staging/gas

[PATCH 20/32] staging: gasket: fix class create bug handling

2018-07-16 Thread Todd Poynor
From: Todd Poynor class_create() never returns NULL, and this driver should never return PTR_ERR(NULL) anyway. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor Reviewed-by: Dmitry Torokhov --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 in

[PATCH 18/32] staging: gasket: gasket_enable_dev remove unnecessary variable

2018-07-16 Thread Todd Poynor
From: Todd Poynor Remove unnecessary variable, pass constant param instead. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/gaske

[PATCH 10/32] staging: gasket: fix gasket_wait_with_reschedule timeout return code

2018-07-16 Thread Todd Poynor
From: Todd Poynor Return -ETIMEDOUT, not -EINVAL, on timeout, including callers. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 8 drivers/staging/gasket/gasket_core.c | 2 +- 2 files changed, 5 insertions

[PATCH 02/32] staging: gasket: fix typo in apex_enter_reset

2018-07-16 Thread Todd Poynor
From: Todd Poynor Fix typo in log message. Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket/apex_driver.c b/drivers/staging/gasket/apex_driver.c index cca4c

Re: [PATCH 13/18] staging: gasket: gasket_enable_dev fixups

2018-07-16 Thread Todd Poynor
On Fri, Jul 13, 2018 at 11:39 PM, Greg Kroah-Hartman wrote: > On Fri, Jul 13, 2018 at 10:58:11PM -0700, Todd Poynor wrote: >> From: Todd Poynor >> >> Remove unnecessary variable. >> >> Bail out if no physical device. >> >> Signed-off-by: Todd Poynor >> --- >> drivers/staging/gasket/gasket_core.

Re: [PATCH 11/18] staging: gasket: always allow root open for write

2018-07-16 Thread Todd Poynor
On Sun, Jul 15, 2018 at 12:41 PM, Greg Kroah-Hartman wrote: > On Sun, Jul 15, 2018 at 11:15:26AM -0700, Todd Poynor wrote: >> On Sun, Jul 15, 2018 at 3:03 AM, Greg Kroah-Hartman >... >> My own preference is to rewrite the apex driver entirely in-kernel and >> pull in its userspace parts here. If

Re: [PATCH 11/18] staging: gasket: always allow root open for write

2018-07-16 Thread Todd Poynor
On Sat, Jul 14, 2018 at 1:25 AM, Dmitry Torokhov wrote: > On Sat, Jul 14, 2018 at 8:58 AM Todd Poynor wrote: >> >> From: Todd Poynor >> >> Always allow root to open device for writing. >> >> Drop special-casing of ioctl permissions for root vs. owner. >> >> Reported-by: Dmitry Torokhov >> Signe

Re: [PATCH 10/18] staging: gasket: gasket_open use container_of()

2018-07-16 Thread Todd Poynor
On Sat, Jul 14, 2018 at 1:15 AM, Dmitry Torokhov wrote: > On Sat, Jul 14, 2018 at 8:58 AM Todd Poynor wrote: >> >> From: Todd Poynor >> >> Use container_of(), drop unnecessary NULL check. >> >> Reported-by: Dmitry Torokhov >> Signed-off-by: Zhongze Hu >> Signed-off-by: Todd Poynor >> --- >>

Re: [PATCH 06/18] staging: gasket: fix deadlock in pci driver unregister path

2018-07-16 Thread Todd Poynor
On Sat, Jul 14, 2018 at 5:57 AM, Greg Kroah-Hartman wrote: > On Sat, Jul 14, 2018 at 11:07:21AM +0300, Dmitry Torokhov wrote: >> On Sat, Jul 14, 2018 at 8:58 AM Todd Poynor wrote: >> > >> > From: Todd Poynor >> > >> > g_mutex held across pci_unregister_driver() call, also held in >> > gasket_pci

Re: [PATCH 04/18] staging: gasket: device registration error and unregister fixups

2018-07-16 Thread Todd Poynor
>> fail1: >> class_destroy(internal->class); >> >> +fail0: > > GW-BASIC sytle label names are an anti-pattern. It's better to name the > labels after what they do, just like function names describes what the > function does. Here it would be "goto clear_desc;" or something. It > doesn't h

Re: [PATCH 05/18] staging: gasket: sysfs mapping creation fixups

2018-07-16 Thread Todd Poynor
On Fri, Jul 13, 2018 at 11:32 PM, Greg Kroah-Hartman wrote: > On Fri, Jul 13, 2018 at 10:58:03PM -0700, Todd Poynor wrote: >> From: Todd Poynor >> >> Return EBUSY for attempt to create a mapping already in use. > > Why? The existing code returns EINVAL which often means something bogus was reque

Re: [PATCH] staging: android: ashmem: Shrink directly through shmem_fallocate

2018-07-16 Thread Joel Fernandes
On Mon, Jul 16, 2018 at 11:48:51AM +0200, Greg Kroah-Hartman wrote: > On Fri, Jul 06, 2018 at 02:44:16PM -0700, Joel Fernandes wrote: > > From: Tobias Lindskog > > > > When ashmem_shrink is called from direct reclaim on a user thread, a > > call to do_fallocate will check for permissions against

[PATCH v2 02/10] staging:rtl8192u: remove typedef of struct TS_COMMON_INFO - Style

2018-07-16 Thread John Whitmore
To clear a checkpatch issue removed the typedef of the structure TS_COMMON_INFO. This change removes the previous declaration, which defined two types, both TS_COMMON_INFO and a pointer type PTS_COMMON_INFO: typedef struct _TS_COMMON_INFO { ... } TS_COMMON_INFO, *PTS_COMMON_INFO; The poi

[PATCH v2 09/10] staging:trl8192u: Rename TClasProc > t_clas_proc - Style

2018-07-16 Thread John Whitmore
Rename the struct TS_COMMON_INFO member variable TClasProc to t_clas_proc. This change clears the checkpatch issue with CamelCase variable names. There should be no impact on runtime execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | 2 +- drivers/s

[PATCH v2 05/10] staging:rtl8192u: Rename InactTimer > inact_timer - Style

2018-07-16 Thread John Whitmore
Rename the struct TS_COMMON_INFO member InactTimer to inact_timer. This change clears the checkpatch issue with CamelCase naming. The change should not have any impact on runtime execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | 2 +- drivers/stag

[PATCH v2 08/10] staging:rtl8192u: Rename TClass > t_class - Style

2018-07-16 Thread John Whitmore
Rename the struct TS_COMMON_INFO member variable from TClass to t_class. This change clears the checkpatch issue with CamelCase Variable names. There should be no impact on runtime execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | 2 +- drivers/sta

[PATCH v2 00/10] staging:rtl8192u: Coding style changes.

2018-07-16 Thread John Whitmore
Simple coding style changes to avoid CamelCase. John Whitmore (10): staging:rtl8192u: remove typedef of enumeration TR_SELECT - Style staging:rtl8192u: remove typedef of struct TS_COMMON_INFO - Style staging:rtl8192u: Rename List > list - Coding style staging:rtl8192u: rename SetupTimer >

[PATCH v2 06/10] staging:rtl8192u: Rename Addr > addr - Style

2018-07-16 Thread John Whitmore
Rename the TX_COMMON_INFO structure's member Addr to addr. This change clears the checkpatch issue with CamelCase naming. This is a coding style change only and should not impact runtime execution. Signed-off-by: John Whitmore --- .../staging/rtl8192u/ieee80211/rtl819x_BAProc.c| 10 +

[PATCH v2 04/10] staging:rtl8192u: rename SetupTimer > setup_timer - Style

2018-07-16 Thread John Whitmore
Rename the struct TS_COMMON_INFO member SetupTimer to setup_timer. This clears the checkpatch issue with CamelCase variable names. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 8 2 file

[PATCH v2 07/10] staging:rtl8192u: Rename TSpec > t_spec - Style

2018-07-16 Thread John Whitmore
Rename the TS_COMMON_INFO structure's member TSpec to t_spec. This change clears the checkpatch issue with CamelCase naming of variables. There should be no impact on runtime execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 2 +- drivers/staging/r

[PATCH v2 10/10] staging:rtl8192u: Rename TClasNum > t_clas_num - Style

2018-07-16 Thread John Whitmore
Rename the struct TS_COMMON_INFO member variable TClasNum to t_clas_num. This change clears the checkpatch issue with CamelCase naming. There should be no impact on runtime execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | 2 +- drivers/staging/rtl

[PATCH v2 01/10] staging:rtl8192u: remove typedef of enumeration TR_SELECT - Style

2018-07-16 Thread John Whitmore
To clear a checkpatch issue removed the typedef of the enumeration TR_SELECT this should not impact runtime code as it's only a coding style change. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/ieee80211.h | 4 ++-- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c

[PATCH v2 03/10] staging:rtl8192u: Rename List > list - Coding style

2018-07-16 Thread John Whitmore
In struct TS_COMMON_INFO rename the member List to list. This clears the checkpatch issue concerning CamelCase naming of variables. Signed-off-by: John Whitmore --- .../staging/rtl8192u/ieee80211/rtl819x_TS.h | 2 +- .../rtl8192u/ieee80211/rtl819x_TSProc.c | 64 +-- 2 fi

Re: [PATCH] staging: goldfish: Retire a mutable global variable

2018-07-16 Thread Greg KH
On Mon, Jul 16, 2018 at 11:09:48AM -0700, Roman Kiryanov wrote: > I can drop this change. What else do I need to cleanup in > goldfish_audio to proceed with adding other drivers? You need to get the audio developers to review this driver and accept it into their tree. The fact that an audio drive

[PATCH] staging: mt7621-pci: dt-bindings: add DT documentation for PCI MT7621

2018-07-16 Thread Sergio Paracuellos
This commit adds device tree bindings documentation for PCIEE controller of MT7621 SoC. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/mediatek,mt7621-pci.txt | 97 ++ 1 file changed, 97 insertions(+) create mode 100644 drivers/staging/mt7621-pci/mediatek,m

[PATCH v4 13/15] staging: mt7621-pci: rename RALINK_PCI_CONFIG_DATA_VIRTUAL_REG definition

2018-07-16 Thread Sergio Paracuellos
RALINK_PCI_CONFIG_DATA_VIRTUAL_REG is a very long name. Make it a bit shorter renaming it to RALINK_PCI_CONFIG_DATA. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/mt7621-pc

[PATCH v4 01/15] staging: mt7621-pci: use generic kernel pci subsystem read and write

2018-07-16 Thread Sergio Paracuellos
map_bus callback is called before every .read/.write operation. Implement it and change custom read write operations for the pci subsystem generics. Make the probe function to don't use legacy stuff and request bus resources directly. Get pci register base from device tree. Signed-off-by: Sergio P

[PATCH v4 15/15] staging: mt7621-pci: remove remaining pci_legacy dependant code

2018-07-16 Thread Sergio Paracuellos
pcibios_* remaining code is not neccessary at all. We are mapping irq using of_irq_parse_and_map_pci and swizzle_irq which are set in driver 'probe' function. Remove this code. No kernel config option CONFIG_PCI_DRIVERS_LEGACY should be included anymore. Signed-off-by: Sergio Paracuellos --- dri

[PATCH v4 10/15] staging: mt7621-pci: use pcie_[read|write] in RALINK_PCI_PCICFG_ADDR and RALINK_PCI_PCIMSK_ADDR

2018-07-16 Thread Sergio Paracuellos
RALINK_PCI_PCICFG_ADDR and RALINK_PCI_PCIMSK_ADDR are defined to be directly referenced for read and write. Use pcie_read and pcie_write instead changing its definition to a simple relative offset to pcie base address. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c

[PATCH v4 14/15] staging: mt7621-pci: remove duplicated include

2018-07-16 Thread Sergio Paracuellos
linux/pci.h is being included twice. Remove one of them. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c index c0403e8..80a06ce 1006

[PATCH v4 12/15] staging: mt7621-pci: use BIT macro in preprocessor definitions

2018-07-16 Thread Sergio Paracuellos
Some preprocessor definitions are using a custom implementation of BIT macro. Just use linux kernel BIT macro instead. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers

[PATCH v4 00/15] staging: mt7621-pci: avoid custom pci config read and writes

2018-07-16 Thread Sergio Paracuellos
This patch series include an attempt to avoid the use of custom read and writes in driver code and use PCI subsystem common ones. In order to do this 'map_bus' callback is implemented and also data structures for driver are included. The regs base address is being readed from device tree and the d

[PATCH v4 03/15] staging: mt7621-pci: add pcie_write and pcie_read helpers

2018-07-16 Thread Sergio Paracuellos
Introdice this functions to make easier to write/read to/from an offset relative to base address Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/stagin

[PATCH v4 11/15] staging: mt7621-pci: remove RALINK_PCI_BASE from remaining definitions

2018-07-16 Thread Sergio Paracuellos
RALINK_PCI_BASE has no sense and this driver has base address readed and mapped from device tree. Remove remaining uses of it and change code to use pcie_read and pcie_write functions in places where this was being used. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621

[PATCH v4 06/15] staging: mt7621-pci: simplify write_config function

2018-07-16 Thread Sergio Paracuellos
write_config function is always called with bus and func being 0. Avoid those params and just use 0 inside the function. Review parameter types changing for more proper ones. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 20 +--- 1 file changed,

[PATCH v4 08/15] staging: mt7621-pci: avoid register duplication per controller using pcie_[read|write]

2018-07-16 Thread Sergio Paracuellos
Use pcie_[read|write] fucntions to read and write controller registers. Define those only by offset and pass controller offset + register offset relative to base address to functions. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 62 -

[PATCH v4 07/15] staging: mt7621-pci: remove unused macros

2018-07-16 Thread Sergio Paracuellos
There some macros that are not being used. Remove them. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 29 + 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt762

[PATCH v4 05/15] staging: mt7621-pci: simplify read_config function

2018-07-16 Thread Sergio Paracuellos
read_config function is always called with bus and func being 0. Avoid those params and just use 0 inside the function. Return readed value instead pass a reference parameter. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 32 +++- 1 f

[PATCH v4 04/15] staging: mt7621-pci: use pcie_[read|write] in [write|read]_config

2018-07-16 Thread Sergio Paracuellos
Instead of custom macros use pcie_read and pcie_write functions. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 67 - 1 file changed, 32 insertions(+), 35 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/driver

[PATCH v4 09/15] staging: mt7621-pci: remove unused includes

2018-07-16 Thread Sergio Paracuellos
Some includes are not needed at all. Remove them. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c index 72e4aa3..af602f4 100644 --

[PATCH v4 02/15] staging: mt7621-pci: remove dead code derived to not use custom reads and writes

2018-07-16 Thread Sergio Paracuellos
Driver is using now pci subsystem generics reads and writes and requesting bus resources without using legacy code functions. Because of this there is a lot of dead code that can be removed. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 172 +

Re: [PATCH] staging: comedi: comedi_internal.h: Avoid '(' at the end of line

2018-07-16 Thread Nishad Kamdar
On Sun, Jul 15, 2018 at 09:27:12AM +0200, Greg Kroah-Hartman wrote: > On Sun, Jul 15, 2018 at 12:19:18PM +0530, Nishad Kamdar wrote: > > Bring function argument 'struct comedi_subdevice *s' to the > > previous line to avoid ending the line with open parenthesis. > > Issue found by checkpatch. > >

[PATCH] staging: rtl8188eu: remove blank lines

2018-07-16 Thread Michael Straube
Remove unrequired blank lines as reported by checkpatch. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/core/rtw_ieee80211.c| 8 .../staging/rtl8188eu/core/rtw_ioctl_set.c| 18 drivers/staging/rtl8188eu/core/rtw_led.c | 1 - drivers/staging/rtl8188eu/core/r

[PATCH 2/2] staging: rtl8188eu: use is_multicast_ether_addr

2018-07-16 Thread Michael Straube
Use is_multicast_ether_addr instead of IS_MCAST. By definition the broadcast address is also a multicast address, so checking for !multicast in the conditional is sufficient. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH 1/2] staging: rtl8188eu: remove MacAddr_isBcst macro

2018-07-16 Thread Michael Straube
Use is_broadcast_ether_addr instead of the MacAddr_isBcst macro. The macro is not used anywhere else, so remove it. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +- drivers/staging/rtl8188eu/include/wifi.h | 7 --- 2 files changed, 1 insertion(+), 8 delet

Re: [RFC PATCH v2] Xilinx AXI-Stream FIFO v4.1 IP core driver

2018-07-16 Thread Jacob Feder
On Mon, Jul 16, 2018 at 09:43:47AM +0200, Greg KH wrote: > On Sun, Jul 15, 2018 at 04:38:51PM -0400, Jacob Feder wrote: > > On Sun, Jul 15, 2018 at 09:44:58PM +0200, Greg KH wrote: > > > On Sun, Jul 15, 2018 at 12:34:28PM -0400, Jacob Feder wrote: > > > > Hi, > > > > I have updated this with the re

Re: [PATCH 04/18] staging: gasket: device registration error and unregister fixups

2018-07-16 Thread Dan Carpenter
On Fri, Jul 13, 2018 at 10:58:02PM -0700, Todd Poynor wrote: > @@ -376,7 +377,10 @@ int gasket_register_device(const struct > gasket_driver_desc *driver_desc) > fail1: > class_destroy(internal->class); > > +fail0: GW-BASIC sytle label names are an anti-pattern. It's better to name the l

Re: [PATCH 2/2] staging:r8188eu: Use lib80211 to encrypt (CCMP) tx frames

2018-07-16 Thread Michael Straube
On 07/14/18 19:54, Ivan Safonov wrote: Put data to skb, decrypt with lib80211_crypt_ccmp, and place back to tx buffer. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/core/rtw_security.c | 778 +++--- 1 file changed, 72 insertions(+), 706 deletions(-) Hi Ivan

Re: [PATCH 02/10] staging:rtl8192u: remove typedef of struct TS_COMMON_INFO - Style

2018-07-16 Thread John Whitmore
On Mon, Jul 16, 2018 at 10:42:05AM +0200, Greg KH wrote: > On Fri, Jul 13, 2018 at 09:12:39PM +0100, John Whitmore wrote: > > To clear a checkpatch issue removed the typedef of the structure > > TS_COMMON_INFO. > > > > This change removes the previous declaration, which defined two types, both > >

Re: staging:rtl8192u: [0/10] Coding style changes.

2018-07-16 Thread John Whitmore
On Mon, Jul 16, 2018 at 10:40:20AM +0200, Greg KH wrote: > On Fri, Jul 13, 2018 at 09:12:37PM +0100, John Whitmore wrote: > > All coding style changes, but the second [2/10] is a bit more hairy then > > most. The original code combined two typedef declarations into one with both > > the structure a

Re: [PATCH 01/10] staging:rtl8192u: remove typedef of enumeration TR_SELECT - Style

2018-07-16 Thread John Whitmore
On Mon, Jul 16, 2018 at 10:41:38AM +0200, Greg KH wrote: > On Fri, Jul 13, 2018 at 09:12:38PM +0100, John Whitmore wrote: > > To clear a checkpatch issue removed the typedef of the enumeration TR_SELECT > > this should not impact runtime code as it's only a coding style change. > > > > Signed-off-

Re: [PATCH] staging: ks7010_sdio:Fix checkpatch out of memory warning

2018-07-16 Thread Greg KH
On Fri, Jul 13, 2018 at 09:36:36PM +0530, RAGHU Halharvi wrote: > * Patch fixes checkpatch warning "Possible unnecessary 'out of memory' > message" > > Signed-off-by: RAGHU Halharvi > --- > drivers/staging/ks7010/ks7010_sdio.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > >

Re: [PATCH] ks7010_sdio:Fix checkpatch out of memory warning

2018-07-16 Thread Greg KH
On Fri, Jul 13, 2018 at 09:36:36PM +0530, RAGHU Halharvi wrote: > * Patch fixes checkpatch warning "Possible unnecessary 'out of memory' > message" > > Signed-off-by: RAGHU Halharvi Next time please put "staging:" in the subject line, as a prefix, like all other patches for this driver hav

Re: [PATCH] staging: android: ashmem: Shrink directly through shmem_fallocate

2018-07-16 Thread Greg Kroah-Hartman
On Fri, Jul 06, 2018 at 02:44:16PM -0700, Joel Fernandes wrote: > From: Tobias Lindskog > > When ashmem_shrink is called from direct reclaim on a user thread, a > call to do_fallocate will check for permissions against the security > policy of that user thread. It can thus fail by chance if call

[PATCH 2/2] staging: fbtft: Fix line continuation

2018-07-16 Thread Matthias Wolf
Fix checkpatch warning: avoid unnecessary line continuation to allow grepping of whole error message. Signed-off-by: Matthias Wolf Signed-off-by: Felix Siegel Signed-off-by: Tim Cofala --- drivers/staging/fbtft/fb_ssd1351.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --gi

[PATCH 1/2] staging: fbtft: Fix line over 80 characters

2018-07-16 Thread Matthias Wolf
Fix checkpatch line over 80 characters where it seemed appropriate Signed-off-by: Matthias Wolf Signed-off-by: Felix Siegel Signed-off-by: Tim Cofala --- drivers/staging/fbtft/fb_s6d02a1.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/driv

Re: [PATCH] staging: comedi: comedi_fops: Shift assignment operator '=' to previous line

2018-07-16 Thread Ian Abbott
On 14/07/18 16:44, Nishad Kamdar wrote: Shift '=' assignment operator to the end of previous line to conform to preferred kernel style line wrapping. Issue reported by checkpatch CHECK. Signed-off-by: Nishad Kamdar --- drivers/staging/comedi/comedi_fops.c | 4 ++-- 1 file changed, 2 insertio

Re: [PATCH 02/10] staging:rtl8192u: remove typedef of struct TS_COMMON_INFO - Style

2018-07-16 Thread Greg KH
On Fri, Jul 13, 2018 at 09:12:39PM +0100, John Whitmore wrote: > To clear a checkpatch issue removed the typedef of the structure > TS_COMMON_INFO. > > This change removes the previous declaration, which defined two types, both > TS_COMMON_INFO and a pointer type PTS_COMMON_INFO: > > typedef stru

Re: [PATCH 01/10] staging:rtl8192u: remove typedef of enumeration TR_SELECT - Style

2018-07-16 Thread Greg KH
On Fri, Jul 13, 2018 at 09:12:38PM +0100, John Whitmore wrote: > To clear a checkpatch issue removed the typedef of the enumeration TR_SELECT > this should not impact runtime code as it's only a coding style change. > > Signed-off-by: John Whitmore > --- > drivers/staging/rtl8192u/ieee80211/ieee

Re: staging:rtl8192u: [0/10] Coding style changes.

2018-07-16 Thread Greg KH
On Fri, Jul 13, 2018 at 09:12:37PM +0100, John Whitmore wrote: > All coding style changes, but the second [2/10] is a bit more hairy then > most. The original code combined two typedef declarations into one with both > the structure and a pointer to the structure defined. I've totally removed the >

Re: [PATCH 3/4] staging: mt7621: Add braces around macro argument

2018-07-16 Thread Greg KH
On Fri, Jul 13, 2018 at 03:41:05PM +0200, Oliver Hübers wrote: > Add braces around macro argument to avoid precedence problems. That is not what this patch does :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.o

Re: [PATCH 2/4] staging: mt7621-pci: Fix coding style issues reported by checkpatch

2018-07-16 Thread Greg KH
On Fri, Jul 13, 2018 at 03:41:04PM +0200, Oliver Hübers wrote: > From: Vanessa Borgmann > > Fix errors: space errors, braces > Fix warnings: comment warnings > > Signed-off-by: Oliver Hübers > Signed-off-by: Vanessa Borgmann > --- > drivers/staging/mt7621-pci/pci-mt7621.c | 230 > +++

Re: [PATCH] staging: goldfish: Retire a mutable global variable

2018-07-16 Thread Greg KH
On Fri, Jul 13, 2018 at 02:11:11PM -0700, r...@google.com wrote: > From: Roman Kiryanov > > goldfish_audio_device does not have to be global. > > Signed-off-by: Roman Kiryanov > --- > drivers/staging/goldfish/goldfish_audio.c | 19 +-- > 1 file changed, 13 insertions(+), 6 dele

Re: [RFC PATCH v2] Xilinx AXI-Stream FIFO v4.1 IP core driver

2018-07-16 Thread Greg KH
On Sun, Jul 15, 2018 at 04:38:51PM -0400, Jacob Feder wrote: > On Sun, Jul 15, 2018 at 09:44:58PM +0200, Greg KH wrote: > > On Sun, Jul 15, 2018 at 12:34:28PM -0400, Jacob Feder wrote: > > > Hi, > > > I have updated this with the recommended changes. I haven't tried out the > > > UIO though. It wil