[PATCH 01/10] staging: fsl-mc: drop unused dpcon APIs

2017-11-17 Thread laurentiu.tudor
From: Laurentiu Tudor Couple of API functions are not used so lets drop them together with the associated structures and defines. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dpcon-cmd.h | 6 --- drivers/staging/fsl-mc/bus/dpcon.c | 69 --

[PATCH 02/10] staging: fsl-mc/dpio: remove incomplete refcount implementation

2017-11-17 Thread laurentiu.tudor
From: Laurentiu Tudor There's an unfinished implementation of reference counting for dpaa2_io structure using atomics. Since it's unused lets remove it for now and, if needed at a later time, make use of krefs instead of rolling our own refcounting. Signed-off-by: Laurentiu Tudor --- drivers/s

[PATCH 04/10] staging: fsl-mc/dpio: remove couple of unused functions

2017-11-17 Thread laurentiu.tudor
From: Laurentiu Tudor These couple of functions are not yet used so lets remove them for now and add them back when/if needed. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 58 -- drivers/staging/fsl-mc/include/dpaa2-io.h | 4

[PATCH 03/10] staging: fsl-mc/dpio: drop EXPORT_SYMBOL() for a few functions

2017-11-17 Thread laurentiu.tudor
From: Laurentiu Tudor These functions are only used within this driver so no need for EXPORT_SYMBOL(). Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c b/drive

[PATCH 08/10] staging: fsl-mc: remove debug WARN_ONs doubling error checks

2017-11-17 Thread laurentiu.tudor
From: Laurentiu Tudor A lot of error checks are doubled by debug WARN_ONs. Given that the driver was thoroughly debugged and is in a stable state, it's time to drop them. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dprc-driver.c | 20 ++--- drivers/staging/fsl-mc/bu

[PATCH 07/10] staging: fsl-mc: remove some superfluous WARN_ONs

2017-11-17 Thread laurentiu.tudor
From: Laurentiu Tudor These WARN_ONs shouldn't trigger unless something went very wrong. Since the driver is in a stable state let's remove these debug WARN_ONs. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dprc-driver.c | 8 drivers/staging/fsl-mc/bus/f

[PATCH 09/10] staging: fsl-mc: add support for device type

2017-11-17 Thread laurentiu.tudor
From: Laurentiu Tudor The MC bus has different types of devices and this is supported by device model. This patch adds initial support for device types (defines them, adds helpers and sets the device type). Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 67 +++

[PATCH 05/10] staging: fsl-mc: consistently use EXPORT_SYMBOL_GPL()

2017-11-17 Thread laurentiu.tudor
From: Laurentiu Tudor The bus driver is mixing EXPORT_SYMBOL()/EXPORT_SYMBOL_GPL() usage. Change it to consistently use EXPORT_SYMBOL_GPL(). Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dpbp.c | 16 drivers/staging/fsl-mc/bus/dpcon.c | 14 +++--- dr

[PATCH 06/10] staging: fsl-mc/dpio: change to use EXPORT_SYMBOL_GPL()

2017-11-17 Thread laurentiu.tudor
From: Laurentiu Tudor No need to use EXPORT_SYMBOL() so switch to the GPL variant. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-s

[PATCH 10/10] staging: fsl-mc: use device_type instead of strcmp()

2017-11-17 Thread laurentiu.tudor
From: Laurentiu Tudor Replace strcmp() based device type checks with the standard device model type. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dprc-driver.c | 4 ++-- drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 20 ++-- drivers/staging/fsl-mc/bus/f

[PATCH] staging: fsl-mc: fix uninitialized variable use

2017-11-27 Thread laurentiu.tudor
From: Laurentiu Tudor Fix this warning triggering on a powerpc build: warning: 'error' may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/stag

[PATCH v3] staging: fsl-mc: move bus driver out of staging

2017-11-28 Thread laurentiu.tudor
From: Stuart Yoder Move the source files out of staging into their final locations: -include files in drivers/staging/fsl-mc/include go to include/linux/fsl -irq-gic-v3-its-fsl-mc-msi.c goes to drivers/irqchip -source in drivers/staging/fsl-mc/bus goes to drivers/bus/fsl-mc -README.txt, p

[PATCH] powerpc: booke: fix boot crash due to null hugepd

2017-05-16 Thread laurentiu.tudor
From: Laurentiu Tudor On 32-bit book-e machines, hugepd_ok() does not take into account null hugepd values, causing this crash at boot: Unable to handle kernel paging request for data at address 0x8000 Faulting instruction address: 0xc00182a8 Oops: Kernel access of bad area, sig: 11 [#1] SMP

[PATCH 1/3] staging: fsl-mc: fix several checkpath.pl warnings

2017-05-19 Thread laurentiu.tudor
From: Laurentiu Tudor Remove several unneeded #includes, forward declarations and fix several issues reported by checkpatch.pl --strict, such as: - kfree(NULL) is safe and check is not required - macro argument reuse may cause possible side effects - enclose macro params in parens to avoid pre

[PATCH 0/3][v4] staging: fsl-mc: move bus driver out of staging

2017-05-19 Thread laurentiu.tudor
From: Laurentiu Tudor Now that there is a functional ethernet driver probed on the mc bus this patch series requests that the fsl-mc bus driver be moved out of staging. The proposed destination for the bus driver is drivers/bus. Proposed location for global header files for fsl-mc and dpaa2 is t

[PATCH 3/3][v4] staging: fsl-mc: move bus driver out of staging

2017-05-19 Thread laurentiu.tudor
From: Stuart Yoder Move the source files out of staging into their final locations: -include files in drivers/staging/fsl-mc/include go to include/linux/fsl -irq-gic-v3-its-fsl-mc-msi.c goes to drivers/irqchip -source in drivers/staging/fsl-mc/bus goes to drivers/bus/fsl-mc -README.txt, p

[PATCH 2/3] staging: fsl-mc: add binding path to MAINTAINERS

2017-05-19 Thread laurentiu.tudor
From: Laurentiu Tudor Signed-off-by: Laurentiu Tudor --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index f7d568b..50b3c36 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10542,6 +10542,7 @@ M: Laurentiu Tudor L: linux-ker...@vger.kernel.

[PATCH 0/5][v5] staging: fsl-mc: move bus driver out of staging

2017-05-22 Thread laurentiu.tudor
From: Laurentiu Tudor Now that there is a functional ethernet driver probed on the mc bus this patch series requests that the fsl-mc bus driver be moved out of staging. The proposed destination for the bus driver is drivers/bus. Proposed location for global header files for fsl-mc and dpaa2 is t

[PATCH 3/5] staging: fsl-mc: drop reference to restool

2017-05-22 Thread laurentiu.tudor
From: Laurentiu Tudor Drop reference to user space restool utility from the README. It will be added back together with the actual support in the bus driver. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/README.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --gi

[PATCH 2/5][v2] staging: fsl-mc: add binding path to MAINTAINERS

2017-05-22 Thread laurentiu.tudor
From: Laurentiu Tudor Signed-off-by: Laurentiu Tudor --- Notes: -v2 -no changes MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9e98464..ffac090 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10545,6 +10545,7 @@ M: Laurentiu Tudor

[PATCH 4/5] staging: fsl-mc: add reference to mc-bus DT binding

2017-05-22 Thread laurentiu.tudor
From: Laurentiu Tudor Update README to reference the mc-bus device tree node binding. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/README.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/fsl-mc/README.txt b/drivers/staging/fsl-mc/README.txt index d7cd70a.

[PATCH 1/5][v2] staging: fsl-mc: fix several checkpath.pl warnings

2017-05-22 Thread laurentiu.tudor
From: Laurentiu Tudor Remove several unneeded #includes, forward declarations and fix several issues reported by checkpatch.pl --strict, such as: - kfree(NULL) is safe and check is not required - macro argument reuse may cause possible side effects - enclose macro params in parens to avoid pre

[PATCH 5/5][v5] staging: fsl-mc: move bus driver out of staging

2017-05-22 Thread laurentiu.tudor
From: Stuart Yoder Move the source files out of staging into their final locations: -include files in drivers/staging/fsl-mc/include go to include/linux/fsl -irq-gic-v3-its-fsl-mc-msi.c goes to drivers/irqchip -source in drivers/staging/fsl-mc/bus goes to drivers/bus/fsl-mc -README.txt, p

[PATCH 01/10] staging: fsl-mc: enclose macro params in parens

2017-05-31 Thread laurentiu.tudor
From: Laurentiu Tudor Several macros didn't had macro params enclosed in parens. Fix them to avoid precedence issues. Found with checkpatch.pl who was issuing this message: "Macro argument 'id' may be better as '(id)' to avoid precedence issues" Signed-off-by: Laurentiu Tudor --- drivers

[PATCH v6 00/10] staging: fsl-mc: move bus driver out of staging

2017-05-31 Thread laurentiu.tudor
From: Laurentiu Tudor Now that there is a functional ethernet driver probed on the mc bus this patch series requests that the fsl-mc bus driver be moved out of staging. The proposed destination for the bus driver is drivers/bus. Proposed location for global header files for fsl-mc and dpaa2 is t

[PATCH 03/10] staging: fsl-mc: simplify couple of deallocations

2017-05-31 Thread laurentiu.tudor
From: Laurentiu Tudor Simplify a couple of deallocations code paths. This also fixes these checkpatch.pl false positives: "WARNING: kfree(NULL) is safe and this check is probably not required" Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 12 +++- 1

[PATCH 04/10] staging: fsl-mc: drop a few useless #includes

2017-05-31 Thread laurentiu.tudor
From: Laurentiu Tudor Some #includes were needlessly done from header files. Drop them from there and update the only .c file that implicitly needed one of those #includes. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 1 + drivers/staging/fsl-mc/bus/fsl-mc-p

[PATCH 02/10] staging: fsl-mc: fix macros with possible side effects

2017-05-31 Thread laurentiu.tudor
From: Laurentiu Tudor Several macros were triggering this checkpatch.pl warning: "Macro argument reuse '$arg' - possible side-effects?" Fix the warning by avoiding multiple macro argument use. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dprc-driver.c | 10 +++--- d

[PATCH 05/10] staging: fsl-mc: remove extra blank line

2017-05-31 Thread laurentiu.tudor
From: Laurentiu Tudor Remove extra blank line reported by checkpatch.pl. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/include/dprc.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/fsl-mc/include/dprc.h b/drivers/staging/fsl-mc/include/dprc.h index 8498a5e..2f4

[PATCH 06/10] staging: fsl-mc: drop unused forward declaration

2017-05-31 Thread laurentiu.tudor
From: Laurentiu Tudor This forward declaration of "struct fsl_mc_resource" is of no use so drop it. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/include/mc-sys.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/fsl-mc/include/mc-sys.h b/drivers/staging/fsl-mc/in

[PATCH 08/10] staging: fsl-mc: drop reference to restool

2017-05-31 Thread laurentiu.tudor
From: Laurentiu Tudor Drop reference to user space restool utility from the README. It will be added back together with the actual support in the bus driver. Signed-off-by: Laurentiu Tudor --- Notes: -no changes drivers/staging/fsl-mc/README.txt | 4 +--- 1 file changed, 1 insertion(+), 3

[PATCH 09/10] staging: fsl-mc: add reference to mc-bus DT binding

2017-05-31 Thread laurentiu.tudor
From: Laurentiu Tudor Update README to reference the mc-bus device tree node binding. Signed-off-by: Laurentiu Tudor --- Notes: -no changes drivers/staging/fsl-mc/README.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/fsl-mc/README.txt b/drivers/staging/fsl-mc/RE

[PATCH v4 10/10] staging: fsl-mc: move bus driver out of staging

2017-05-31 Thread laurentiu.tudor
From: Stuart Yoder Move the source files out of staging into their final locations: -include files in drivers/staging/fsl-mc/include go to include/linux/fsl -irq-gic-v3-its-fsl-mc-msi.c goes to drivers/irqchip -source in drivers/staging/fsl-mc/bus goes to drivers/bus/fsl-mc -README.txt, p

[PATCH v2 07/10] staging: fsl-mc: add binding path to MAINTAINERS

2017-05-31 Thread laurentiu.tudor
From: Laurentiu Tudor The mc bus device tree binding is maintained but not mentioned in the MAINTAINERS file. This patch adds it. Signed-off-by: Laurentiu Tudor --- Notes: -v2 -added commit description MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAI

[PATCH v7 00/10] staging: fsl-mc: move bus driver out of staging

2017-06-08 Thread laurentiu.tudor
From: Laurentiu Tudor Now that there is a functional ethernet driver probed on the mc bus this patch series requests that the fsl-mc bus driver be moved out of staging. The proposed destination for the bus driver is drivers/bus. Proposed location for global header files for fsl-mc and dpaa2 is t

[PATCH v7 02/10] staging: fsl-mc: fix macros with possible side effects

2017-06-08 Thread laurentiu.tudor
From: Laurentiu Tudor Several macros were triggering this checkpatch.pl warning: "Macro argument reuse '$arg' - possible side-effects?" Fix the warning by avoiding multiple macro argument use. Signed-off-by: Laurentiu Tudor --- Notes: -v7 -no changes drivers/staging/fsl-mc/bus/dp

[PATCH v7 03/10] staging: fsl-mc: simplify couple of deallocations

2017-06-08 Thread laurentiu.tudor
From: Laurentiu Tudor Simplify a couple of deallocations code paths. This also fixes these checkpatch.pl false positives: "WARNING: kfree(NULL) is safe and this check is probably not required" Signed-off-by: Laurentiu Tudor --- Notes: -v7 -rewrapped commit message drivers/staging/

[PATCH v7 01/10] staging: fsl-mc: enclose macro params in parens

2017-06-08 Thread laurentiu.tudor
From: Laurentiu Tudor Several macros didn't had macro params enclosed in parens. Fix them to avoid precedence issues. Found with checkpatch.pl who was issuing this message: "Macro argument 'id' may be better as '(id)' to avoid precedence issues" Signed-off-by: Laurentiu Tudor --- Note

[PATCH v7 04/10] staging: fsl-mc: drop a few useless #includes

2017-06-08 Thread laurentiu.tudor
From: Laurentiu Tudor Some #includes were needlessly done from header files. Drop them from there and update the only .c file that implicitly needed one of those #includes. Signed-off-by: Laurentiu Tudor --- Notes: -v7 -rewrapped commit message drivers/staging/fsl-mc/bus/fsl-mc-msi

[PATCH v7 09/10] staging: fsl-mc: add reference to mc-bus DT binding

2017-06-08 Thread laurentiu.tudor
From: Laurentiu Tudor Update README to reference the mc-bus device tree node binding. Signed-off-by: Laurentiu Tudor --- Notes: -v7 -rewrapped commit message drivers/staging/fsl-mc/README.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/fsl-mc/README.txt b

[PATCH v7 07/10] staging: fsl-mc: add binding path to MAINTAINERS

2017-06-08 Thread laurentiu.tudor
From: Laurentiu Tudor The mc bus device tree binding is maintained but not mentioned in the MAINTAINERS file. This patch adds it. Signed-off-by: Laurentiu Tudor --- Notes: -v7 -rewrapped commit message -v2 -added commit description MAINTAINERS | 1 + 1 file changed, 1 ins

[PATCH v7 08/10] staging: fsl-mc: drop reference to restool

2017-06-08 Thread laurentiu.tudor
From: Laurentiu Tudor Drop reference to user space restool utility from the README. It will be added back together with the actual support in the bus driver. Signed-off-by: Laurentiu Tudor --- Notes: -v7 -no changes drivers/staging/fsl-mc/README.txt | 4 +--- 1 file changed, 1 inse

[PATCH v7 06/10] staging: fsl-mc: drop unused forward declaration

2017-06-08 Thread laurentiu.tudor
From: Laurentiu Tudor This forward declaration of "struct fsl_mc_resource" is of no use so drop it. Signed-off-by: Laurentiu Tudor --- Notes: -v7 -rewrapped commit message drivers/staging/fsl-mc/include/mc-sys.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/fsl

[PATCH v7 10/10] staging: fsl-mc: move bus driver out of staging

2017-06-08 Thread laurentiu.tudor
From: Stuart Yoder Move the source files out of staging into their final locations: -include files in drivers/staging/fsl-mc/include go to include/linux/fsl -irq-gic-v3-its-fsl-mc-msi.c goes to drivers/irqchip -source in drivers/staging/fsl-mc/bus goes to drivers/bus/fsl-mc -README.txt, p

[PATCH v7 05/10] staging: fsl-mc: remove extra blank line

2017-06-08 Thread laurentiu.tudor
From: Laurentiu Tudor Remove extra blank line reported by checkpatch.pl. Signed-off-by: Laurentiu Tudor --- Notes: -v7 -no changes drivers/staging/fsl-mc/include/dprc.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/fsl-mc/include/dprc.h b/drivers/staging/fsl-m

[PATCH] staging: fsl-dpaa2/eth: fix a couple of implicit includes

2017-06-22 Thread laurentiu.tudor
From: Laurentiu Tudor dpni.c is using byte order macros and error codes but does not explicitly include the required kernel header, so add it. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-dpaa2/ethernet/dpni.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/fsl-

[PATCH 01/14] staging: fsl-mc: drop macros with possible side effects

2017-06-22 Thread laurentiu.tudor
From: Laurentiu Tudor Several macros were triggering this checkpatch.pl warning: "Macro argument reuse '$arg' - possible side-effects?" Fix the warning by turning them into real functions. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dprc-driver.c | 15 +--

[PATCH 00/14] staging: fsl-mc: clean up header files

2017-06-22 Thread laurentiu.tudor
From: Laurentiu Tudor This patch series contain mainly clean-ups of the mc-bus header files with the final goal of reorganizing them in just 2 files: a public and a private one, as per GregKH suggestion [1]. Here's a summary of the header reorganizing: - existing mc.h used as public header (cont

[PATCH 02/14] staging: fsl-mc: drop useless #includes

2017-06-22 Thread laurentiu.tudor
From: Laurentiu Tudor These couple of header files are not needed in the source so remove them. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c b/drivers/staging

[PATCH 04/14] staging: fsl-mc: delete duplicated function prototypes

2017-06-22 Thread laurentiu.tudor
From: Laurentiu Tudor These functions already have their prototypes in fsl-mc-private.h header file so delete them from mc-bus.h. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/include/mc-bus.h | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/fsl-mc/include

[PATCH 06/14] staging: fsl-mc: turn several exported functions static

2017-06-22 Thread laurentiu.tudor
From: Laurentiu Tudor They are never used outside the source they are implemented in and very likely never will, so it's safe to make them static. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dprc-driver.c | 8 +++- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 5 ++--- drive

[PATCH 08/14] staging: fsl-mc: move couple of definitions to public header

2017-06-22 Thread laurentiu.tudor
From: Laurentiu Tudor Define dev_is_fsl_mc() and the bus type definition (fsl_mc_bus_type) are used externally so move them to the public header. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/include/mc-bus.h | 9 - drivers/staging/fsl-mc/include/mc.h | 9 + 2 f

[PATCH 03/14] staging: fsl-mc: decouple the mc-bus public headers from dprc.h

2017-06-22 Thread laurentiu.tudor
From: Laurentiu Tudor In its current form, the public headers of the mc-bus depend only on a structure "dprc_obj_desc" defined in dprc.h. Move it to the bus public header together with its associated defines and, in order to keep the naming prefixes consistent rename it to "fsl_mc_obj_desc". This

[PATCH 09/14] staging: fsl-mc: move rest of mc-bus.h to private header

2017-06-22 Thread laurentiu.tudor
From: Laurentiu Tudor All the mc-bus.h contents is only used privately in the bus driver so move everything to the private header and get rid of the mc-bus.h header file. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dprc-driver.c | 1 - drivers/staging/fsl-mc/bus/fs

[PATCH 07/14] staging: fsl-mc: move irq domain creation prototype to public header

2017-06-22 Thread laurentiu.tudor
From: Laurentiu Tudor fsl_mc_msi_create_irq_domain() will is used from the irqchip glue code so it needs to be in the public headers. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/include/mc-bus.h | 7 --- drivers/staging/fsl-mc/include/mc.h | 7 +++ 2 files changed, 7

[PATCH 11/14] staging: fsl-mc: fix a few implicit includes

2017-06-22 Thread laurentiu.tudor
From: Laurentiu Tudor Few files using byte order macros but did not explicitly included the required kernel header, so add it. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dpbp.c | 1 + drivers/staging/fsl-mc/bus/dpcon.c | 1 + drivers/staging/fsl-mc/bus/dpio/dpio.c |

[PATCH 05/14] staging: fsl-mc: delete prototype of unimplemented function

2017-06-22 Thread laurentiu.tudor
From: Laurentiu Tudor The function fsl_mc_bus_exists() has a prototype but is never implemented so delete it from the header file. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/include/mc-bus.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/fsl-mc/include/mc-b

[PATCH 10/14] staging: fsl-mc: remove dpmng API files

2017-06-22 Thread laurentiu.tudor
From: Laurentiu Tudor dpmng.h & dpmng.c files expose an API of just one function which is only used by the bus driver. Move that single API in the bus source as static and remove the two files. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dpmng.c | 74

[PATCH 12/14] staging: fsl-mc: move mc-sys.h contents in the public header

2017-06-22 Thread laurentiu.tudor
From: Laurentiu Tudor mc-sys.h contains the API to send commands to the MC and is used by drivers. Move it to the public headers and get rid of the mc-sys.h header. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 1 - drivers/staging/fsl-dpaa2/ethernet/dpni

[PATCH 13/14] staging: fsl-mc: move mc-cmd.h contents in the public header

2017-06-22 Thread laurentiu.tudor
From: Laurentiu Tudor mc-cmd.h contains some low level functions used to encode and decode commands to the MC. They are used by the drivers so move them to the public headers and get rid of the mc-cmd.h header. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-dpaa2/ethernet/dpni.c | 1

[PATCH 14/14] staging: fsl-mc: make dprc.h header private

2017-06-22 Thread laurentiu.tudor
From: Laurentiu Tudor dprc.h is only used in the mc bus driver so move it together with the sources thus making it private. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dprc.c | 2 +- drivers/staging/fsl-mc/{include => bus}/dprc.h | 0 drivers/staging/fsl-mc/bus/f

[PATCH 6/9] staging: fsl-mc: dpmng: drop unused prototype

2017-02-01 Thread laurentiu.tudor
From: Laurentiu Tudor The implementation was removed in commit: decd3d0cf (staging: fsl-mc: uprev binary interface to match MC v10.x) but the prototype was left behind. Also fix a message that was wrongly mentioning it. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/fsl-mc-bu

[PATCH 9/9] staging: fsl-mc: dprc: drop unused APIs

2017-02-01 Thread laurentiu.tudor
From: Laurentiu Tudor Leave only APIs that area actually used in the bus driver. The patch is mostly mechanical, with a couple exceptions: - getters/setters were not removed even if only one of them is being used - versioning API was also left in place They will be added back on an as-needed

[PATCH 3/9] staging: fsl-mc: add device release callback

2017-02-01 Thread laurentiu.tudor
From: Laurentiu Tudor When hot unplugging a mc-bus device the kernel displays this pertinent message, followed by a stack dump: "Device 'foo.N' does not have a release() function, it is broken and must be fixed." Add the required callback to fix. Signed-off-by: Laurentiu Tudor --- dri

[PATCH 5/9] staging: fsl-mc: dpmcp: drop unused APIs

2017-02-01 Thread laurentiu.tudor
From: Laurentiu Tudor These APIs are not used yet, so drop the dead code. The patch is mostly mechanical, with a couple exceptions: - getters/setters were not removed even if only one of them is being used - versioning API was also left in place Also in this patch, add missing prototype for

[PATCH 7/9] staging: fsl-mc: dpbp: drop unused APIs

2017-02-01 Thread laurentiu.tudor
From: Laurentiu Tudor Leave only APIs that will be used in upcomming drivers. The patch is mostly mechanical, with a couple exceptions: - getters/setters were not removed even if only one of them is being used - versioning API was also left in place They will be added back on an as-needed ba

[PATCH 2/9] staging: fsl-mc: fix device ref counting

2017-02-01 Thread laurentiu.tudor
From: Laurentiu Tudor Drop unneeded get_device() call at device creation and, as per documentation, drop reference count after using device_find_child() return. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dprc-driver.c | 1 + drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 - 2

[PATCH 8/9] staging: fsl-mc: dpbp: add a few missing EXPORT_SYMBOL()s

2017-02-01 Thread laurentiu.tudor
From: Laurentiu Tudor Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dpbp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/fsl-mc/bus/dpbp.c b/drivers/staging/fsl-mc/bus/dpbp.c index 1fa7257..d9e450a 100644 --- a/drivers/staging/fsl-mc/bus/dpbp.c +++ b/dr

[PATCH 0/9] staging: fsl-mc: fixes and cleanups

2017-02-01 Thread laurentiu.tudor
From: Laurentiu Tudor First 4 patches fix several driver model related issues and drop an useless atomic global. The rest of the patches are cleanups mostly consisting in removing dead code. For context, see these threads: https://lkml.org/lkml/2016/12/7/382 https://lkml.org/lkml/2017/1/3/437 L

[PATCH 1/9] staging: fsl-mc: drop root dprc counting

2017-02-01 Thread laurentiu.tudor
From: Laurentiu Tudor It was used just to sanity check some obscure cases that are unlikely to ever happen. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 26 +- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/drivers/staging/

[PATCH 4/9] staging: fsl-mc: don't use devres api for refcounted objects

2017-02-01 Thread laurentiu.tudor
From: Laurentiu Tudor Mixing two memory management systems, in this case managed device resource api and refcounted objects is a bad idea. Lifetime of an object is controlled by its refcount so allocating it with other apis that have their own lifetime control is not ok. Drop devm_*() apis in fav

[PATCH 07/10] staging: fsl-mc: dpmng: drop unused prototype

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor The implementation was removed in commit: decd3d0cf (staging: fsl-mc: uprev binary interface to match MC v10.x) but the prototype was left behind. Also fix a message that was wrongly mentioning it. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/fsl-mc-bu

[PATCH 02/10] staging: fsl-mc: fix device ref counting

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor Drop unneeded get_device() call at device creation and, as per documentation, drop reference count after using device_find_child() return. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dprc-driver.c | 1 + drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 - 2

[PATCH 01/10] staging: fsl-mc: drop root dprc counting

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor It was used just to sanity check some obscure cases that are unlikely to ever happen. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 26 +- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/drivers/staging/

[PATCH 08/10] staging: fsl-mc: dpbp: drop unused APIs

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor Leave only APIs that will be used in upcomming drivers. The patch is mostly mechanical, with a couple exceptions: - getters/setters were not removed even if only one of them is being used - versioning API was also left in place They will be added back on an as-needed ba

[PATCH 00/10][v2] staging: fsl-mc: fixes and cleanups

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor First 4 patches fix several driver model related issues and drop an useless atomic global. The rest of the patches are cleanups mostly consisting in removing dead code. v2: - split slab cache removal in distinct patch - redundant deallocation dropped in patch that adds re

[PATCH 05/10] staging: fsl-mc: remove slab cache for mc devices

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor Let's drop the slab cache for objects until we actually have proof that it improves performance. This makes the code cleaner. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-

[PATCH 09/10] staging: fsl-mc: dpbp: add a few missing EXPORT_SYMBOL()s

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dpbp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/fsl-mc/bus/dpbp.c b/drivers/staging/fsl-mc/bus/dpbp.c index 1fa7257..d9e450a 100644 --- a/drivers/staging/fsl-mc/bus/dpbp.c +++ b/dr

[PATCH 06/10] staging: fsl-mc: dpmcp: drop unused APIs

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor These APIs are not used yet, so drop the dead code. The patch is mostly mechanical, with a couple exceptions: - getters/setters were not removed even if only one of them is being used - versioning API was also left in place Also in this patch, add missing prototype for

[PATCH 10/10] staging: fsl-mc: dprc: drop unused APIs

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor Leave only APIs that area actually used in the bus driver. The patch is mostly mechanical, with a couple exceptions: - getters/setters were not removed even if only one of them is being used - versioning API was also left in place They will be added back on an as-needed

[PATCH 03/10] staging: fsl-mc: add device release callback

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor When hot unplugging a mc-bus device the kernel displays this pertinent message, followed by a stack dump: "Device 'foo.N' does not have a release() function, it is broken and must be fixed." Add the required callback to fix and drop the now uneeded explicit freeing.

[PATCH 04/10] staging: fsl-mc: don't use devres api for refcounted objects

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor Mixing two memory management systems, in this case managed device resource api and refcounted objects is a bad idea. Lifetime of an object is controlled by its refcount so allocating it with other apis that have their own lifetime control is not ok. Drop devm_*() apis in fav

[PATCH v3 00/10] staging: fsl-mc: fixes and cleanups

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor First 4 patches fix several driver model related issues and drop an useless atomic global. The rest of the patches are cleanups mostly consisting in removing dead code. Only patch 3, 4, 5 and 10 changed. See individual patch notes for details. Laurentiu Tudor (10): stagi

[PATCH v3 05/10] staging: fsl-mc: remove slab cache for mc devices

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor Let's drop the slab cache for objects until we actually have proof that it improves performance. This makes the code cleaner. Signed-off-by: Laurentiu Tudor --- v3: - made distinct patch with slab cache removal drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 17 +++---

[PATCH v3 06/10] staging: fsl-mc: dpmcp: drop unused APIs

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor These APIs are not used yet, so drop the dead code. The patch is mostly mechanical, with a couple exceptions: - getters/setters were not removed even if only one of them is being used - versioning API was also left in place Also in this patch, add missing prototype for

[PATCH v3 09/10] staging: fsl-mc: dpbp: add a few missing EXPORT_SYMBOL()s

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor Signed-off-by: Laurentiu Tudor --- v3: - no changes drivers/staging/fsl-mc/bus/dpbp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/fsl-mc/bus/dpbp.c b/drivers/staging/fsl-mc/bus/dpbp.c index 1fa7257..d9e450a 100644 --- a/drivers/staging/fsl-mc/

[PATCH v3 08/10] staging: fsl-mc: dpbp: drop unused APIs

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor Leave only APIs that will be used in upcomming drivers. The patch is mostly mechanical, with a couple exceptions: - getters/setters were not removed even if only one of them is being used - versioning API was also left in place They will be added back on an as-needed ba

[PATCH v3 01/10] staging: fsl-mc: drop root dprc counting

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor It was used just to sanity check some obscure cases that are unlikely to ever happen. Signed-off-by: Laurentiu Tudor --- v3: - no changes drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 26 +- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git

[PATCH v3 04/10] staging: fsl-mc: don't use devres api for refcounted objects

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor Mixing two memory management systems, in this case managed device resource api and refcounted objects is a bad idea. Lifetime of an object is controlled by its refcount so allocating it with other apis that have their own lifetime control is not ok. Drop devm_*() apis in fav

[PATCH v3 02/10] staging: fsl-mc: fix device ref counting

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor Drop unneeded get_device() call at device creation and, as per documentation, drop reference count after using device_find_child() return. Signed-off-by: Laurentiu Tudor --- v3: - no changes drivers/staging/fsl-mc/bus/dprc-driver.c | 1 + drivers/staging/fsl-mc/bus/fsl-

[PATCH v3 07/10] staging: fsl-mc: dpmng: drop unused prototype

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor The implementation was removed in commit: decd3d0cf (staging: fsl-mc: uprev binary interface to match MC v10.x) but the prototype was left behind. Also fix a message that was wrongly mentioning it. Signed-off-by: Laurentiu Tudor --- v3: - no changes drivers/staging/f

[PATCH v3 10/10] staging: fsl-mc: dprc: drop unused APIs

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor Leave only APIs that area actually used in the bus driver. The patch is mostly mechanical, with a couple exceptions: - getters/setters were not removed even if only one of them is being used - versioning API was also left in place They will be added back on an as-needed

[PATCH v3 03/10] staging: fsl-mc: add device release callback

2017-02-07 Thread laurentiu.tudor
From: Laurentiu Tudor When hot unplugging a mc-bus device the kernel displays this pertinent message, followed by a stack dump: "Device 'foo.N' does not have a release() function, it is broken and must be fixed." Add the required callback to fix and drop the now uneeded explicit freeing.

[PATCH v2 01/15] staging: fsl-mc: move comparison before strcmp() call

2017-06-27 Thread laurentiu.tudor
From: Laurentiu Tudor Move comparison before the strcmp() in this if statement, and slightly increase efficiency by not making the strcmp() each time the if gets evaluated but only when the comparison is true. This was suggested in a review comment. Signed-off-by: Laurentiu Tudor --- v2: - new

[PATCH v2 00/15] staging: fsl-mc: clean up header files

2017-06-27 Thread laurentiu.tudor
From: Laurentiu Tudor This patch series contain mainly clean-ups of the mc-bus header files with the final goal of reorganizing them in just 2 files: a public and a private one, as per GregKH suggestion [1]. Here's a summary of the header reorganizing: - existing mc.h used as public header (cont

[PATCH v2 03/15] staging: fsl-mc: drop useless #includes

2017-06-27 Thread laurentiu.tudor
From: Laurentiu Tudor These couple of header files are not needed in the source so remove them. Signed-off-by: Laurentiu Tudor --- v2: - no changes drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c

[PATCH v2 02/15] staging: fsl-mc: be consistent when checking strcmp() return

2017-06-27 Thread laurentiu.tudor
From: Laurentiu Tudor Stick to one way of checking the return code of strcmp(): use '!'. This was suggested in a review comment. Signed-off-by: Laurentiu Tudor --- v2: - new patch drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH v2 04/15] staging: fsl-mc: decouple the mc-bus public headers from dprc.h

2017-06-27 Thread laurentiu.tudor
From: Laurentiu Tudor In its current form, the public headers of the mc-bus depend only on a structure "dprc_obj_desc" defined in dprc.h. Move it to the bus public header together with its associated defines and, in order to keep the naming prefixes consistent rename it to "fsl_mc_obj_desc". This

[PATCH v2 05/15] staging: fsl-mc: delete duplicated function prototypes

2017-06-27 Thread laurentiu.tudor
From: Laurentiu Tudor These functions already have their prototypes in fsl-mc-private.h header file so delete them from mc-bus.h. Signed-off-by: Laurentiu Tudor --- v2: - no changes drivers/staging/fsl-mc/include/mc-bus.h | 8 1 file changed, 8 deletions(-) diff --git a/drivers/sta

[PATCH v2 08/15] staging: fsl-mc: move irq domain creation prototype to public header

2017-06-27 Thread laurentiu.tudor
From: Laurentiu Tudor fsl_mc_msi_create_irq_domain() will is used from the irqchip glue code so it needs to be in the public headers. Signed-off-by: Laurentiu Tudor --- v2: - no changes drivers/staging/fsl-mc/include/mc-bus.h | 7 --- drivers/staging/fsl-mc/include/mc.h | 7 +++

  1   2   >