* [PATCH v2 00/12] staging: fsl-mc: Cleanup and bug fixes
@ 2015-10-14 19:51 J. German Rivera
2015-10-14 19:51 ` [PATCH v2 01/12] staging: fsl-mc: Naming cleanup in fsl_mc-portal_allocate J. German Rivera
` (11 more replies)
0 siblings, 12 replies; 15+ messages in thread
From: J. German Rivera @ 2015-10-14 19:51 UTC (permalink / raw)
To: gregkh, arnd, devel, linux-kernel
Cc: stuart.yoder, itai.katz, lijun.pan, leoli, scottwood, agraf,
bhamciu1, R89243, bhupesh.sharma, nir.erez, richard.schmitt,
dan.carpenter
This patch series includes the following code cleanup and
bug fixes for the fsl-mc bus driver:
Patch 1: Naming cleanup in fsl_mc-portal_allocate
Patch 2: fsl_mc_io object refactoring
Patch 3: dpmcp opening/closing refactoring
Patch 4: Changed dev_info() calls to dev_dbg()
Patch 5: Changed types of flags, portal size in
Patch 6: Removed unused DPMCP macros
Patch 7: Fixed alignment of copyright comment
Patch 8: Fixed bug in fsl_mc_allocator_remove
Patch 9: Refactored error exit in allocator probe/remove
Patch 10: Fixed WARN_ON() in fsl_mc_resource_pool_remove_device
Patch 11: Fixed bug in uninitialized root dprc irq count
Patch 12: Added missing initializer in fsl_mc_bus_driver
CHANGE HISTORY
Changes in v2
- Updated only patch 3. There was some leftover code that
needed to be removed as part of the refactoring done
in that patch.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 01/12] staging: fsl-mc: Naming cleanup in fsl_mc-portal_allocate
2015-10-14 19:51 [PATCH v2 00/12] staging: fsl-mc: Cleanup and bug fixes J. German Rivera
@ 2015-10-14 19:51 ` J. German Rivera
2015-10-17 6:15 ` Greg KH
2015-10-14 19:51 ` [PATCH v2 02/12] staging: fsl-mc: fsl_mc_io object refactoring J. German Rivera
` (10 subsequent siblings)
11 siblings, 1 reply; 15+ messages in thread
From: J. German Rivera @ 2015-10-14 19:51 UTC (permalink / raw)
To: gregkh, arnd, devel, linux-kernel
Cc: stuart.yoder, itai.katz, lijun.pan, leoli, scottwood, agraf,
bhamciu1, R89243, bhupesh.sharma, nir.erez, richard.schmitt,
dan.carpenter, J. German Rivera
mc_adev is a local variable for the allocated dpmcp object.
Renamed mc_adev as dpmcp_dev for clarity.
---
CHANGE HISTORY
Changes in v2: none
drivers/staging/fsl-mc/bus/mc-allocator.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c b/drivers/staging/fsl-mc/bus/mc-allocator.c
index d087b4c..a4aa859 100644
--- a/drivers/staging/fsl-mc/bus/mc-allocator.c
+++ b/drivers/staging/fsl-mc/bus/mc-allocator.c
@@ -284,7 +284,7 @@ int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev,
struct fsl_mc_bus *mc_bus;
phys_addr_t mc_portal_phys_addr;
size_t mc_portal_size;
- struct fsl_mc_device *mc_adev;
+ struct fsl_mc_device *dpmcp_dev;
int error = -EINVAL;
struct fsl_mc_resource *resource = NULL;
struct fsl_mc_io *mc_io = NULL;
@@ -304,16 +304,16 @@ int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev,
if (error < 0)
return error;
- mc_adev = resource->data;
- if (WARN_ON(!mc_adev))
+ dpmcp_dev = resource->data;
+ if (WARN_ON(!dpmcp_dev))
goto error_cleanup_resource;
- if (WARN_ON(mc_adev->obj_desc.region_count == 0))
+ if (WARN_ON(dpmcp_dev->obj_desc.region_count == 0))
goto error_cleanup_resource;
- mc_portal_phys_addr = mc_adev->regions[0].start;
- mc_portal_size = mc_adev->regions[0].end -
- mc_adev->regions[0].start + 1;
+ mc_portal_phys_addr = dpmcp_dev->regions[0].start;
+ mc_portal_size = dpmcp_dev->regions[0].end -
+ dpmcp_dev->regions[0].start + 1;
if (WARN_ON(mc_portal_size != mc_bus_dev->mc_io->portal_size))
goto error_cleanup_resource;
--
2.3.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 02/12] staging: fsl-mc: fsl_mc_io object refactoring
2015-10-14 19:51 [PATCH v2 00/12] staging: fsl-mc: Cleanup and bug fixes J. German Rivera
2015-10-14 19:51 ` [PATCH v2 01/12] staging: fsl-mc: Naming cleanup in fsl_mc-portal_allocate J. German Rivera
@ 2015-10-14 19:51 ` J. German Rivera
2015-10-14 19:51 ` [PATCH v2 03/12] staging: fsl-mc: dpmcp opening/closing refactoring J. German Rivera
` (9 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: J. German Rivera @ 2015-10-14 19:51 UTC (permalink / raw)
To: gregkh, arnd, devel, linux-kernel
Cc: stuart.yoder, itai.katz, lijun.pan, leoli, scottwood, agraf,
bhamciu1, R89243, bhupesh.sharma, nir.erez, richard.schmitt,
dan.carpenter, J. German Rivera
Each fsl_mc_io object is associated with an fsl_mc_device object
of type "dpmcp" representing the MC portal associated with the
fsl_mc_io object. Before, we were representing this association with
an fsl_mc_resource pointer. To enhance code clarity, it is more
straight forward to use an fsl_mc_device pointer instead.
So, this change replaces the 'resource' field in the fsl_mc_io
object with 'dpmcp_dev'. Also, it changes parameter 'resource' of
fsl_create_mc_io() to be an fsl_mc_device pointer instead.
---
CHANGE HISTORY
Changes in v2: none
drivers/staging/fsl-mc/bus/mc-allocator.c | 34 ++++++++++++++++++-------------
drivers/staging/fsl-mc/bus/mc-sys.c | 16 +++++++++++----
drivers/staging/fsl-mc/include/mc-sys.h | 8 +++-----
3 files changed, 35 insertions(+), 23 deletions(-)
diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c b/drivers/staging/fsl-mc/bus/mc-allocator.c
index a4aa859..c3222c6 100644
--- a/drivers/staging/fsl-mc/bus/mc-allocator.c
+++ b/drivers/staging/fsl-mc/bus/mc-allocator.c
@@ -320,7 +320,7 @@ int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev,
error = fsl_create_mc_io(&mc_bus_dev->dev,
mc_portal_phys_addr,
- mc_portal_size, resource,
+ mc_portal_size, dpmcp_dev,
mc_io_flags, &mc_io);
if (error < 0)
goto error_cleanup_resource;
@@ -342,12 +342,22 @@ EXPORT_SYMBOL_GPL(fsl_mc_portal_allocate);
*/
void fsl_mc_portal_free(struct fsl_mc_io *mc_io)
{
+ struct fsl_mc_device *dpmcp_dev;
struct fsl_mc_resource *resource;
- resource = mc_io->resource;
- if (WARN_ON(resource->type != FSL_MC_POOL_DPMCP))
+ /*
+ * Every mc_io obtained by calling fsl_mc_portal_allocate() is supposed
+ * to have a DPMCP object associated with.
+ */
+ dpmcp_dev = mc_io->dpmcp_dev;
+ if (WARN_ON(!dpmcp_dev))
+ return;
+
+ resource = dpmcp_dev->resource;
+ if (WARN_ON(!resource || resource->type != FSL_MC_POOL_DPMCP))
return;
- if (WARN_ON(!resource->data))
+
+ if (WARN_ON(resource->data != dpmcp_dev))
return;
fsl_destroy_mc_io(mc_io);
@@ -364,30 +374,26 @@ int fsl_mc_portal_reset(struct fsl_mc_io *mc_io)
{
int error;
u16 token;
- struct fsl_mc_resource *resource = mc_io->resource;
- struct fsl_mc_device *mc_dev = resource->data;
+ struct fsl_mc_device *dpmcp_dev = mc_io->dpmcp_dev;
- if (WARN_ON(resource->type != FSL_MC_POOL_DPMCP))
- return -EINVAL;
-
- if (WARN_ON(!mc_dev))
+ if (WARN_ON(!dpmcp_dev))
return -EINVAL;
- error = dpmcp_open(mc_io, 0, mc_dev->obj_desc.id, &token);
+ error = dpmcp_open(mc_io, 0, dpmcp_dev->obj_desc.id, &token);
if (error < 0) {
- dev_err(&mc_dev->dev, "dpmcp_open() failed: %d\n", error);
+ dev_err(&dpmcp_dev->dev, "dpmcp_open() failed: %d\n", error);
return error;
}
error = dpmcp_reset(mc_io, 0, token);
if (error < 0) {
- dev_err(&mc_dev->dev, "dpmcp_reset() failed: %d\n", error);
+ dev_err(&dpmcp_dev->dev, "dpmcp_reset() failed: %d\n", error);
return error;
}
error = dpmcp_close(mc_io, 0, token);
if (error < 0) {
- dev_err(&mc_dev->dev, "dpmcp_close() failed: %d\n", error);
+ dev_err(&dpmcp_dev->dev, "dpmcp_close() failed: %d\n", error);
return error;
}
diff --git a/drivers/staging/fsl-mc/bus/mc-sys.c b/drivers/staging/fsl-mc/bus/mc-sys.c
index b58b53f..e53acfa 100644
--- a/drivers/staging/fsl-mc/bus/mc-sys.c
+++ b/drivers/staging/fsl-mc/bus/mc-sys.c
@@ -34,10 +34,12 @@
#include "../include/mc-sys.h"
#include "../include/mc-cmd.h"
+#include "../include/mc.h"
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/ioport.h>
#include <linux/device.h>
+#include "dpmcp.h"
/**
* Timeout in jiffies to wait for the completion of an MC command
@@ -60,8 +62,8 @@
* @dev: device to be associated with the MC I/O object
* @mc_portal_phys_addr: physical address of the MC portal to use
* @mc_portal_size: size in bytes of the MC portal
- * @resource: Pointer to MC bus object allocator resource associated
- * with this MC I/O object or NULL if none.
+ * @dpmcp-dev: Pointer to the DPMCP object associated with this MC I/O
+ * object or NULL if none.
* @flags: flags for the new MC I/O object
* @new_mc_io: Area to return pointer to newly created MC I/O object
*
@@ -70,7 +72,7 @@
int __must_check fsl_create_mc_io(struct device *dev,
phys_addr_t mc_portal_phys_addr,
u32 mc_portal_size,
- struct fsl_mc_resource *resource,
+ struct fsl_mc_device *dpmcp_dev,
u32 flags, struct fsl_mc_io **new_mc_io)
{
struct fsl_mc_io *mc_io;
@@ -85,7 +87,8 @@ int __must_check fsl_create_mc_io(struct device *dev,
mc_io->flags = flags;
mc_io->portal_phys_addr = mc_portal_phys_addr;
mc_io->portal_size = mc_portal_size;
- mc_io->resource = resource;
+ mc_io->dpmcp_dev = dpmcp_dev;
+ dpmcp_dev->mc_io = mc_io;
res = devm_request_mem_region(dev,
mc_portal_phys_addr,
mc_portal_size,
@@ -126,6 +129,11 @@ void fsl_destroy_mc_io(struct fsl_mc_io *mc_io)
mc_io->portal_size);
mc_io->portal_virt_addr = NULL;
+ if (mc_io->dpmcp_dev) {
+ WARN_ON(mc_io->dpmcp_dev->mc_io != mc_io);
+ mc_io->dpmcp_dev->mc_io = NULL;
+ }
+
devm_kfree(mc_io->dev, mc_io);
}
EXPORT_SYMBOL_GPL(fsl_destroy_mc_io);
diff --git a/drivers/staging/fsl-mc/include/mc-sys.h b/drivers/staging/fsl-mc/include/mc-sys.h
index 939b7d3..bfbecaf 100644
--- a/drivers/staging/fsl-mc/include/mc-sys.h
+++ b/drivers/staging/fsl-mc/include/mc-sys.h
@@ -50,9 +50,7 @@ struct mc_command;
* @portal_size: MC command portal size in bytes
* @portal_phys_addr: MC command portal physical address
* @portal_virt_addr: MC command portal virtual address
- * @resource: generic resource associated with the MC portal if
- * the MC portal came from a resource pool, or NULL if the MC portal
- * is permanently bound to a device (e.g., a DPRC)
+ * @dpmcp_dev: pointer to the DPMCP device associated with the MC portal.
*/
struct fsl_mc_io {
struct device *dev;
@@ -60,13 +58,13 @@ struct fsl_mc_io {
u32 portal_size;
phys_addr_t portal_phys_addr;
void __iomem *portal_virt_addr;
- struct fsl_mc_resource *resource;
+ struct fsl_mc_device *dpmcp_dev;
};
int __must_check fsl_create_mc_io(struct device *dev,
phys_addr_t mc_portal_phys_addr,
u32 mc_portal_size,
- struct fsl_mc_resource *resource,
+ struct fsl_mc_device *dpmcp_dev,
u32 flags, struct fsl_mc_io **new_mc_io);
void fsl_destroy_mc_io(struct fsl_mc_io *mc_io);
--
2.3.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 03/12] staging: fsl-mc: dpmcp opening/closing refactoring
2015-10-14 19:51 [PATCH v2 00/12] staging: fsl-mc: Cleanup and bug fixes J. German Rivera
2015-10-14 19:51 ` [PATCH v2 01/12] staging: fsl-mc: Naming cleanup in fsl_mc-portal_allocate J. German Rivera
2015-10-14 19:51 ` [PATCH v2 02/12] staging: fsl-mc: fsl_mc_io object refactoring J. German Rivera
@ 2015-10-14 19:51 ` J. German Rivera
2015-10-14 19:51 ` [PATCH v2 04/12] staging: fsl-mc: Changed dev_info() calls to dev_dbg() J. German Rivera
` (8 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: J. German Rivera @ 2015-10-14 19:51 UTC (permalink / raw)
To: gregkh, arnd, devel, linux-kernel
Cc: stuart.yoder, itai.katz, lijun.pan, leoli, scottwood, agraf,
bhamciu1, R89243, bhupesh.sharma, nir.erez, richard.schmitt,
dan.carpenter, J. German Rivera
Before, we were opening and closing a mc_io's dpmcp object
in fsl_mc_portal_reset(), since that was the only function that was
calling dpmcp MC operations. However, it is better for maintainability
to open the dpmcp object when it gets associated with an mc_io object,
and close it when this association is terminated. This way, we are free
to call dpmcp operations on a mc_io's dpmcp object at any time, without
having to check if the dpmcp object is opened or not.
Consequently, the creation/teardown of the association between
an mc_io object and a dpmcp is now encapsulated in two functions:
fsl_mc_io_set_dpmcp()/fsl_mc_io_unset_dpmcp(). Besides, setting
the corresponding pointers for the association, these functions
open and close the dpmcp object respectively.
---
CHANGE HISTORY
Changes in v2:
- Removed leftover code that needed to be removed as part of
the refactoring done in this patch
drivers/staging/fsl-mc/bus/mc-allocator.c | 15 +------
drivers/staging/fsl-mc/bus/mc-sys.c | 74 ++++++++++++++++++++++++++++---
drivers/staging/fsl-mc/include/mc-sys.h | 5 +++
3 files changed, 73 insertions(+), 21 deletions(-)
diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c b/drivers/staging/fsl-mc/bus/mc-allocator.c
index c3222c6..33f5de4 100644
--- a/drivers/staging/fsl-mc/bus/mc-allocator.c
+++ b/drivers/staging/fsl-mc/bus/mc-allocator.c
@@ -373,30 +373,17 @@ EXPORT_SYMBOL_GPL(fsl_mc_portal_free);
int fsl_mc_portal_reset(struct fsl_mc_io *mc_io)
{
int error;
- u16 token;
struct fsl_mc_device *dpmcp_dev = mc_io->dpmcp_dev;
if (WARN_ON(!dpmcp_dev))
return -EINVAL;
- error = dpmcp_open(mc_io, 0, dpmcp_dev->obj_desc.id, &token);
- if (error < 0) {
- dev_err(&dpmcp_dev->dev, "dpmcp_open() failed: %d\n", error);
- return error;
- }
-
- error = dpmcp_reset(mc_io, 0, token);
+ error = dpmcp_reset(mc_io, 0, dpmcp_dev->mc_handle);
if (error < 0) {
dev_err(&dpmcp_dev->dev, "dpmcp_reset() failed: %d\n", error);
return error;
}
- error = dpmcp_close(mc_io, 0, token);
- if (error < 0) {
- dev_err(&dpmcp_dev->dev, "dpmcp_close() failed: %d\n", error);
- return error;
- }
-
return 0;
}
EXPORT_SYMBOL_GPL(fsl_mc_portal_reset);
diff --git a/drivers/staging/fsl-mc/bus/mc-sys.c b/drivers/staging/fsl-mc/bus/mc-sys.c
index e53acfa..07848a0 100644
--- a/drivers/staging/fsl-mc/bus/mc-sys.c
+++ b/drivers/staging/fsl-mc/bus/mc-sys.c
@@ -75,6 +75,7 @@ int __must_check fsl_create_mc_io(struct device *dev,
struct fsl_mc_device *dpmcp_dev,
u32 flags, struct fsl_mc_io **new_mc_io)
{
+ int error;
struct fsl_mc_io *mc_io;
void __iomem *mc_portal_virt_addr;
struct resource *res;
@@ -87,8 +88,6 @@ int __must_check fsl_create_mc_io(struct device *dev,
mc_io->flags = flags;
mc_io->portal_phys_addr = mc_portal_phys_addr;
mc_io->portal_size = mc_portal_size;
- mc_io->dpmcp_dev = dpmcp_dev;
- dpmcp_dev->mc_io = mc_io;
res = devm_request_mem_region(dev,
mc_portal_phys_addr,
mc_portal_size,
@@ -111,8 +110,18 @@ int __must_check fsl_create_mc_io(struct device *dev,
}
mc_io->portal_virt_addr = mc_portal_virt_addr;
+ if (dpmcp_dev) {
+ error = fsl_mc_io_set_dpmcp(mc_io, dpmcp_dev);
+ if (error < 0)
+ goto error_destroy_mc_io;
+ }
+
*new_mc_io = mc_io;
return 0;
+
+error_destroy_mc_io:
+ fsl_destroy_mc_io(mc_io);
+ return error;
}
EXPORT_SYMBOL_GPL(fsl_create_mc_io);
@@ -123,21 +132,72 @@ EXPORT_SYMBOL_GPL(fsl_create_mc_io);
*/
void fsl_destroy_mc_io(struct fsl_mc_io *mc_io)
{
+ struct fsl_mc_device *dpmcp_dev = mc_io->dpmcp_dev;
+
+ if (dpmcp_dev)
+ fsl_mc_io_unset_dpmcp(mc_io);
+
devm_iounmap(mc_io->dev, mc_io->portal_virt_addr);
devm_release_mem_region(mc_io->dev,
mc_io->portal_phys_addr,
mc_io->portal_size);
mc_io->portal_virt_addr = NULL;
- if (mc_io->dpmcp_dev) {
- WARN_ON(mc_io->dpmcp_dev->mc_io != mc_io);
- mc_io->dpmcp_dev->mc_io = NULL;
- }
-
devm_kfree(mc_io->dev, mc_io);
}
EXPORT_SYMBOL_GPL(fsl_destroy_mc_io);
+int fsl_mc_io_set_dpmcp(struct fsl_mc_io *mc_io,
+ struct fsl_mc_device *dpmcp_dev)
+{
+ int error;
+
+ if (WARN_ON(!dpmcp_dev))
+ return -EINVAL;
+
+ if (WARN_ON(mc_io->dpmcp_dev))
+ return -EINVAL;
+
+ if (WARN_ON(dpmcp_dev->mc_io))
+ return -EINVAL;
+
+ error = dpmcp_open(mc_io,
+ 0,
+ dpmcp_dev->obj_desc.id,
+ &dpmcp_dev->mc_handle);
+ if (error < 0)
+ return error;
+
+ mc_io->dpmcp_dev = dpmcp_dev;
+ dpmcp_dev->mc_io = mc_io;
+ return 0;
+}
+EXPORT_SYMBOL_GPL(fsl_mc_io_set_dpmcp);
+
+void fsl_mc_io_unset_dpmcp(struct fsl_mc_io *mc_io)
+{
+ int error;
+ struct fsl_mc_device *dpmcp_dev = mc_io->dpmcp_dev;
+
+ if (WARN_ON(!dpmcp_dev))
+ return;
+
+ if (WARN_ON(dpmcp_dev->mc_io != mc_io))
+ return;
+
+ error = dpmcp_close(mc_io,
+ 0,
+ dpmcp_dev->mc_handle);
+ if (error < 0) {
+ dev_err(&dpmcp_dev->dev, "dpmcp_close() failed: %d\n",
+ error);
+ }
+
+ mc_io->dpmcp_dev = NULL;
+ dpmcp_dev->mc_io = NULL;
+}
+EXPORT_SYMBOL_GPL(fsl_mc_io_unset_dpmcp);
+
static int mc_status_to_error(enum mc_cmd_status status)
{
static const int mc_status_to_error_map[] = {
diff --git a/drivers/staging/fsl-mc/include/mc-sys.h b/drivers/staging/fsl-mc/include/mc-sys.h
index bfbecaf..d4fb602 100644
--- a/drivers/staging/fsl-mc/include/mc-sys.h
+++ b/drivers/staging/fsl-mc/include/mc-sys.h
@@ -69,6 +69,11 @@ int __must_check fsl_create_mc_io(struct device *dev,
void fsl_destroy_mc_io(struct fsl_mc_io *mc_io);
+int fsl_mc_io_set_dpmcp(struct fsl_mc_io *mc_io,
+ struct fsl_mc_device *dpmcp_dev);
+
+void fsl_mc_io_unset_dpmcp(struct fsl_mc_io *mc_io);
+
int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd);
#endif /* _FSL_MC_SYS_H */
--
2.3.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 04/12] staging: fsl-mc: Changed dev_info() calls to dev_dbg()
2015-10-14 19:51 [PATCH v2 00/12] staging: fsl-mc: Cleanup and bug fixes J. German Rivera
` (2 preceding siblings ...)
2015-10-14 19:51 ` [PATCH v2 03/12] staging: fsl-mc: dpmcp opening/closing refactoring J. German Rivera
@ 2015-10-14 19:51 ` J. German Rivera
2015-10-14 19:51 ` [PATCH v2 05/12] staging_fsl-mc: Changed types of flags, portal size in J. German Rivera
` (7 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: J. German Rivera @ 2015-10-14 19:51 UTC (permalink / raw)
To: gregkh, arnd, devel, linux-kernel
Cc: stuart.yoder, itai.katz, lijun.pan, leoli, scottwood, agraf,
bhamciu1, R89243, bhupesh.sharma, nir.erez, richard.schmitt,
dan.carpenter, J. German Rivera
Changed dev_info() calls to dev_dbg() in
fsl_mc_allocator_probe/fsl_mc_allocator_remove, as they
are useful only for debugging.
---
CHANGE HISTORY
Changes in v2: none
drivers/staging/fsl-mc/bus/mc-allocator.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c b/drivers/staging/fsl-mc/bus/mc-allocator.c
index 33f5de4..527cb4b 100644
--- a/drivers/staging/fsl-mc/bus/mc-allocator.c
+++ b/drivers/staging/fsl-mc/bus/mc-allocator.c
@@ -492,8 +492,8 @@ static int fsl_mc_allocator_probe(struct fsl_mc_device *mc_dev)
if (error < 0)
goto error;
- dev_info(&mc_dev->dev,
- "Allocatable MC object device bound to fsl_mc_allocator driver");
+ dev_dbg(&mc_dev->dev,
+ "Allocatable MC object device bound to fsl_mc_allocator driver");
return 0;
error:
@@ -515,8 +515,8 @@ static int fsl_mc_allocator_remove(struct fsl_mc_device *mc_dev)
if (error < 0)
goto out;
- dev_info(&mc_dev->dev,
- "Allocatable MC object device unbound from fsl_mc_allocator driver");
+ dev_dbg(&mc_dev->dev,
+ "Allocatable MC object device unbound from fsl_mc_allocator driver");
error = 0;
out:
return error;
--
2.3.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 05/12] staging_fsl-mc: Changed types of flags, portal size in
2015-10-14 19:51 [PATCH v2 00/12] staging: fsl-mc: Cleanup and bug fixes J. German Rivera
` (3 preceding siblings ...)
2015-10-14 19:51 ` [PATCH v2 04/12] staging: fsl-mc: Changed dev_info() calls to dev_dbg() J. German Rivera
@ 2015-10-14 19:51 ` J. German Rivera
2015-10-14 19:51 ` [PATCH v2 06/12] staging: fsl-mc: Removed unused DPMCP macros J. German Rivera
` (6 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: J. German Rivera @ 2015-10-14 19:51 UTC (permalink / raw)
To: gregkh, arnd, devel, linux-kernel
Cc: stuart.yoder, itai.katz, lijun.pan, leoli, scottwood, agraf,
bhamciu1, R89243, bhupesh.sharma, nir.erez, richard.schmitt,
dan.carpenter, J. German Rivera
Changed these two fields from 32-bit integers to 16-bit integers in
struct fsl_mc_io, as 32 bits is too much for these fields. This
change does not affect other components since fsl_mc_io is an opaque
type.
---
CHANGE HISTORY
Changes in v2: none
drivers/staging/fsl-mc/include/mc-sys.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/fsl-mc/include/mc-sys.h b/drivers/staging/fsl-mc/include/mc-sys.h
index d4fb602..7d44d8c 100644
--- a/drivers/staging/fsl-mc/include/mc-sys.h
+++ b/drivers/staging/fsl-mc/include/mc-sys.h
@@ -54,8 +54,8 @@ struct mc_command;
*/
struct fsl_mc_io {
struct device *dev;
- u32 flags;
- u32 portal_size;
+ u16 flags;
+ u16 portal_size;
phys_addr_t portal_phys_addr;
void __iomem *portal_virt_addr;
struct fsl_mc_device *dpmcp_dev;
--
2.3.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 06/12] staging: fsl-mc: Removed unused DPMCP macros
2015-10-14 19:51 [PATCH v2 00/12] staging: fsl-mc: Cleanup and bug fixes J. German Rivera
` (4 preceding siblings ...)
2015-10-14 19:51 ` [PATCH v2 05/12] staging_fsl-mc: Changed types of flags, portal size in J. German Rivera
@ 2015-10-14 19:51 ` J. German Rivera
2015-10-14 19:51 ` [PATCH v2 07/12] staging: fsl-mc: Fixed alignment of copyright comment J. German Rivera
` (5 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: J. German Rivera @ 2015-10-14 19:51 UTC (permalink / raw)
To: gregkh, arnd, devel, linux-kernel
Cc: stuart.yoder, itai.katz, lijun.pan, leoli, scottwood, agraf,
bhamciu1, R89243, bhupesh.sharma, nir.erez, richard.schmitt,
dan.carpenter, J. German Rivera
The macros were a left-over from a previous implementation
of the dpmcp APIs and are no longer used.
---
CHANGE HISTORY
Changes in v2: none
drivers/staging/fsl-mc/bus/dpmcp-cmd.h | 79 ----------------------------------
1 file changed, 79 deletions(-)
diff --git a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h b/drivers/staging/fsl-mc/bus/dpmcp-cmd.h
index 6cc0fed..a87e9f8 100644
--- a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h
+++ b/drivers/staging/fsl-mc/bus/dpmcp-cmd.h
@@ -54,83 +54,4 @@
#define DPMCP_CMDID_GET_IRQ_STATUS 0x016
#define DPMCP_CMDID_CLEAR_IRQ_STATUS 0x017
-/* cmd, param, offset, width, type, arg_name */
-#define DPMCP_CMD_CREATE(cmd, cfg) \
- MC_CMD_OP(cmd, 0, 0, 32, int, cfg->portal_id)
-
-/* cmd, param, offset, width, type, arg_name */
-#define DPMCP_CMD_SET_IRQ(cmd, irq_index, irq_addr, irq_val, user_irq_id) \
-do { \
- MC_CMD_OP(cmd, 0, 0, 8, uint8_t, irq_index);\
- MC_CMD_OP(cmd, 0, 32, 32, uint32_t, irq_val);\
- MC_CMD_OP(cmd, 1, 0, 64, uint64_t, irq_addr); \
- MC_CMD_OP(cmd, 2, 0, 32, int, user_irq_id); \
-} while (0)
-
-/* cmd, param, offset, width, type, arg_name */
-#define DPMCP_CMD_GET_IRQ(cmd, irq_index) \
- MC_CMD_OP(cmd, 0, 32, 8, uint8_t, irq_index)
-
-/* cmd, param, offset, width, type, arg_name */
-#define DPMCP_RSP_GET_IRQ(cmd, type, irq_addr, irq_val, user_irq_id) \
-do { \
- MC_RSP_OP(cmd, 0, 0, 32, uint32_t, irq_val); \
- MC_RSP_OP(cmd, 1, 0, 64, uint64_t, irq_addr); \
- MC_RSP_OP(cmd, 2, 0, 32, int, user_irq_id); \
- MC_RSP_OP(cmd, 2, 32, 32, int, type); \
-} while (0)
-
-/* cmd, param, offset, width, type, arg_name */
-#define DPMCP_CMD_SET_IRQ_ENABLE(cmd, irq_index, en) \
-do { \
- MC_CMD_OP(cmd, 0, 0, 8, uint8_t, en); \
- MC_CMD_OP(cmd, 0, 32, 8, uint8_t, irq_index);\
-} while (0)
-
-/* cmd, param, offset, width, type, arg_name */
-#define DPMCP_CMD_GET_IRQ_ENABLE(cmd, irq_index) \
- MC_CMD_OP(cmd, 0, 32, 8, uint8_t, irq_index)
-
-/* cmd, param, offset, width, type, arg_name */
-#define DPMCP_RSP_GET_IRQ_ENABLE(cmd, en) \
- MC_RSP_OP(cmd, 0, 0, 8, uint8_t, en)
-
-/* cmd, param, offset, width, type, arg_name */
-#define DPMCP_CMD_SET_IRQ_MASK(cmd, irq_index, mask) \
-do { \
- MC_CMD_OP(cmd, 0, 0, 32, uint32_t, mask);\
- MC_CMD_OP(cmd, 0, 32, 8, uint8_t, irq_index);\
-} while (0)
-
-/* cmd, param, offset, width, type, arg_name */
-#define DPMCP_CMD_GET_IRQ_MASK(cmd, irq_index) \
- MC_CMD_OP(cmd, 0, 32, 8, uint8_t, irq_index)
-
-/* cmd, param, offset, width, type, arg_name */
-#define DPMCP_RSP_GET_IRQ_MASK(cmd, mask) \
- MC_RSP_OP(cmd, 0, 0, 32, uint32_t, mask)
-
-/* cmd, param, offset, width, type, arg_name */
-#define DPMCP_CMD_GET_IRQ_STATUS(cmd, irq_index) \
- MC_CMD_OP(cmd, 0, 32, 8, uint8_t, irq_index)
-
-/* cmd, param, offset, width, type, arg_name */
-#define DPMCP_RSP_GET_IRQ_STATUS(cmd, status) \
- MC_RSP_OP(cmd, 0, 0, 32, uint32_t, status)
-
-/* cmd, param, offset, width, type, arg_name */
-#define DPMCP_CMD_CLEAR_IRQ_STATUS(cmd, irq_index, status) \
-do { \
- MC_CMD_OP(cmd, 0, 0, 32, uint32_t, status); \
- MC_CMD_OP(cmd, 0, 32, 8, uint8_t, irq_index);\
-} while (0)
-
-/* cmd, param, offset, width, type, arg_name */
-#define DPMCP_RSP_GET_ATTRIBUTES(cmd, attr) \
-do { \
- MC_RSP_OP(cmd, 0, 32, 32, int, attr->id);\
- MC_RSP_OP(cmd, 1, 0, 16, uint16_t, attr->version.major);\
- MC_RSP_OP(cmd, 1, 16, 16, uint16_t, attr->version.minor);\
-} while (0)
-
#endif /* _FSL_DPMCP_CMD_H */
--
2.3.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 07/12] staging: fsl-mc: Fixed alignment of copyright comment
2015-10-14 19:51 [PATCH v2 00/12] staging: fsl-mc: Cleanup and bug fixes J. German Rivera
` (5 preceding siblings ...)
2015-10-14 19:51 ` [PATCH v2 06/12] staging: fsl-mc: Removed unused DPMCP macros J. German Rivera
@ 2015-10-14 19:51 ` J. German Rivera
2015-10-14 19:51 ` [PATCH v2 08/12] staging: fsl-mc: Fixed bug in fsl_mc_allocator_remove J. German Rivera
` (4 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: J. German Rivera @ 2015-10-14 19:51 UTC (permalink / raw)
To: gregkh, arnd, devel, linux-kernel
Cc: stuart.yoder, itai.katz, lijun.pan, leoli, scottwood, agraf,
bhamciu1, R89243, bhupesh.sharma, nir.erez, richard.schmitt,
dan.carpenter, J. German Rivera
Whitespace cleanup-- add missing spaces in column 1 of copyright
---
CHANGE HISTORY
Changes in v2: none
drivers/staging/fsl-mc/include/dpcon-cmd.h | 60 +++++++++++++++---------------
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/drivers/staging/fsl-mc/include/dpcon-cmd.h b/drivers/staging/fsl-mc/include/dpcon-cmd.h
index 2617024..536b2ef 100644
--- a/drivers/staging/fsl-mc/include/dpcon-cmd.h
+++ b/drivers/staging/fsl-mc/include/dpcon-cmd.h
@@ -1,34 +1,34 @@
/* Copyright 2013-2015 Freescale Semiconductor Inc.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the above-listed copyright holders nor the
-* names of any contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-*
-* ALTERNATIVELY, this software may be distributed under the terms of the
-* GNU General Public License ("GPL") as published by the Free Software
-* Foundation, either version 2 of that License or (at your option) any
-* later version.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the above-listed copyright holders nor the
+ * names of any contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ *
+ * ALTERNATIVELY, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") as published by the Free Software
+ * Foundation, either version 2 of that License or (at your option) any
+ * later version.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
#ifndef _FSL_DPCON_CMD_H
#define _FSL_DPCON_CMD_H
--
2.3.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 08/12] staging: fsl-mc: Fixed bug in fsl_mc_allocator_remove
2015-10-14 19:51 [PATCH v2 00/12] staging: fsl-mc: Cleanup and bug fixes J. German Rivera
` (6 preceding siblings ...)
2015-10-14 19:51 ` [PATCH v2 07/12] staging: fsl-mc: Fixed alignment of copyright comment J. German Rivera
@ 2015-10-14 19:51 ` J. German Rivera
2015-10-14 19:51 ` [PATCH v2 09/12] staging: fsl-mc: refactored error exit in allocator probe/remove J. German Rivera
` (3 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: J. German Rivera @ 2015-10-14 19:51 UTC (permalink / raw)
To: gregkh, arnd, devel, linux-kernel
Cc: stuart.yoder, itai.katz, lijun.pan, leoli, scottwood, agraf,
bhamciu1, R89243, bhupesh.sharma, nir.erez, richard.schmitt,
dan.carpenter, J. German Rivera
Call fsl_mc_resource_pool_remove_device() only if mc_dev->resource
is not NULL.
---
CHANGE HISTORY
Changes in v2: none
drivers/staging/fsl-mc/bus/mc-allocator.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c b/drivers/staging/fsl-mc/bus/mc-allocator.c
index 527cb4b..e9c3dec 100644
--- a/drivers/staging/fsl-mc/bus/mc-allocator.c
+++ b/drivers/staging/fsl-mc/bus/mc-allocator.c
@@ -511,9 +511,11 @@ static int fsl_mc_allocator_remove(struct fsl_mc_device *mc_dev)
if (WARN_ON(!FSL_MC_IS_ALLOCATABLE(mc_dev->obj_desc.type)))
goto out;
- error = fsl_mc_resource_pool_remove_device(mc_dev);
- if (error < 0)
- goto out;
+ if (mc_dev->resource) {
+ error = fsl_mc_resource_pool_remove_device(mc_dev);
+ if (error < 0)
+ goto out;
+ }
dev_dbg(&mc_dev->dev,
"Allocatable MC object device unbound from fsl_mc_allocator driver");
--
2.3.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 09/12] staging: fsl-mc: refactored error exit in allocator probe/remove
2015-10-14 19:51 [PATCH v2 00/12] staging: fsl-mc: Cleanup and bug fixes J. German Rivera
` (7 preceding siblings ...)
2015-10-14 19:51 ` [PATCH v2 08/12] staging: fsl-mc: Fixed bug in fsl_mc_allocator_remove J. German Rivera
@ 2015-10-14 19:51 ` J. German Rivera
2015-10-14 19:51 ` [PATCH v2 10/12] staging: fsl-mc: Fixed WARN_ON() in fsl_mc_resource_pool_remove_device J. German Rivera
` (2 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: J. German Rivera @ 2015-10-14 19:51 UTC (permalink / raw)
To: gregkh, arnd, devel, linux-kernel
Cc: stuart.yoder, itai.katz, lijun.pan, leoli, scottwood, agraf,
bhamciu1, R89243, bhupesh.sharma, nir.erez, richard.schmitt,
dan.carpenter, J. German Rivera
Replaced error gotos with direct returns in fsl_mc_allocator_probe()
and fsl_mc_allocator_remove(), since the only error handling done
in those functions is to exit.
Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
---
CHANGE HISTORY
Changes in v2: none
drivers/staging/fsl-mc/bus/mc-allocator.c | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c b/drivers/staging/fsl-mc/bus/mc-allocator.c
index e9c3dec..a45293b 100644
--- a/drivers/staging/fsl-mc/bus/mc-allocator.c
+++ b/drivers/staging/fsl-mc/bus/mc-allocator.c
@@ -474,30 +474,27 @@ static int fsl_mc_allocator_probe(struct fsl_mc_device *mc_dev)
enum fsl_mc_pool_type pool_type;
struct fsl_mc_device *mc_bus_dev;
struct fsl_mc_bus *mc_bus;
- int error = -EINVAL;
+ int error;
if (WARN_ON(!FSL_MC_IS_ALLOCATABLE(mc_dev->obj_desc.type)))
- goto error;
+ return -EINVAL;
mc_bus_dev = to_fsl_mc_device(mc_dev->dev.parent);
if (WARN_ON(mc_bus_dev->dev.bus != &fsl_mc_bus_type))
- goto error;
+ return -EINVAL;
mc_bus = to_fsl_mc_bus(mc_bus_dev);
error = object_type_to_pool_type(mc_dev->obj_desc.type, &pool_type);
if (error < 0)
- goto error;
+ return error;
error = fsl_mc_resource_pool_add_device(mc_bus, pool_type, mc_dev);
if (error < 0)
- goto error;
+ return error;
dev_dbg(&mc_dev->dev,
"Allocatable MC object device bound to fsl_mc_allocator driver");
return 0;
-error:
-
- return error;
}
/**
@@ -506,22 +503,20 @@ error:
*/
static int fsl_mc_allocator_remove(struct fsl_mc_device *mc_dev)
{
- int error = -EINVAL;
+ int error;
if (WARN_ON(!FSL_MC_IS_ALLOCATABLE(mc_dev->obj_desc.type)))
- goto out;
+ return -EINVAL;
if (mc_dev->resource) {
error = fsl_mc_resource_pool_remove_device(mc_dev);
if (error < 0)
- goto out;
+ return error;
}
dev_dbg(&mc_dev->dev,
"Allocatable MC object device unbound from fsl_mc_allocator driver");
- error = 0;
-out:
- return error;
+ return 0;
}
static const struct fsl_mc_device_match_id match_id_table[] = {
--
2.3.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 10/12] staging: fsl-mc: Fixed WARN_ON() in fsl_mc_resource_pool_remove_device
2015-10-14 19:51 [PATCH v2 00/12] staging: fsl-mc: Cleanup and bug fixes J. German Rivera
` (8 preceding siblings ...)
2015-10-14 19:51 ` [PATCH v2 09/12] staging: fsl-mc: refactored error exit in allocator probe/remove J. German Rivera
@ 2015-10-14 19:51 ` J. German Rivera
2015-10-14 19:51 ` [PATCH v2 11/12] staging: fsl-mc: fixed bug in uninitialized root dprc irq count J. German Rivera
2015-10-14 19:51 ` [PATCH v2 12/12] staging: fsl-mc: Added missing initializer in fsl_mc_bus_driver J. German Rivera
11 siblings, 0 replies; 15+ messages in thread
From: J. German Rivera @ 2015-10-14 19:51 UTC (permalink / raw)
To: gregkh, arnd, devel, linux-kernel
Cc: stuart.yoder, itai.katz, lijun.pan, leoli, scottwood, agraf,
bhamciu1, R89243, bhupesh.sharma, nir.erez, richard.schmitt,
dan.carpenter, J. German Rivera
Check that resource is not NULL before de-referencing it.
---
CHANGE HISTORY
Changes in v2: none
drivers/staging/fsl-mc/bus/mc-allocator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c b/drivers/staging/fsl-mc/bus/mc-allocator.c
index a45293b..88d1857 100644
--- a/drivers/staging/fsl-mc/bus/mc-allocator.c
+++ b/drivers/staging/fsl-mc/bus/mc-allocator.c
@@ -111,7 +111,7 @@ static int __must_check fsl_mc_resource_pool_remove_device(struct fsl_mc_device
goto out;
resource = mc_dev->resource;
- if (WARN_ON(resource->data != mc_dev))
+ if (WARN_ON(!resource || resource->data != mc_dev))
goto out;
mc_bus_dev = to_fsl_mc_device(mc_dev->dev.parent);
--
2.3.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 11/12] staging: fsl-mc: fixed bug in uninitialized root dprc irq count
2015-10-14 19:51 [PATCH v2 00/12] staging: fsl-mc: Cleanup and bug fixes J. German Rivera
` (9 preceding siblings ...)
2015-10-14 19:51 ` [PATCH v2 10/12] staging: fsl-mc: Fixed WARN_ON() in fsl_mc_resource_pool_remove_device J. German Rivera
@ 2015-10-14 19:51 ` J. German Rivera
2015-10-14 19:51 ` [PATCH v2 12/12] staging: fsl-mc: Added missing initializer in fsl_mc_bus_driver J. German Rivera
11 siblings, 0 replies; 15+ messages in thread
From: J. German Rivera @ 2015-10-14 19:51 UTC (permalink / raw)
To: gregkh, arnd, devel, linux-kernel
Cc: stuart.yoder, itai.katz, lijun.pan, leoli, scottwood, agraf,
bhamciu1, R89243, bhupesh.sharma, nir.erez, richard.schmitt,
dan.carpenter, J. German Rivera
When initializing the object attributes for the root dprc, the
irq_count was uninitialized. Initialize it to 1.
---
CHANGE HISTORY
Changes in v2: none
drivers/staging/fsl-mc/bus/mc-bus.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c b/drivers/staging/fsl-mc/bus/mc-bus.c
index fd13053..4ac3d07 100644
--- a/drivers/staging/fsl-mc/bus/mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/mc-bus.c
@@ -749,6 +749,7 @@ static int fsl_mc_bus_probe(struct platform_device *pdev)
obj_desc.id = container_id;
obj_desc.ver_major = DPRC_VER_MAJOR;
obj_desc.ver_minor = DPRC_VER_MINOR;
+ obj_desc.irq_count = 1;
obj_desc.region_count = 0;
error = fsl_mc_device_add(&obj_desc, mc_io, &pdev->dev, &mc_bus_dev);
--
2.3.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 12/12] staging: fsl-mc: Added missing initializer in fsl_mc_bus_driver
2015-10-14 19:51 [PATCH v2 00/12] staging: fsl-mc: Cleanup and bug fixes J. German Rivera
` (10 preceding siblings ...)
2015-10-14 19:51 ` [PATCH v2 11/12] staging: fsl-mc: fixed bug in uninitialized root dprc irq count J. German Rivera
@ 2015-10-14 19:51 ` J. German Rivera
11 siblings, 0 replies; 15+ messages in thread
From: J. German Rivera @ 2015-10-14 19:51 UTC (permalink / raw)
To: gregkh, arnd, devel, linux-kernel
Cc: stuart.yoder, itai.katz, lijun.pan, leoli, scottwood, agraf,
bhamciu1, R89243, bhupesh.sharma, nir.erez, richard.schmitt,
dan.carpenter, J. German Rivera
owner needs to be initialized as THIS_MOUDLE.
---
CHANGE HISTORY
Changes in v2: none
drivers/staging/fsl-mc/bus/mc-bus.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c b/drivers/staging/fsl-mc/bus/mc-bus.c
index 4ac3d07..84db55b 100644
--- a/drivers/staging/fsl-mc/bus/mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/mc-bus.c
@@ -790,6 +790,7 @@ MODULE_DEVICE_TABLE(of, fsl_mc_bus_match_table);
static struct platform_driver fsl_mc_bus_driver = {
.driver = {
.name = "fsl_mc_bus",
+ .owner = THIS_MODULE,
.pm = NULL,
.of_match_table = fsl_mc_bus_match_table,
},
--
2.3.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 01/12] staging: fsl-mc: Naming cleanup in fsl_mc-portal_allocate
2015-10-14 19:51 ` [PATCH v2 01/12] staging: fsl-mc: Naming cleanup in fsl_mc-portal_allocate J. German Rivera
@ 2015-10-17 6:15 ` Greg KH
2015-10-17 16:08 ` Jose Rivera
0 siblings, 1 reply; 15+ messages in thread
From: Greg KH @ 2015-10-17 6:15 UTC (permalink / raw)
To: J. German Rivera
Cc: arnd, devel, linux-kernel, bhamciu1, bhupesh.sharma, agraf,
stuart.yoder, nir.erez, itai.katz, scottwood, lijun.pan, leoli,
R89243, dan.carpenter, richard.schmitt
On Wed, Oct 14, 2015 at 02:51:40PM -0500, J. German Rivera wrote:
> mc_adev is a local variable for the allocated dpmcp object.
> Renamed mc_adev as dpmcp_dev for clarity.
> ---
> CHANGE HISTORY
>
> Changes in v2: none
None of the patches in this series has a signed-off-by: line, as
required by Documentation/SubmittingPatches, so I'm guessing you don't
want them actually applied :(
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [PATCH v2 01/12] staging: fsl-mc: Naming cleanup in fsl_mc-portal_allocate
2015-10-17 6:15 ` Greg KH
@ 2015-10-17 16:08 ` Jose Rivera
0 siblings, 0 replies; 15+ messages in thread
From: Jose Rivera @ 2015-10-17 16:08 UTC (permalink / raw)
To: Greg KH
Cc: arnd, devel, linux-kernel, Hamciuc Bogdan, Sharma Bhupesh, agraf,
Stuart Yoder, Erez Nir, Katz Itai, Scott Wood, Lijun Pan, Li Leo,
Marginean Alexandru, dan.carpenter, Richard Schmitt
> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Saturday, October 17, 2015 1:16 AM
> To: Rivera Jose-B46482
> Cc: arnd@arndb.de; devel@driverdev.osuosl.org; linux-
> kernel@vger.kernel.org; Hamciuc Bogdan-BHAMCIU1; Sharma Bhupesh-B45370;
> agraf@suse.de; Yoder Stuart-B08248; Erez Nir-RM30794; katz Itai-RM05202;
> Wood Scott-B07421; Pan Lijun-B44306; Li Yang-Leo-R58472; Marginean
> Alexandru-R89243; dan.carpenter@oracle.com; Schmitt Richard-B43082
> Subject: Re: [PATCH v2 01/12] staging: fsl-mc: Naming cleanup in fsl_mc-
> portal_allocate
>
> On Wed, Oct 14, 2015 at 02:51:40PM -0500, J. German Rivera wrote:
> > mc_adev is a local variable for the allocated dpmcp object.
> > Renamed mc_adev as dpmcp_dev for clarity.
> > ---
> > CHANGE HISTORY
> >
> > Changes in v2: none
>
> None of the patches in this series has a signed-off-by: line, as required
> by Documentation/SubmittingPatches, so I'm guessing you don't want them
> actually applied :(
Greg,
I apologize for that oversight. I'll send a respin fixing this.
Thanks,
German
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2015-10-17 16:08 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-14 19:51 [PATCH v2 00/12] staging: fsl-mc: Cleanup and bug fixes J. German Rivera
2015-10-14 19:51 ` [PATCH v2 01/12] staging: fsl-mc: Naming cleanup in fsl_mc-portal_allocate J. German Rivera
2015-10-17 6:15 ` Greg KH
2015-10-17 16:08 ` Jose Rivera
2015-10-14 19:51 ` [PATCH v2 02/12] staging: fsl-mc: fsl_mc_io object refactoring J. German Rivera
2015-10-14 19:51 ` [PATCH v2 03/12] staging: fsl-mc: dpmcp opening/closing refactoring J. German Rivera
2015-10-14 19:51 ` [PATCH v2 04/12] staging: fsl-mc: Changed dev_info() calls to dev_dbg() J. German Rivera
2015-10-14 19:51 ` [PATCH v2 05/12] staging_fsl-mc: Changed types of flags, portal size in J. German Rivera
2015-10-14 19:51 ` [PATCH v2 06/12] staging: fsl-mc: Removed unused DPMCP macros J. German Rivera
2015-10-14 19:51 ` [PATCH v2 07/12] staging: fsl-mc: Fixed alignment of copyright comment J. German Rivera
2015-10-14 19:51 ` [PATCH v2 08/12] staging: fsl-mc: Fixed bug in fsl_mc_allocator_remove J. German Rivera
2015-10-14 19:51 ` [PATCH v2 09/12] staging: fsl-mc: refactored error exit in allocator probe/remove J. German Rivera
2015-10-14 19:51 ` [PATCH v2 10/12] staging: fsl-mc: Fixed WARN_ON() in fsl_mc_resource_pool_remove_device J. German Rivera
2015-10-14 19:51 ` [PATCH v2 11/12] staging: fsl-mc: fixed bug in uninitialized root dprc irq count J. German Rivera
2015-10-14 19:51 ` [PATCH v2 12/12] staging: fsl-mc: Added missing initializer in fsl_mc_bus_driver J. German Rivera
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome