[PATCH 09/16] staging: gasket: core: switch to relaxed memory-mapped I/O

2018-08-09 Thread Todd Poynor
From: Todd Poynor Use of readl() is deprecated; readl_relaxed() with appropriate memory barriers is preferred. Switch to relaxed reads and writes for better performance as well. Memory barriers required for I/O vs. normal memory access on Apex devices have already been explicitly coded

[PATCH 10/16] staging: gasket: page table: remove extraneous memory barriers

2018-08-09 Thread Todd Poynor
From: Todd Poynor Some explicit memory barriers in the page table code are not necessary, either because: (a) The barrier follows a non-relaxed MMIO access that already performs a read or write memory barrier. (b) The barrier follows DMA API calls for which the device-visible effects of IOMMU

[PATCH 10/15] staging: gasket: apex: fold device add/remove logic inline

2018-08-05 Thread Todd Poynor
From: Todd Poynor Gasket device drivers are now in charge of the device add and remove sequences; the framework callbacks for these are deleted. Move the apex device add callback code to the probe function. Apex did not implement the removal callback. Signed-off-by: Todd Poynor --- drivers

[PATCH 06/15] staging: gasket: apex: remove device enable and disable callbacks

2018-08-05 Thread Todd Poynor
From: Todd Poynor These are not implemented for apex, and are now being removed from the gasket framework. Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/gasket/apex_driver.c b/drivers/staging/gasket

[PATCH 10/15] staging: gasket: apex: fold device add/remove logic inline

2018-08-05 Thread Todd Poynor
From: Todd Poynor Gasket device drivers are now in charge of the device add and remove sequences; the framework callbacks for these are deleted. Move the apex device add callback code to the probe function. Apex did not implement the removal callback. Signed-off-by: Todd Poynor --- drivers

[PATCH 06/15] staging: gasket: apex: remove device enable and disable callbacks

2018-08-05 Thread Todd Poynor
From: Todd Poynor These are not implemented for apex, and are now being removed from the gasket framework. Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/gasket/apex_driver.c b/drivers/staging/gasket

[PATCH 11/15] staging: gasket: core: remove sysfs setup and cleanup callbacks

2018-08-05 Thread Todd Poynor
From: Todd Poynor Gasket device drivers now call into the gasket framework to initialize and de-initialize, rather than the other way around. The calling code can perform sysfs setup and cleanup actions without callbacks from the framework. Remove the sysfs setup and cleanup callbacks. Signed

[PATCH 12/15] staging: gasket: apex: move sysfs setup code to probe function

2018-08-05 Thread Todd Poynor
From: Todd Poynor The gasket framework no longer provides callbacks to the device driver for sysfs setup and teardown. Move the sysfs setup code to the device probe function. Apex does not implement sysfs cleanup code. Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 14

[PATCH 08/15] staging: gasket: apex: enable/disable gasket device from apex

2018-08-05 Thread Todd Poynor
From: Todd Poynor Gasket framework now places device drivers in charge of calling APIs to enable and disable gasket device operations. Make the appropriate calls from the apex driver. Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 12 1 file changed, 12

[PATCH 11/15] staging: gasket: core: remove sysfs setup and cleanup callbacks

2018-08-05 Thread Todd Poynor
From: Todd Poynor Gasket device drivers now call into the gasket framework to initialize and de-initialize, rather than the other way around. The calling code can perform sysfs setup and cleanup actions without callbacks from the framework. Remove the sysfs setup and cleanup callbacks. Signed

[PATCH 12/15] staging: gasket: apex: move sysfs setup code to probe function

2018-08-05 Thread Todd Poynor
From: Todd Poynor The gasket framework no longer provides callbacks to the device driver for sysfs setup and teardown. Move the sysfs setup code to the device probe function. Apex does not implement sysfs cleanup code. Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 14

[PATCH 08/15] staging: gasket: apex: enable/disable gasket device from apex

2018-08-05 Thread Todd Poynor
From: Todd Poynor Gasket framework now places device drivers in charge of calling APIs to enable and disable gasket device operations. Make the appropriate calls from the apex driver. Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 12 1 file changed, 12

[PATCH 07/15] staging: gasket: core: let device driver enable/disable gasket device

2018-08-05 Thread Todd Poynor
From: Todd Poynor Move gasket device enable/disable functions from internal calls to external calls from the gasket device drivers. The device driver will call these functions at appropriate times in its processing, placing the device driver in control of this sequence and reducing the need

[PATCH 14/15] staging: gasket: apex: place in low power reset until opened

2018-08-05 Thread Todd Poynor
From: Todd Poynor The apex device is left out of reset mode at the end of device probe/initialize processing. Add a call to enter reset at the end of the sequence, triggering power gating and other low power features. Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 4

[PATCH 13/15] staging: gasket: core: protect against races during unregister

2018-08-05 Thread Todd Poynor
From: Todd Poynor Keep mutex held across the unregistration operation, until the driver_desc field of the global table is removed, to prevent a concurrent accessor from looking up the driver_desc while gasket_unregister_device() is in the processing of removing it. Reported-by: Guenter Roeck

[PATCH 07/15] staging: gasket: core: let device driver enable/disable gasket device

2018-08-05 Thread Todd Poynor
From: Todd Poynor Move gasket device enable/disable functions from internal calls to external calls from the gasket device drivers. The device driver will call these functions at appropriate times in its processing, placing the device driver in control of this sequence and reducing the need

[PATCH 14/15] staging: gasket: apex: place in low power reset until opened

2018-08-05 Thread Todd Poynor
From: Todd Poynor The apex device is left out of reset mode at the end of device probe/initialize processing. Add a call to enter reset at the end of the sequence, triggering power gating and other low power features. Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 4

[PATCH 13/15] staging: gasket: core: protect against races during unregister

2018-08-05 Thread Todd Poynor
From: Todd Poynor Keep mutex held across the unregistration operation, until the driver_desc field of the global table is removed, to prevent a concurrent accessor from looking up the driver_desc while gasket_unregister_device() is in the processing of removing it. Reported-by: Guenter Roeck

[PATCH 01/15] staging: gasket: sysfs: clean up state if ENOMEM removing mapping

2018-08-05 Thread Todd Poynor
From: Todd Poynor If kcalloc() returns NULL in put_mapping(), continue to clean up state, including dropping the reference on the struct device and free attribute memory. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_sysfs.c | 13 ++--- 1 file changed, 6 insertions

[PATCH 15/15] staging: gasket: core: remove incorrect extraneous comment

2018-08-05 Thread Todd Poynor
From: Todd Poynor A copy-and-pasted comment from another code sequence is removed from gasket core init sequence. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging

[PATCH 01/15] staging: gasket: sysfs: clean up state if ENOMEM removing mapping

2018-08-05 Thread Todd Poynor
From: Todd Poynor If kcalloc() returns NULL in put_mapping(), continue to clean up state, including dropping the reference on the struct device and free attribute memory. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_sysfs.c | 13 ++--- 1 file changed, 6 insertions

[PATCH 15/15] staging: gasket: core: remove incorrect extraneous comment

2018-08-05 Thread Todd Poynor
From: Todd Poynor A copy-and-pasted comment from another code sequence is removed from gasket core init sequence. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging

[PATCH 03/15] staging: gasket: apex: move PCI core calls to apex driver

2018-08-05 Thread Todd Poynor
From: Todd Poynor Apex driver moves PCI core calls like probe, enable, and remove from gasket to apex. Call new functions in gasket to register apex as a PCI device to the gasket framework. Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 49

[PATCH 04/15] staging: gasket: core: convert remaining info logs to debug

2018-08-05 Thread Todd Poynor
From: Todd Poynor Remaining info-level logs in gasket core converted to debug-level; the information is not needed during normal system operation. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

[PATCH 09/15] staging: gasket: core: delete device add and remove callbacks

2018-08-05 Thread Todd Poynor
From: Todd Poynor Gasket device drivers are now in charge of orchestrating the device add and removal sequences, so the callbacks from the framework to the device drivers for these events are no longer needed. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 10

[PATCH 00/15] staging: gasket: unwrap pci core and more

2018-08-05 Thread Todd Poynor
From: Todd Poynor Stop wrapping PCI core calls like probe, enable, remove, etc. in the gasket framework, move these calls to the device driver instead. Have gasket drivers call into framework on init, enable, disable, etc. sequences, rather than the other way around. Remove the gasket

[PATCH 03/15] staging: gasket: apex: move PCI core calls to apex driver

2018-08-05 Thread Todd Poynor
From: Todd Poynor Apex driver moves PCI core calls like probe, enable, and remove from gasket to apex. Call new functions in gasket to register apex as a PCI device to the gasket framework. Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 49

[PATCH 04/15] staging: gasket: core: convert remaining info logs to debug

2018-08-05 Thread Todd Poynor
From: Todd Poynor Remaining info-level logs in gasket core converted to debug-level; the information is not needed during normal system operation. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

[PATCH 09/15] staging: gasket: core: delete device add and remove callbacks

2018-08-05 Thread Todd Poynor
From: Todd Poynor Gasket device drivers are now in charge of orchestrating the device add and removal sequences, so the callbacks from the framework to the device drivers for these events are no longer needed. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 10

[PATCH 00/15] staging: gasket: unwrap pci core and more

2018-08-05 Thread Todd Poynor
From: Todd Poynor Stop wrapping PCI core calls like probe, enable, remove, etc. in the gasket framework, move these calls to the device driver instead. Have gasket drivers call into framework on init, enable, disable, etc. sequences, rather than the other way around. Remove the gasket

[PATCH 05/15] staging: gasket: core: remove device enable and disable callbacks

2018-08-05 Thread Todd Poynor
From: Todd Poynor Device enable/disable operations are moving from being initiated through the gasket framework to being initiated by the gasket device driver. The driver can perform any processing needed for these operations before or after the calls into the framework. Neither

[PATCH 02/15] staging: gasket: core: move core PCI calls to device drivers

2018-08-05 Thread Todd Poynor
From: Todd Poynor Remove gasket wrapping of PCI probe, enable, disable, and remove functions. Replace with calls to add and remove PCI gasket devices, to be called by the gasket device drivers. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 82

[PATCH 05/15] staging: gasket: core: remove device enable and disable callbacks

2018-08-05 Thread Todd Poynor
From: Todd Poynor Device enable/disable operations are moving from being initiated through the gasket framework to being initiated by the gasket device driver. The driver can perform any processing needed for these operations before or after the calls into the framework. Neither

[PATCH 02/15] staging: gasket: core: move core PCI calls to device drivers

2018-08-05 Thread Todd Poynor
From: Todd Poynor Remove gasket wrapping of PCI probe, enable, disable, and remove functions. Replace with calls to add and remove PCI gasket devices, to be called by the gasket device drivers. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 82

[PATCH 1/4] staging: gasket: core: remove registration logs

2018-08-02 Thread Todd Poynor
From: Todd Poynor Remove logs for loading gasket drivers. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c index 2b75f100da4d3..fa477d0c3c74c

[PATCH 0/4 v2] staging: gasket: cleanups du jour

2018-08-02 Thread Todd Poynor
From: Todd Poynor More cleanups for the gasket+apex drivers. Patched changed in v2 from v1: staging: gasket: core: print driver version code at registration time staging: gasket: core: move driver loaded log after error cases Above 2 patches replaced by new patch: staging

[PATCH 0/4 v2] staging: gasket: cleanups du jour

2018-08-02 Thread Todd Poynor
From: Todd Poynor More cleanups for the gasket+apex drivers. Patched changed in v2 from v1: staging: gasket: core: print driver version code at registration time staging: gasket: core: move driver loaded log after error cases Above 2 patches replaced by new patch: staging

[PATCH 1/4] staging: gasket: core: remove registration logs

2018-08-02 Thread Todd Poynor
From: Todd Poynor Remove logs for loading gasket drivers. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c index 2b75f100da4d3..fa477d0c3c74c

[PATCH 4/4] Revert "staging: gasket: core: hold reference to pci_dev while used"

2018-08-02 Thread Todd Poynor
From: Todd Poynor There's no need to take an additional reference on the pci_dev structure for the pointer copy saved in gasket data structures. This reverts commit: 8dd8a48b9a7d ("staging: gasket: core: hold reference to pci_dev while used") Reported-by: Dmitry Torokhov Signed-of

[PATCH 4/4] Revert "staging: gasket: core: hold reference to pci_dev while used"

2018-08-02 Thread Todd Poynor
From: Todd Poynor There's no need to take an additional reference on the pci_dev structure for the pointer copy saved in gasket data structures. This reverts commit: 8dd8a48b9a7d ("staging: gasket: core: hold reference to pci_dev while used") Reported-by: Dmitry Torokhov Signed-of

[PATCH 3/4] staging: gasket: core: add subsystem and device info to logs

2018-08-02 Thread Todd Poynor
From: Todd Poynor Identify gasket as the subsystem printing various messages. Add the driver name to appropriate messages to indicate which driver has a problem. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 13 + 1 file changed, 9 insertions(+), 4

[PATCH 3/4] staging: gasket: core: add subsystem and device info to logs

2018-08-02 Thread Todd Poynor
From: Todd Poynor Identify gasket as the subsystem printing various messages. Add the driver name to appropriate messages to indicate which driver has a problem. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 13 + 1 file changed, 9 insertions(+), 4

[PATCH 2/4] staging: gasket: core: device register debug log cleanups

2018-08-02 Thread Todd Poynor
From: Todd Poynor At device/driver registration time, convert a not-very-informative info message to a more informative debug message, drop some not overly helpful debug messages. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 7 ++- 1 file changed, 2 insertions

[PATCH 2/4] staging: gasket: core: device register debug log cleanups

2018-08-02 Thread Todd Poynor
From: Todd Poynor At device/driver registration time, convert a not-very-informative info message to a more informative debug message, drop some not overly helpful debug messages. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 7 ++- 1 file changed, 2 insertions

[PATCH 4/8] staging: gasket: core: device register debug log cleanups

2018-08-02 Thread Todd Poynor
From: Todd Poynor At device/driver registration time, convert a not-very-informative info message to a more informative dbeug message, drop some not overly helpful debug messages. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 7 ++- 1 file changed, 2 insertions

[PATCH 7/8] staging: gasket: apex: drop reset type param

2018-08-02 Thread Todd Poynor
From: Todd Poynor Apex doesn't implement different types of resets based on the reset type param passed through the gasket layer or from userspace via the gasket_reset ioctl. The reset type is dropped from the gasket framework in a previous patch due to a lack of present need and non-conforming

[PATCH 4/8] staging: gasket: core: device register debug log cleanups

2018-08-02 Thread Todd Poynor
From: Todd Poynor At device/driver registration time, convert a not-very-informative info message to a more informative dbeug message, drop some not overly helpful debug messages. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 7 ++- 1 file changed, 2 insertions

[PATCH 7/8] staging: gasket: apex: drop reset type param

2018-08-02 Thread Todd Poynor
From: Todd Poynor Apex doesn't implement different types of resets based on the reset type param passed through the gasket layer or from userspace via the gasket_reset ioctl. The reset type is dropped from the gasket framework in a previous patch due to a lack of present need and non-conforming

[PATCH 3/8] staging: gasket: core: move driver loaded log after error cases

2018-08-02 Thread Todd Poynor
From: Todd Poynor Gasket could claim to have loaded a driver and then print an error indicating it actually did not. Move the driver registration message after the last error check. Replace the existing "loaded successfully" message with this instead. Signed-off-by: Todd Poynor --

[PATCH 1/8] staging: gasket: apex: enable power save mode by default

2018-08-02 Thread Todd Poynor
From: Todd Poynor Set default value of allow_power_save parameter to enable power save mode, which is expected to be the state usually desired. Signed-off-by: Marty Faltesek Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 3/8] staging: gasket: core: move driver loaded log after error cases

2018-08-02 Thread Todd Poynor
From: Todd Poynor Gasket could claim to have loaded a driver and then print an error indicating it actually did not. Move the driver registration message after the last error check. Replace the existing "loaded successfully" message with this instead. Signed-off-by: Todd Poynor --

[PATCH 1/8] staging: gasket: apex: enable power save mode by default

2018-08-02 Thread Todd Poynor
From: Todd Poynor Set default value of allow_power_save parameter to enable power save mode, which is expected to be the state usually desired. Signed-off-by: Marty Faltesek Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 0/8] staging: gasket: cleanups du jour

2018-08-02 Thread Todd Poynor
From: Todd Poynor More cleanups for the gasket+apex drivers. Todd Poynor (8): staging: gasket: apex: enable power save mode by default staging: gasket: core: print driver version code at registration time staging: gasket: core: move driver loaded log after error cases staging: gasket

[PATCH 8/8] Revert "staging: gasket: core: hold reference to pci_dev while used"

2018-08-02 Thread Todd Poynor
From: Todd Poynor There's no need to take an additional reference on the pci_dev structure for the pointer copy saved in gasket data structures. This reverts commit 8dd8a48b9a7dae5493494a8603adddfdf1914716. Reported-by: Dmitry Torokhov Signed-off-by: Todd Poynor --- drivers/staging/gasket

[PATCH 0/8] staging: gasket: cleanups du jour

2018-08-02 Thread Todd Poynor
From: Todd Poynor More cleanups for the gasket+apex drivers. Todd Poynor (8): staging: gasket: apex: enable power save mode by default staging: gasket: core: print driver version code at registration time staging: gasket: core: move driver loaded log after error cases staging: gasket

[PATCH 8/8] Revert "staging: gasket: core: hold reference to pci_dev while used"

2018-08-02 Thread Todd Poynor
From: Todd Poynor There's no need to take an additional reference on the pci_dev structure for the pointer copy saved in gasket data structures. This reverts commit 8dd8a48b9a7dae5493494a8603adddfdf1914716. Reported-by: Dmitry Torokhov Signed-off-by: Todd Poynor --- drivers/staging/gasket

[PATCH 6/8] staging: gasket: remove "reset type" param from framework

2018-08-02 Thread Todd Poynor
From: Todd Poynor The "type of reset" parameter to the gasket device reset APIs isn't required by the only gasket device submitted upstream, apex. The framework documents the param as private to the device driver and a pass-through at the gasket layer, but the gasket core calls

[PATCH 5/8] staging: gasket: core: add subsystem and device info to error logs

2018-08-02 Thread Todd Poynor
From: Todd Poynor Identify gasket as the subsystem printing various error messages. Add the driver name to appropriate messages to indicate which driver has a problem. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 27 +++ 1 file changed, 15

[PATCH 6/8] staging: gasket: remove "reset type" param from framework

2018-08-02 Thread Todd Poynor
From: Todd Poynor The "type of reset" parameter to the gasket device reset APIs isn't required by the only gasket device submitted upstream, apex. The framework documents the param as private to the device driver and a pass-through at the gasket layer, but the gasket core calls

[PATCH 5/8] staging: gasket: core: add subsystem and device info to error logs

2018-08-02 Thread Todd Poynor
From: Todd Poynor Identify gasket as the subsystem printing various error messages. Add the driver name to appropriate messages to indicate which driver has a problem. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 27 +++ 1 file changed, 15

[PATCH 2/8] staging: gasket: core: print driver version code at registration time

2018-08-02 Thread Todd Poynor
From: Todd Poynor Print the driver version code in the kernel log at gasket driver registration time for informational purposes. Add "gasket:" prefix to make clear it is the gasket framework logging this information. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_

[PATCH 2/8] staging: gasket: core: print driver version code at registration time

2018-08-02 Thread Todd Poynor
From: Todd Poynor Print the driver version code in the kernel log at gasket driver registration time for informational purposes. Add "gasket:" prefix to make clear it is the gasket framework logging this information. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_

[PATCH 05/15] staging: gasket: TODO: remove entry for static function declarations

2018-07-31 Thread Todd Poynor
From: Todd Poynor The static function declarations are removed, remove the TODO file entry for this. Signed-off-by: Todd Poynor --- drivers/staging/gasket/TODO | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/gasket/TODO b/drivers/staging/gasket/TODO index 7f4c13ce021b

[PATCH 05/15] staging: gasket: TODO: remove entry for static function declarations

2018-07-31 Thread Todd Poynor
From: Todd Poynor The static function declarations are removed, remove the TODO file entry for this. Signed-off-by: Todd Poynor --- drivers/staging/gasket/TODO | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/gasket/TODO b/drivers/staging/gasket/TODO index 7f4c13ce021b

[PATCH 09/15] staging: gasket: sysfs: fix function param line continuation style

2018-07-31 Thread Todd Poynor
From: Todd Poynor Fix multi-line alignment formatting to look like: int ret = long_function_name(device, VARIABLE1, VARIABLE2, VARIABLE3, VARIABLE4); Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_sysfs.c | 26

[PATCH 03/15] staging: gasket: interrupt: remove static function forward declarations

2018-07-31 Thread Todd Poynor
From: Todd Poynor Remove forward declarations of static functions, move code to avoid forward references, for kernel style. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_interrupt.c | 499 +++--- 1 file changed, 242 insertions(+), 257 deletions(-) diff --git

[PATCH 14/15] Revert "staging: gasket: page table: hold references to device and pci_dev"

2018-07-31 Thread Todd Poynor
From: Todd Poynor gasket_free_dev() is called only from driver PCI probe and remove function. It is guaranteed that that pci_dev structure is not going anywhere during that time; there is no need to take this additional reference. This reverts commit dd9d1502feea3c23d412f289aad79e1d4e86d45d

[PATCH 14/15] Revert "staging: gasket: page table: hold references to device and pci_dev"

2018-07-31 Thread Todd Poynor
From: Todd Poynor gasket_free_dev() is called only from driver PCI probe and remove function. It is guaranteed that that pci_dev structure is not going anywhere during that time; there is no need to take this additional reference. This reverts commit dd9d1502feea3c23d412f289aad79e1d4e86d45d

[PATCH 09/15] staging: gasket: sysfs: fix function param line continuation style

2018-07-31 Thread Todd Poynor
From: Todd Poynor Fix multi-line alignment formatting to look like: int ret = long_function_name(device, VARIABLE1, VARIABLE2, VARIABLE3, VARIABLE4); Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_sysfs.c | 26

[PATCH 03/15] staging: gasket: interrupt: remove static function forward declarations

2018-07-31 Thread Todd Poynor
From: Todd Poynor Remove forward declarations of static functions, move code to avoid forward references, for kernel style. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_interrupt.c | 499 +++--- 1 file changed, 242 insertions(+), 257 deletions(-) diff --git

[PATCH 08/15] staging: gasket: page table: fix function param line continuation style

2018-07-31 Thread Todd Poynor
From: Todd Poynor Fix multi-line alignment formatting to look like: int ret = long_function_name(device, VARIABLE1, VARIABLE2, VARIABLE3, VARIABLE4); Many of these TODO items were previously cleaned up during the conversion to standard logging functions

[PATCH 15/15] staging: gasket: page table: fix header file include guard symbol

2018-07-31 Thread Todd Poynor
From: Todd Poynor The include guard symbol for gasket_page_table.h is out-of-date. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/gasket/gasket_page_table.h b/drivers/staging

[PATCH 08/15] staging: gasket: page table: fix function param line continuation style

2018-07-31 Thread Todd Poynor
From: Todd Poynor Fix multi-line alignment formatting to look like: int ret = long_function_name(device, VARIABLE1, VARIABLE2, VARIABLE3, VARIABLE4); Many of these TODO items were previously cleaned up during the conversion to standard logging functions

[PATCH 15/15] staging: gasket: page table: fix header file include guard symbol

2018-07-31 Thread Todd Poynor
From: Todd Poynor The include guard symbol for gasket_page_table.h is out-of-date. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/gasket/gasket_page_table.h b/drivers/staging

[PATCH 10/15] staging: gasket: interrupt: fix function param line continuation style

2018-07-31 Thread Todd Poynor
From: Todd Poynor Fix multi-line alignment formatting to look like: int ret = long_function_name(device, VARIABLE1, VARIABLE2, VARIABLE3, VARIABLE4); Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_interrupt.c | 73

[PATCH 11/15] staging: gasket: TODO: remove entry for multi-line alignment style

2018-07-31 Thread Todd Poynor
From: Todd Poynor Multi-line alignment formatting issues fixed, remove the TODO entry for this. Signed-off-by: Todd Poynor --- drivers/staging/gasket/TODO | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/gasket/TODO b/drivers/staging/gasket/TODO index 6aa2a7f6bc4b

[PATCH 13/15] staging: gasket: core: use bool type for ns_capable result

2018-07-31 Thread Todd Poynor
From: Todd Poynor When gasket core was converted from using capable() to use ns_capable() instead, the type of the variable holding the result should have been converted from int to bool. Reported-by: Dmitry Torokhov Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4

[PATCH 12/15] staging: gasket: apex: move driver-private defines out of apex.h

2018-07-31 Thread Todd Poynor
From: Todd Poynor apex.h is supposed to contain kernel-userspace interface definitions, but has a number of defines that are only used by apex_driver.c or are not used at all. Move driver implementation defines not shared with userspace to the driver source. Remove unused defines. Signed-off

[PATCH 10/15] staging: gasket: interrupt: fix function param line continuation style

2018-07-31 Thread Todd Poynor
From: Todd Poynor Fix multi-line alignment formatting to look like: int ret = long_function_name(device, VARIABLE1, VARIABLE2, VARIABLE3, VARIABLE4); Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_interrupt.c | 73

[PATCH 11/15] staging: gasket: TODO: remove entry for multi-line alignment style

2018-07-31 Thread Todd Poynor
From: Todd Poynor Multi-line alignment formatting issues fixed, remove the TODO entry for this. Signed-off-by: Todd Poynor --- drivers/staging/gasket/TODO | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/gasket/TODO b/drivers/staging/gasket/TODO index 6aa2a7f6bc4b

[PATCH 13/15] staging: gasket: core: use bool type for ns_capable result

2018-07-31 Thread Todd Poynor
From: Todd Poynor When gasket core was converted from using capable() to use ns_capable() instead, the type of the variable holding the result should have been converted from int to bool. Reported-by: Dmitry Torokhov Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4

[PATCH 12/15] staging: gasket: apex: move driver-private defines out of apex.h

2018-07-31 Thread Todd Poynor
From: Todd Poynor apex.h is supposed to contain kernel-userspace interface definitions, but has a number of defines that are only used by apex_driver.c or are not used at all. Move driver implementation defines not shared with userspace to the driver source. Remove unused defines. Signed-off

[PATCH 07/15] staging: gasket: ioctl: fix function param line continuation style

2018-07-31 Thread Todd Poynor
From: Todd Poynor Fix multi-line alignment formatting to look like: int ret = long_function_name(device, VARIABLE1, VARIABLE2, VARIABLE3, VARIABLE4); Many of these TODO items were previously cleaned up during the conversion to standard logging functions

[PATCH 06/15] staging: gasket: core: fix function param line continuation style

2018-07-31 Thread Todd Poynor
From: Todd Poynor Fix multi-line alignment formatting to look like: int ret = long_function_name(device, VARIABLE1, VARIABLE2, VARIABLE3, VARIABLE4); Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 294

[PATCH 00/15] staging: gasket: cleanups continue

2018-07-31 Thread Todd Poynor
From: Todd Poynor More cleanups for the gasket and apex drivers: finish up TODO items for static function forward declarations and multi-line alignment style, a couple of fixups for recent patch feedback, and a couple other issues found in the meantime. Todd Poynor (15): staging: gasket: core

[PATCH 04/15] staging: gasket: pg tbl: remove static function forward declarations

2018-07-31 Thread Todd Poynor
From: Todd Poynor Remove forward declarations of static functions, move code to avoid forward references, for kernel style. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 1433 ++-- 1 file changed, 684 insertions(+), 749 deletions(-) diff --git

[PATCH 02/15] staging: gasket: ioctl: remove static function forward declarations

2018-07-31 Thread Todd Poynor
From: Todd Poynor Remove forward declarations of static functions, move code to avoid forward references, for kernel style. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_ioctl.c | 356 -- 1 file changed, 168 insertions(+), 188 deletions(-) diff --git

[PATCH 01/15] staging: gasket: core: remove static function forward declarations

2018-07-31 Thread Todd Poynor
From: Todd Poynor Remove forward declarations of static functions, move code to avoid forward references, for kernel style. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 1900 +- 1 file changed, 922 insertions(+), 978 deletions(-) diff --git

[PATCH 07/15] staging: gasket: ioctl: fix function param line continuation style

2018-07-31 Thread Todd Poynor
From: Todd Poynor Fix multi-line alignment formatting to look like: int ret = long_function_name(device, VARIABLE1, VARIABLE2, VARIABLE3, VARIABLE4); Many of these TODO items were previously cleaned up during the conversion to standard logging functions

[PATCH 06/15] staging: gasket: core: fix function param line continuation style

2018-07-31 Thread Todd Poynor
From: Todd Poynor Fix multi-line alignment formatting to look like: int ret = long_function_name(device, VARIABLE1, VARIABLE2, VARIABLE3, VARIABLE4); Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 294

[PATCH 00/15] staging: gasket: cleanups continue

2018-07-31 Thread Todd Poynor
From: Todd Poynor More cleanups for the gasket and apex drivers: finish up TODO items for static function forward declarations and multi-line alignment style, a couple of fixups for recent patch feedback, and a couple other issues found in the meantime. Todd Poynor (15): staging: gasket: core

[PATCH 04/15] staging: gasket: pg tbl: remove static function forward declarations

2018-07-31 Thread Todd Poynor
From: Todd Poynor Remove forward declarations of static functions, move code to avoid forward references, for kernel style. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 1433 ++-- 1 file changed, 684 insertions(+), 749 deletions(-) diff --git

[PATCH 02/15] staging: gasket: ioctl: remove static function forward declarations

2018-07-31 Thread Todd Poynor
From: Todd Poynor Remove forward declarations of static functions, move code to avoid forward references, for kernel style. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_ioctl.c | 356 -- 1 file changed, 168 insertions(+), 188 deletions(-) diff --git

[PATCH 01/15] staging: gasket: core: remove static function forward declarations

2018-07-31 Thread Todd Poynor
From: Todd Poynor Remove forward declarations of static functions, move code to avoid forward references, for kernel style. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 1900 +- 1 file changed, 922 insertions(+), 978 deletions(-) diff --git

Re: [PATCH 01/13] staging: gasket: core: hold reference to pci_dev while used

2018-07-31 Thread Todd Poynor
On Mon, Jul 30, 2018 at 11:19 PM Dmitry Torokhov wrote: > > On Sun, Jul 29, 2018 at 12:37 PM Todd Poynor wrote: > > > > From: Todd Poynor > > > > Hold a reference on the struct pci_dev while a pointer to it is held in > > the gasket data structures

Re: [PATCH 01/13] staging: gasket: core: hold reference to pci_dev while used

2018-07-31 Thread Todd Poynor
On Mon, Jul 30, 2018 at 11:19 PM Dmitry Torokhov wrote: > > On Sun, Jul 29, 2018 at 12:37 PM Todd Poynor wrote: > > > > From: Todd Poynor > > > > Hold a reference on the struct pci_dev while a pointer to it is held in > > the gasket data structures

Re: [PATCH 04/13] staging: gasket: core: allow root access based on user namespace

2018-07-30 Thread Todd Poynor
Hi Dmitry, On Mon, Jul 30, 2018 at 10:57 AM Dmitry Torokhov wrote: > > Hi Todd, > > On Sun, Jul 29, 2018 at 12:37 PM Todd Poynor wrote: > > @@ -1064,7 +1067,8 @@ static int gasket_open(struct inode *inode, struct > > file *filp) > > char task_name[TASK

Re: [PATCH 04/13] staging: gasket: core: allow root access based on user namespace

2018-07-30 Thread Todd Poynor
Hi Dmitry, On Mon, Jul 30, 2018 at 10:57 AM Dmitry Torokhov wrote: > > Hi Todd, > > On Sun, Jul 29, 2018 at 12:37 PM Todd Poynor wrote: > > @@ -1064,7 +1067,8 @@ static int gasket_open(struct inode *inode, struct > > file *filp) > > char task_name[TASK

[PATCH 01/13] staging: gasket: core: hold reference to pci_dev while used

2018-07-29 Thread Todd Poynor
From: Todd Poynor Hold a reference on the struct pci_dev while a pointer to it is held in the gasket data structures. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/gasket

[PATCH 02/13] staging: gasket: sysfs: hold reference to device while in use

2018-07-29 Thread Todd Poynor
From: Todd Poynor Hold a reference to the struct device while a gasket sysfs mapping exists for the device and a pointer to the struct is kept in the mapping data structures. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_sysfs.c | 11 +-- 1 file changed, 5 insertions

<    1   2   3   4   5   6   7   8   >