* [PATCH] lightnvm/pblk-gc: Delete an error message for a failed memory allocation in pblk_gc_line_prepare_ws()
@ 2018-01-16 21:10 SF Markus Elfring
2018-01-16 21:26 ` Matias Bjørling
2018-01-17 8:01 ` Javier González
0 siblings, 2 replies; 3+ messages in thread
From: SF Markus Elfring @ 2018-01-16 21:10 UTC (permalink / raw)
To: linux-block, Matias Bjorling; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 16 Jan 2018 22:00:15 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/lightnvm/pblk-gc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/lightnvm/pblk-gc.c b/drivers/lightnvm/pblk-gc.c
index 9c8e114c8a54..54cdb4360366 100644
--- a/drivers/lightnvm/pblk-gc.c
+++ b/drivers/lightnvm/pblk-gc.c
@@ -147,10 +147,8 @@ static void pblk_gc_line_prepare_ws(struct work_struct *work)
int ret;
invalid_bitmap = kmalloc(lm->sec_bitmap_len, GFP_KERNEL);
- if (!invalid_bitmap) {
- pr_err("pblk: could not allocate GC invalid bitmap\n");
+ if (!invalid_bitmap)
goto fail_free_ws;
- }
emeta_buf = pblk_malloc(lm->emeta_len[0], l_mg->emeta_alloc_type,
GFP_KERNEL);
--
2.15.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] lightnvm/pblk-gc: Delete an error message for a failed memory allocation in pblk_gc_line_prepare_ws()
2018-01-16 21:10 [PATCH] lightnvm/pblk-gc: Delete an error message for a failed memory allocation in pblk_gc_line_prepare_ws() SF Markus Elfring
@ 2018-01-16 21:26 ` Matias Bjørling
2018-01-17 8:01 ` Javier González
1 sibling, 0 replies; 3+ messages in thread
From: Matias Bjørling @ 2018-01-16 21:26 UTC (permalink / raw)
To: SF Markus Elfring, linux-block, Matias Bjorling; +Cc: LKML, kernel-janitors
On 01/16/2018 10:10 PM, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Tue, 16 Jan 2018 22:00:15 +0100
>
> Omit an extra message for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/lightnvm/pblk-gc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/lightnvm/pblk-gc.c b/drivers/lightnvm/pblk-gc.c
> index 9c8e114c8a54..54cdb4360366 100644
> --- a/drivers/lightnvm/pblk-gc.c
> +++ b/drivers/lightnvm/pblk-gc.c
> @@ -147,10 +147,8 @@ static void pblk_gc_line_prepare_ws(struct work_struct *work)
> int ret;
>
> invalid_bitmap = kmalloc(lm->sec_bitmap_len, GFP_KERNEL);
> - if (!invalid_bitmap) {
> - pr_err("pblk: could not allocate GC invalid bitmap\n");
> + if (!invalid_bitmap)
> goto fail_free_ws;
> - }
>
> emeta_buf = pblk_malloc(lm->emeta_len[0], l_mg->emeta_alloc_type,
> GFP_KERNEL);
>
Thanks Markus. I'll queue it up for 4.17.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] lightnvm/pblk-gc: Delete an error message for a failed memory allocation in pblk_gc_line_prepare_ws()
2018-01-16 21:10 [PATCH] lightnvm/pblk-gc: Delete an error message for a failed memory allocation in pblk_gc_line_prepare_ws() SF Markus Elfring
2018-01-16 21:26 ` Matias Bjørling
@ 2018-01-17 8:01 ` Javier González
1 sibling, 0 replies; 3+ messages in thread
From: Javier González @ 2018-01-17 8:01 UTC (permalink / raw)
To: SF Markus Elfring
Cc: linux-block, Matias Bjørling, LKML, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]
> On 16 Jan 2018, at 22.10, SF Markus Elfring <elfring@users.sourceforge.net> wrote:
>
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Tue, 16 Jan 2018 22:00:15 +0100
>
> Omit an extra message for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/lightnvm/pblk-gc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/lightnvm/pblk-gc.c b/drivers/lightnvm/pblk-gc.c
> index 9c8e114c8a54..54cdb4360366 100644
> --- a/drivers/lightnvm/pblk-gc.c
> +++ b/drivers/lightnvm/pblk-gc.c
> @@ -147,10 +147,8 @@ static void pblk_gc_line_prepare_ws(struct work_struct *work)
> int ret;
>
> invalid_bitmap = kmalloc(lm->sec_bitmap_len, GFP_KERNEL);
> - if (!invalid_bitmap) {
> - pr_err("pblk: could not allocate GC invalid bitmap\n");
> + if (!invalid_bitmap)
> goto fail_free_ws;
> - }
>
> emeta_buf = pblk_malloc(lm->emeta_len[0], l_mg->emeta_alloc_type,
> GFP_KERNEL);
> --
> 2.15.1
Looks good to me.
Reviewed-by: Javier González <javier@cnexlabs.com>
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-17 8:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-16 21:10 [PATCH] lightnvm/pblk-gc: Delete an error message for a failed memory allocation in pblk_gc_line_prepare_ws() SF Markus Elfring
2018-01-16 21:26 ` Matias Bjørling
2018-01-17 8:01 ` Javier González
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®