Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1640690 > unrolled thread

[PATCH 0/3] CoreSight-ETB10: Adjustments for three function implementations

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2017-05-12 21:00 +0200
Last post2017-05-15 21:40 +0200
Articles 6 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/3] CoreSight-ETB10: Adjustments for three function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-12 21:00 +0200
    [PATCH 2/3] coresight: etb10: Fix a typo in a comment line SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-12 21:00 +0200
      Re: [PATCH 2/3] coresight: etb10: Fix a typo in a comment line Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-05-15 19:50 +0200
    [PATCH 3/3] coresight: etb10: Improve a size determination in  etb_alloc_buffer() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-12 21:00 +0200
      Re: [PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer() Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-05-15 19:50 +0200
        Re: [PATCH 3/3] coresight: etb10: Improve a size determination in  etb_alloc_buffer() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-15 21:40 +0200

#1640690 — [PATCH 0/3] CoreSight-ETB10: Adjustments for three function implementations

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-05-12 21:00 +0200
Subject[PATCH 0/3] CoreSight-ETB10: Adjustments for three function implementations
Message-ID<tGnXb-lv-3@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1640693 — [PATCH 2/3] coresight: etb10: Fix a typo in a comment line

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-05-12 21:00 +0200
Subject[PATCH 2/3] coresight: etb10: Fix a typo in a comment line
Message-ID<tGnXb-lv-11@gated-at.bofh.it>
In reply to#1640690
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

[toc] | [prev] | [next] | [standalone]


#1641929 — Re: [PATCH 2/3] coresight: etb10: Fix a typo in a comment line

FromMathieu Poirier <mathieu.poirier@linaro.org>
Date2017-05-15 19:50 +0200
SubjectRe: [PATCH 2/3] coresight: etb10: Fix a typo in a comment line
Message-ID<tHsi6-2M0-5@gated-at.bofh.it>
In reply to#1640693
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
>

[toc] | [prev] | [next] | [standalone]


#1640695 — [PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-05-12 21:00 +0200
Subject[PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer()
Message-ID<tGnXb-lv-13@gated-at.bofh.it>
In reply to#1640690
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

[toc] | [prev] | [next] | [standalone]


#1641927 — Re: [PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer()

FromMathieu Poirier <mathieu.poirier@linaro.org>
Date2017-05-15 19:50 +0200
SubjectRe: [PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer()
Message-ID<tHsi6-2M0-1@gated-at.bofh.it>
In reply to#1640695
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

[toc] | [prev] | [next] | [standalone]


#1642002 — Re: [PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-05-15 21:40 +0200
SubjectRe: [PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer()
Message-ID<tHu0y-3QH-7@gated-at.bofh.it>
In reply to#1641927
>> +++ 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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web