Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1640688 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2017-05-12 21:00 +0200 |
| Last post | 2017-05-15 19:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/3] coresight: etb10: Delete an error message for a failed memory allocation in etb_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-12 21:00 +0200
Re: [PATCH 1/3] coresight: etb10: Delete an error message for a failed memory allocation in etb_probe() Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-05-15 19:50 +0200
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-05-12 21:00 +0200 |
| Subject | [PATCH 1/3] coresight: etb10: Delete an error message for a failed memory allocation in etb_probe() |
| Message-ID | <tGnXb-lv-1@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Mathieu Poirier <mathieu.poirier@linaro.org> |
|---|---|
| Date | 2017-05-15 19:50 +0200 |
| Subject | Re: [PATCH 1/3] coresight: etb10: Delete an error message for a failed memory allocation in etb_probe() |
| Message-ID | <tHsi6-2M0-13@gated-at.bofh.it> |
| In reply to | #1640688 |
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
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web