* [PATCH 0/3] CoreSight-ETB10: Adjustments for three function implementations
@ 2017-05-12 18:50 ` SF Markus Elfring
0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-05-12 18:50 UTC (permalink / raw)
To: linux-arm-kernel, Mathieu Poirier, Suzuki K. Poulose
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 12 May 2017 20:46:54 +0200
Three update suggestions were taken into account
from static source code analysis.
Markus Elfring (3):
Delete an error message for a failed memory allocation in etb_probe()
Fix a typo in a comment line
Improve a size determination in etb_alloc_buffer()
drivers/hwtracing/coresight/coresight-etb10.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
--
2.12.3
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/3] CoreSight-ETB10: Adjustments for three function implementations
@ 2017-05-12 18:50 ` SF Markus Elfring
0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-05-12 18:50 UTC (permalink / raw)
To: linux-arm-kernel
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 12 May 2017 20:46:54 +0200
Three update suggestions were taken into account
from static source code analysis.
Markus Elfring (3):
Delete an error message for a failed memory allocation in etb_probe()
Fix a typo in a comment line
Improve a size determination in etb_alloc_buffer()
drivers/hwtracing/coresight/coresight-etb10.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
--
2.12.3
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/3] CoreSight-ETB10: Adjustments for three function implementations
@ 2017-05-12 18:50 ` SF Markus Elfring
0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-05-12 18:50 UTC (permalink / raw)
To: linux-arm-kernel
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 12 May 2017 20:46:54 +0200
Three update suggestions were taken into account
from static source code analysis.
Markus Elfring (3):
Delete an error message for a failed memory allocation in etb_probe()
Fix a typo in a comment line
Improve a size determination in etb_alloc_buffer()
drivers/hwtracing/coresight/coresight-etb10.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
--
2.12.3
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 1/3] coresight: etb10: Delete an error message for a failed memory allocation in etb_probe()
2017-05-12 18:50 ` SF Markus Elfring
(?)
@ 2017-05-12 18:51 ` SF Markus Elfring
-1 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-05-12 18:51 UTC (permalink / raw)
To: linux-arm-kernel, Mathieu Poirier, Suzuki K. Poulose
Cc: LKML, kernel-janitors, Wolfram Sang
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 12 May 2017 20:23:43 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/hwtracing/coresight/coresight-etb10.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
index 979ea6ec7902..837aebf22c45 100644
--- a/drivers/hwtracing/coresight/coresight-etb10.c
+++ b/drivers/hwtracing/coresight/coresight-etb10.c
@@ -675,11 +675,8 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id)
drvdata->buf = devm_kzalloc(dev,
drvdata->buffer_depth * 4, GFP_KERNEL);
- if (!drvdata->buf) {
- dev_err(dev, "Failed to allocate %u bytes for buffer data\n",
- drvdata->buffer_depth * 4);
+ if (!drvdata->buf)
return -ENOMEM;
- }
desc.type = CORESIGHT_DEV_TYPE_SINK;
desc.subtype.sink_subtype = CORESIGHT_DEV_SUBTYPE_SINK_BUFFER;
--
2.12.3
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 1/3] coresight: etb10: Delete an error message for a failed memory allocation in etb_probe()
@ 2017-05-12 18:51 ` SF Markus Elfring
0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-05-12 18:51 UTC (permalink / raw)
To: linux-arm-kernel
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 12 May 2017 20:23:43 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/hwtracing/coresight/coresight-etb10.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
index 979ea6ec7902..837aebf22c45 100644
--- a/drivers/hwtracing/coresight/coresight-etb10.c
+++ b/drivers/hwtracing/coresight/coresight-etb10.c
@@ -675,11 +675,8 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id)
drvdata->buf = devm_kzalloc(dev,
drvdata->buffer_depth * 4, GFP_KERNEL);
- if (!drvdata->buf) {
- dev_err(dev, "Failed to allocate %u bytes for buffer data\n",
- drvdata->buffer_depth * 4);
+ if (!drvdata->buf)
return -ENOMEM;
- }
desc.type = CORESIGHT_DEV_TYPE_SINK;
desc.subtype.sink_subtype = CORESIGHT_DEV_SUBTYPE_SINK_BUFFER;
--
2.12.3
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 1/3] coresight: etb10: Delete an error message for a failed memory allocation in etb_probe()
@ 2017-05-12 18:51 ` SF Markus Elfring
0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-05-12 18:51 UTC (permalink / raw)
To: linux-arm-kernel
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 12 May 2017 20:23:43 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/hwtracing/coresight/coresight-etb10.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
index 979ea6ec7902..837aebf22c45 100644
--- a/drivers/hwtracing/coresight/coresight-etb10.c
+++ b/drivers/hwtracing/coresight/coresight-etb10.c
@@ -675,11 +675,8 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id)
drvdata->buf = devm_kzalloc(dev,
drvdata->buffer_depth * 4, GFP_KERNEL);
- if (!drvdata->buf) {
- dev_err(dev, "Failed to allocate %u bytes for buffer data\n",
- drvdata->buffer_depth * 4);
+ if (!drvdata->buf)
return -ENOMEM;
- }
desc.type = CORESIGHT_DEV_TYPE_SINK;
desc.subtype.sink_subtype = CORESIGHT_DEV_SUBTYPE_SINK_BUFFER;
--
2.12.3
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 2/3] coresight: etb10: Fix a typo in a comment line
2017-05-12 18:50 ` SF Markus Elfring
(?)
@ 2017-05-12 18:52 ` SF Markus Elfring
-1 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-05-12 18:52 UTC (permalink / raw)
To: linux-arm-kernel, Mathieu Poirier, Suzuki K. Poulose
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 12 May 2017 20:30:42 +0200
Delete a character in this description for a condition check.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/hwtracing/coresight/coresight-etb10.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
index 837aebf22c45..d5b96423e1a5 100644
--- a/drivers/hwtracing/coresight/coresight-etb10.c
+++ b/drivers/hwtracing/coresight/coresight-etb10.c
@@ -375,7 +375,7 @@ static void etb_update_buffer(struct coresight_device *csdev,
/*
* Entries should be aligned to the frame size. If they are not
- * go back to the last alignement point to give decoding tools a
+ * go back to the last alignment point to give decoding tools a
* chance to fix things.
*/
if (write_ptr % ETB_FRAME_SIZE_WORDS) {
--
2.12.3
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 2/3] coresight: etb10: Fix a typo in a comment line
@ 2017-05-12 18:52 ` SF Markus Elfring
0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-05-12 18:52 UTC (permalink / raw)
To: linux-arm-kernel
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 12 May 2017 20:30:42 +0200
Delete a character in this description for a condition check.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/hwtracing/coresight/coresight-etb10.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
index 837aebf22c45..d5b96423e1a5 100644
--- a/drivers/hwtracing/coresight/coresight-etb10.c
+++ b/drivers/hwtracing/coresight/coresight-etb10.c
@@ -375,7 +375,7 @@ static void etb_update_buffer(struct coresight_device *csdev,
/*
* Entries should be aligned to the frame size. If they are not
- * go back to the last alignement point to give decoding tools a
+ * go back to the last alignment point to give decoding tools a
* chance to fix things.
*/
if (write_ptr % ETB_FRAME_SIZE_WORDS) {
--
2.12.3
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 2/3] coresight: etb10: Fix a typo in a comment line
@ 2017-05-12 18:52 ` SF Markus Elfring
0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-05-12 18:52 UTC (permalink / raw)
To: linux-arm-kernel
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 12 May 2017 20:30:42 +0200
Delete a character in this description for a condition check.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/hwtracing/coresight/coresight-etb10.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
index 837aebf22c45..d5b96423e1a5 100644
--- a/drivers/hwtracing/coresight/coresight-etb10.c
+++ b/drivers/hwtracing/coresight/coresight-etb10.c
@@ -375,7 +375,7 @@ static void etb_update_buffer(struct coresight_device *csdev,
/*
* Entries should be aligned to the frame size. If they are not
- * go back to the last alignement point to give decoding tools a
+ * go back to the last alignment point to give decoding tools a
* chance to fix things.
*/
if (write_ptr % ETB_FRAME_SIZE_WORDS) {
--
2.12.3
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer()
2017-05-12 18:50 ` SF Markus Elfring
(?)
@ 2017-05-12 18:53 ` SF Markus Elfring
-1 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-05-12 18:53 UTC (permalink / raw)
To: linux-arm-kernel, Mathieu Poirier, Suzuki K. Poulose
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 12 May 2017 20:36:03 +0200
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/hwtracing/coresight/coresight-etb10.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
index d5b96423e1a5..7096c4562e15 100644
--- a/drivers/hwtracing/coresight/coresight-etb10.c
+++ b/drivers/hwtracing/coresight/coresight-etb10.c
@@ -278,8 +278,7 @@ static void *etb_alloc_buffer(struct coresight_device *csdev, int cpu,
if (cpu == -1)
cpu = smp_processor_id();
node = cpu_to_node(cpu);
-
- buf = kzalloc_node(sizeof(struct cs_buffers), GFP_KERNEL, node);
+ buf = kzalloc_node(sizeof(*buf), GFP_KERNEL, node);
if (!buf)
return NULL;
--
2.12.3
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer()
@ 2017-05-12 18:53 ` SF Markus Elfring
0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-05-12 18:53 UTC (permalink / raw)
To: linux-arm-kernel
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 12 May 2017 20:36:03 +0200
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/hwtracing/coresight/coresight-etb10.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
index d5b96423e1a5..7096c4562e15 100644
--- a/drivers/hwtracing/coresight/coresight-etb10.c
+++ b/drivers/hwtracing/coresight/coresight-etb10.c
@@ -278,8 +278,7 @@ static void *etb_alloc_buffer(struct coresight_device *csdev, int cpu,
if (cpu = -1)
cpu = smp_processor_id();
node = cpu_to_node(cpu);
-
- buf = kzalloc_node(sizeof(struct cs_buffers), GFP_KERNEL, node);
+ buf = kzalloc_node(sizeof(*buf), GFP_KERNEL, node);
if (!buf)
return NULL;
--
2.12.3
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer()
@ 2017-05-12 18:53 ` SF Markus Elfring
0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-05-12 18:53 UTC (permalink / raw)
To: linux-arm-kernel
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 12 May 2017 20:36:03 +0200
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/hwtracing/coresight/coresight-etb10.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
index d5b96423e1a5..7096c4562e15 100644
--- a/drivers/hwtracing/coresight/coresight-etb10.c
+++ b/drivers/hwtracing/coresight/coresight-etb10.c
@@ -278,8 +278,7 @@ static void *etb_alloc_buffer(struct coresight_device *csdev, int cpu,
if (cpu == -1)
cpu = smp_processor_id();
node = cpu_to_node(cpu);
-
- buf = kzalloc_node(sizeof(struct cs_buffers), GFP_KERNEL, node);
+ buf = kzalloc_node(sizeof(*buf), GFP_KERNEL, node);
if (!buf)
return NULL;
--
2.12.3
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 1/3] coresight: etb10: Delete an error message for a failed memory allocation in etb_probe()
2017-05-12 18:51 ` SF Markus Elfring
(?)
@ 2017-05-15 17:44 ` Mathieu Poirier
-1 siblings, 0 replies; 24+ messages in thread
From: Mathieu Poirier @ 2017-05-15 17:44 UTC (permalink / raw)
To: SF Markus Elfring
Cc: linux-arm-kernel, Suzuki K. Poulose, LKML, kernel-janitors, Wolfram Sang
On 12 May 2017 at 12:51, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 12 May 2017 20:23:43 +0200
>
> Omit an extra message for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/hwtracing/coresight/coresight-etb10.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
> index 979ea6ec7902..837aebf22c45 100644
> --- a/drivers/hwtracing/coresight/coresight-etb10.c
> +++ b/drivers/hwtracing/coresight/coresight-etb10.c
> @@ -675,11 +675,8 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id)
>
> drvdata->buf = devm_kzalloc(dev,
> drvdata->buffer_depth * 4, GFP_KERNEL);
> - if (!drvdata->buf) {
> - dev_err(dev, "Failed to allocate %u bytes for buffer data\n",
> - drvdata->buffer_depth * 4);
> + if (!drvdata->buf)
> return -ENOMEM;
> - }
>
> desc.type = CORESIGHT_DEV_TYPE_SINK;
> desc.subtype.sink_subtype = CORESIGHT_DEV_SUBTYPE_SINK_BUFFER;
Applied - thanks.
> --
> 2.12.3
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 1/3] coresight: etb10: Delete an error message for a failed memory allocation in etb_prob
@ 2017-05-15 17:44 ` Mathieu Poirier
0 siblings, 0 replies; 24+ messages in thread
From: Mathieu Poirier @ 2017-05-15 17:44 UTC (permalink / raw)
To: linux-arm-kernel
On 12 May 2017 at 12:51, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 12 May 2017 20:23:43 +0200
>
> Omit an extra message for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/hwtracing/coresight/coresight-etb10.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
> index 979ea6ec7902..837aebf22c45 100644
> --- a/drivers/hwtracing/coresight/coresight-etb10.c
> +++ b/drivers/hwtracing/coresight/coresight-etb10.c
> @@ -675,11 +675,8 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id)
>
> drvdata->buf = devm_kzalloc(dev,
> drvdata->buffer_depth * 4, GFP_KERNEL);
> - if (!drvdata->buf) {
> - dev_err(dev, "Failed to allocate %u bytes for buffer data\n",
> - drvdata->buffer_depth * 4);
> + if (!drvdata->buf)
> return -ENOMEM;
> - }
>
> desc.type = CORESIGHT_DEV_TYPE_SINK;
> desc.subtype.sink_subtype = CORESIGHT_DEV_SUBTYPE_SINK_BUFFER;
Applied - thanks.
> --
> 2.12.3
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 1/3] coresight: etb10: Delete an error message for a failed memory allocation in etb_probe()
@ 2017-05-15 17:44 ` Mathieu Poirier
0 siblings, 0 replies; 24+ messages in thread
From: Mathieu Poirier @ 2017-05-15 17:44 UTC (permalink / raw)
To: linux-arm-kernel
On 12 May 2017 at 12:51, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 12 May 2017 20:23:43 +0200
>
> Omit an extra message for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/hwtracing/coresight/coresight-etb10.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
> index 979ea6ec7902..837aebf22c45 100644
> --- a/drivers/hwtracing/coresight/coresight-etb10.c
> +++ b/drivers/hwtracing/coresight/coresight-etb10.c
> @@ -675,11 +675,8 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id)
>
> drvdata->buf = devm_kzalloc(dev,
> drvdata->buffer_depth * 4, GFP_KERNEL);
> - if (!drvdata->buf) {
> - dev_err(dev, "Failed to allocate %u bytes for buffer data\n",
> - drvdata->buffer_depth * 4);
> + if (!drvdata->buf)
> return -ENOMEM;
> - }
>
> desc.type = CORESIGHT_DEV_TYPE_SINK;
> desc.subtype.sink_subtype = CORESIGHT_DEV_SUBTYPE_SINK_BUFFER;
Applied - thanks.
> --
> 2.12.3
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] coresight: etb10: Fix a typo in a comment line
2017-05-12 18:52 ` SF Markus Elfring
(?)
@ 2017-05-15 17:44 ` Mathieu Poirier
-1 siblings, 0 replies; 24+ messages in thread
From: Mathieu Poirier @ 2017-05-15 17:44 UTC (permalink / raw)
To: SF Markus Elfring
Cc: linux-arm-kernel, Suzuki K. Poulose, LKML, kernel-janitors
On 12 May 2017 at 12:52, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 12 May 2017 20:30:42 +0200
>
> Delete a character in this description for a condition check.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/hwtracing/coresight/coresight-etb10.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
> index 837aebf22c45..d5b96423e1a5 100644
> --- a/drivers/hwtracing/coresight/coresight-etb10.c
> +++ b/drivers/hwtracing/coresight/coresight-etb10.c
> @@ -375,7 +375,7 @@ static void etb_update_buffer(struct coresight_device *csdev,
>
> /*
> * Entries should be aligned to the frame size. If they are not
> - * go back to the last alignement point to give decoding tools a
> + * go back to the last alignment point to give decoding tools a
> * chance to fix things.
> */
> if (write_ptr % ETB_FRAME_SIZE_WORDS) {
Applied - thanks.
> --
> 2.12.3
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] coresight: etb10: Fix a typo in a comment line
@ 2017-05-15 17:44 ` Mathieu Poirier
0 siblings, 0 replies; 24+ messages in thread
From: Mathieu Poirier @ 2017-05-15 17:44 UTC (permalink / raw)
To: linux-arm-kernel
On 12 May 2017 at 12:52, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 12 May 2017 20:30:42 +0200
>
> Delete a character in this description for a condition check.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/hwtracing/coresight/coresight-etb10.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
> index 837aebf22c45..d5b96423e1a5 100644
> --- a/drivers/hwtracing/coresight/coresight-etb10.c
> +++ b/drivers/hwtracing/coresight/coresight-etb10.c
> @@ -375,7 +375,7 @@ static void etb_update_buffer(struct coresight_device *csdev,
>
> /*
> * Entries should be aligned to the frame size. If they are not
> - * go back to the last alignement point to give decoding tools a
> + * go back to the last alignment point to give decoding tools a
> * chance to fix things.
> */
> if (write_ptr % ETB_FRAME_SIZE_WORDS) {
Applied - thanks.
> --
> 2.12.3
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 2/3] coresight: etb10: Fix a typo in a comment line
@ 2017-05-15 17:44 ` Mathieu Poirier
0 siblings, 0 replies; 24+ messages in thread
From: Mathieu Poirier @ 2017-05-15 17:44 UTC (permalink / raw)
To: linux-arm-kernel
On 12 May 2017 at 12:52, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 12 May 2017 20:30:42 +0200
>
> Delete a character in this description for a condition check.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/hwtracing/coresight/coresight-etb10.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
> index 837aebf22c45..d5b96423e1a5 100644
> --- a/drivers/hwtracing/coresight/coresight-etb10.c
> +++ b/drivers/hwtracing/coresight/coresight-etb10.c
> @@ -375,7 +375,7 @@ static void etb_update_buffer(struct coresight_device *csdev,
>
> /*
> * Entries should be aligned to the frame size. If they are not
> - * go back to the last alignement point to give decoding tools a
> + * go back to the last alignment point to give decoding tools a
> * chance to fix things.
> */
> if (write_ptr % ETB_FRAME_SIZE_WORDS) {
Applied - thanks.
> --
> 2.12.3
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer()
2017-05-12 18:53 ` SF Markus Elfring
(?)
@ 2017-05-15 17:47 ` Mathieu Poirier
-1 siblings, 0 replies; 24+ messages in thread
From: Mathieu Poirier @ 2017-05-15 17:47 UTC (permalink / raw)
To: SF Markus Elfring
Cc: linux-arm-kernel, Suzuki K. Poulose, kernel-janitors, LKML
On 12 May 2017 at 12:53, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 12 May 2017 20:36:03 +0200
>
> Replace the specification of a data structure by a pointer dereference
> as the parameter for the operator "sizeof" to make the corresponding size
> determination a bit safer according to the Linux coding style convention.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/hwtracing/coresight/coresight-etb10.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
> index d5b96423e1a5..7096c4562e15 100644
> --- a/drivers/hwtracing/coresight/coresight-etb10.c
> +++ b/drivers/hwtracing/coresight/coresight-etb10.c
> @@ -278,8 +278,7 @@ static void *etb_alloc_buffer(struct coresight_device *csdev, int cpu,
> if (cpu == -1)
> cpu = smp_processor_id();
> node = cpu_to_node(cpu);
> -
> - buf = kzalloc_node(sizeof(struct cs_buffers), GFP_KERNEL, node);
> + buf = kzalloc_node(sizeof(*buf), GFP_KERNEL, node);
I'm fine with this change but if it's going to happen, it has to be in
all the coresight drivers and not just this one - please respin with
all instances fixed. One patch per driver would be much appreciated.
Thanks,
Mathieu
> if (!buf)
> return NULL;
>
> --
> 2.12.3
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer()
@ 2017-05-15 17:47 ` Mathieu Poirier
0 siblings, 0 replies; 24+ messages in thread
From: Mathieu Poirier @ 2017-05-15 17:47 UTC (permalink / raw)
To: linux-arm-kernel
On 12 May 2017 at 12:53, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 12 May 2017 20:36:03 +0200
>
> Replace the specification of a data structure by a pointer dereference
> as the parameter for the operator "sizeof" to make the corresponding size
> determination a bit safer according to the Linux coding style convention.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/hwtracing/coresight/coresight-etb10.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
> index d5b96423e1a5..7096c4562e15 100644
> --- a/drivers/hwtracing/coresight/coresight-etb10.c
> +++ b/drivers/hwtracing/coresight/coresight-etb10.c
> @@ -278,8 +278,7 @@ static void *etb_alloc_buffer(struct coresight_device *csdev, int cpu,
> if (cpu = -1)
> cpu = smp_processor_id();
> node = cpu_to_node(cpu);
> -
> - buf = kzalloc_node(sizeof(struct cs_buffers), GFP_KERNEL, node);
> + buf = kzalloc_node(sizeof(*buf), GFP_KERNEL, node);
I'm fine with this change but if it's going to happen, it has to be in
all the coresight drivers and not just this one - please respin with
all instances fixed. One patch per driver would be much appreciated.
Thanks,
Mathieu
> if (!buf)
> return NULL;
>
> --
> 2.12.3
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer()
@ 2017-05-15 17:47 ` Mathieu Poirier
0 siblings, 0 replies; 24+ messages in thread
From: Mathieu Poirier @ 2017-05-15 17:47 UTC (permalink / raw)
To: linux-arm-kernel
On 12 May 2017 at 12:53, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 12 May 2017 20:36:03 +0200
>
> Replace the specification of a data structure by a pointer dereference
> as the parameter for the operator "sizeof" to make the corresponding size
> determination a bit safer according to the Linux coding style convention.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/hwtracing/coresight/coresight-etb10.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
> index d5b96423e1a5..7096c4562e15 100644
> --- a/drivers/hwtracing/coresight/coresight-etb10.c
> +++ b/drivers/hwtracing/coresight/coresight-etb10.c
> @@ -278,8 +278,7 @@ static void *etb_alloc_buffer(struct coresight_device *csdev, int cpu,
> if (cpu == -1)
> cpu = smp_processor_id();
> node = cpu_to_node(cpu);
> -
> - buf = kzalloc_node(sizeof(struct cs_buffers), GFP_KERNEL, node);
> + buf = kzalloc_node(sizeof(*buf), GFP_KERNEL, node);
I'm fine with this change but if it's going to happen, it has to be in
all the coresight drivers and not just this one - please respin with
all instances fixed. One patch per driver would be much appreciated.
Thanks,
Mathieu
> if (!buf)
> return NULL;
>
> --
> 2.12.3
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer()
2017-05-15 17:47 ` Mathieu Poirier
(?)
@ 2017-05-15 19:34 ` SF Markus Elfring
-1 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-05-15 19:34 UTC (permalink / raw)
To: Mathieu Poirier
Cc: linux-arm-kernel, Suzuki K. Poulose, kernel-janitors, LKML
>> +++ b/drivers/hwtracing/coresight/coresight-etb10.c
>> @@ -278,8 +278,7 @@ static void *etb_alloc_buffer(struct coresight_device *csdev, int cpu,
>> if (cpu == -1)
>> cpu = smp_processor_id();
>> node = cpu_to_node(cpu);
>> -
>> - buf = kzalloc_node(sizeof(struct cs_buffers), GFP_KERNEL, node);
>> + buf = kzalloc_node(sizeof(*buf), GFP_KERNEL, node);
>
> I'm fine with this change but if it's going to happen, it has to be in
> all the coresight drivers and not just this one - please respin with
> all instances fixed. One patch per driver would be much appreciated.
Do you imagine that any more modules are affected in a similar way
for this software area?
How do you think about other update suggestions from my selection
which are waiting for a corresponding review?
Regards,
Markus
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer()
@ 2017-05-15 19:34 ` SF Markus Elfring
0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-05-15 19:34 UTC (permalink / raw)
To: linux-arm-kernel
>> +++ b/drivers/hwtracing/coresight/coresight-etb10.c
>> @@ -278,8 +278,7 @@ static void *etb_alloc_buffer(struct coresight_device *csdev, int cpu,
>> if (cpu = -1)
>> cpu = smp_processor_id();
>> node = cpu_to_node(cpu);
>> -
>> - buf = kzalloc_node(sizeof(struct cs_buffers), GFP_KERNEL, node);
>> + buf = kzalloc_node(sizeof(*buf), GFP_KERNEL, node);
>
> I'm fine with this change but if it's going to happen, it has to be in
> all the coresight drivers and not just this one - please respin with
> all instances fixed. One patch per driver would be much appreciated.
Do you imagine that any more modules are affected in a similar way
for this software area?
How do you think about other update suggestions from my selection
which are waiting for a corresponding review?
Regards,
Markus
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer()
@ 2017-05-15 19:34 ` SF Markus Elfring
0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-05-15 19:34 UTC (permalink / raw)
To: linux-arm-kernel
>> +++ b/drivers/hwtracing/coresight/coresight-etb10.c
>> @@ -278,8 +278,7 @@ static void *etb_alloc_buffer(struct coresight_device *csdev, int cpu,
>> if (cpu == -1)
>> cpu = smp_processor_id();
>> node = cpu_to_node(cpu);
>> -
>> - buf = kzalloc_node(sizeof(struct cs_buffers), GFP_KERNEL, node);
>> + buf = kzalloc_node(sizeof(*buf), GFP_KERNEL, node);
>
> I'm fine with this change but if it's going to happen, it has to be in
> all the coresight drivers and not just this one - please respin with
> all instances fixed. One patch per driver would be much appreciated.
Do you imagine that any more modules are affected in a similar way
for this software area?
How do you think about other update suggestions from my selection
which are waiting for a corresponding review?
Regards,
Markus
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2017-05-15 19:35 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-12 18:50 [PATCH 0/3] CoreSight-ETB10: Adjustments for three function implementations SF Markus Elfring
2017-05-12 18:50 ` SF Markus Elfring
2017-05-12 18:50 ` SF Markus Elfring
2017-05-12 18:51 ` [PATCH 1/3] coresight: etb10: Delete an error message for a failed memory allocation in etb_probe() SF Markus Elfring
2017-05-12 18:51 ` SF Markus Elfring
2017-05-12 18:51 ` SF Markus Elfring
2017-05-15 17:44 ` Mathieu Poirier
2017-05-15 17:44 ` Mathieu Poirier
2017-05-15 17:44 ` [PATCH 1/3] coresight: etb10: Delete an error message for a failed memory allocation in etb_prob Mathieu Poirier
2017-05-12 18:52 ` [PATCH 2/3] coresight: etb10: Fix a typo in a comment line SF Markus Elfring
2017-05-12 18:52 ` SF Markus Elfring
2017-05-12 18:52 ` SF Markus Elfring
2017-05-15 17:44 ` Mathieu Poirier
2017-05-15 17:44 ` Mathieu Poirier
2017-05-15 17:44 ` Mathieu Poirier
2017-05-12 18:53 ` [PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer() SF Markus Elfring
2017-05-12 18:53 ` SF Markus Elfring
2017-05-12 18:53 ` SF Markus Elfring
2017-05-15 17:47 ` Mathieu Poirier
2017-05-15 17:47 ` Mathieu Poirier
2017-05-15 17:47 ` Mathieu Poirier
2017-05-15 19:34 ` SF Markus Elfring
2017-05-15 19:34 ` SF Markus Elfring
2017-05-15 19:34 ` SF Markus Elfring
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.