powerpc/eeh: Delete an error message for a failed memory allocation in two functions
PATCH 1/1 powerpc/eeh: Delete an error message for a failed memory allocation in two functions
From: Markus Elfring <[email protected]>
Date: Fri, 4 Aug 2017 16:37:56 +0200
Omit an extra message for a memory allocation failure in these functions.
This issue was detected by using the Coccinelle software.
--- arch/powerpc/kernel/eeh_dev.c | 5 +---- arch/powerpc/kernel/eeh_event.c | 5 ++--- 2 files changed, 3 insertions(+), 7 deletions(-)
arch/powerpc/kernel/eeh_dev.c +1 -4
@@ -55,11 +55,8 @@ struct eeh_dev *eeh_dev_init(struct pci_dn *pdn)/* Allocate EEH device */ edev =kzalloc (sizeof (*edev),GFP_KERNEL ); -if (!edev) { -pr_warn ("%s: out of memory\n" , - __func__); +if (!edev)return NULL ; - }/* Associate EEH device with OF node */ pdn->edev = edev;
arch/powerpc/kernel/eeh_event.c +2 -3
@@ -132,10 +132,9 @@ int eeh_send_failure_event(struct eeh_pe *pe)struct eeh_event *event; event =kzalloc (sizeof (*event),GFP_ATOMIC ); -if (!event) { -pr_err ("EEH: out of memory, event not handled\n" ); +if (!event)return -ENOMEM ; - } + event->pe = pe;/* We may or may not be called in an interrupt context */
Signature · 1 line
2.13.4
Michael Ellerman
AppliedQuoted 9 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Fri, 4 Aug 2017 16:37:56 +0200Omit an extra message for a memory allocation failure in these functions.
This issue was detected by using the Coccinelle software.
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/6ab41161b44a3b4d504ac29c9dd997
cheers
Quoted 3 lines
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/6ab41161b44a3b4d504ac29c9dd997
Thanks that you picked another update suggestion up.
* It might matter to mention that only one patch hunk was accepted in this case.
* Can it be that the adjusted commit subject does contain a typo at the moment? Would the wording “powerpc/eeh: Delete a message for an "out of memory error" (at init time)” be more appropriate there?
Regards,
Markus