aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/pnv_php.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-12-29 06:15:16 -0500
committerBjorn Helgaas <bhelgaas@google.com>2018-01-17 09:41:41 -0500
commitc7abb2352c298e8ac2ccfd843f036ae5244d6f35 (patch)
tree7fbfb980fd5bacb12d8a31633a771a0f96a7ef14 /drivers/pci/hotplug/pnv_php.c
parentfdabc3fe998203038a78763c1b3d6ace517e0eea (diff)
PCI: Remove unnecessary messages for memory allocation failures
Per ebfdc40969f2 ("checkpatch: attempt to find unnecessary 'out of memory' messages"), when a memory allocation fails, the memory subsystem emits generic "out of memory" messages (see slab_out_of_memory() for some of this logging). Therefore, additional error messages in the caller don't add much value. Remove messages that merely report "out of memory". This preserves some messages that report additional information, e.g., allocation failures that mean we drop hotplug events. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> [bhelgaas: changelog, squash patches, make similar changes to acpiphp, cpqphp, ibmphp, keep warning when dropping hotplug event] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/hotplug/pnv_php.c')
-rw-r--r--drivers/pci/hotplug/pnv_php.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c
index 74f6a17e4614..318baa507364 100644
--- a/drivers/pci/hotplug/pnv_php.c
+++ b/drivers/pci/hotplug/pnv_php.c
@@ -266,7 +266,6 @@ static int pnv_php_add_devtree(struct pnv_php_slot *php_slot)
266 fdt1 = kzalloc(0x10000, GFP_KERNEL); 266 fdt1 = kzalloc(0x10000, GFP_KERNEL);
267 if (!fdt1) { 267 if (!fdt1) {
268 ret = -ENOMEM; 268 ret = -ENOMEM;
269 dev_warn(&php_slot->pdev->dev, "Cannot alloc FDT blob\n");
270 goto out; 269 goto out;
271 } 270 }
272 271
@@ -280,8 +279,6 @@ static int pnv_php_add_devtree(struct pnv_php_slot *php_slot)
280 fdt = kzalloc(fdt_totalsize(fdt1), GFP_KERNEL); 279 fdt = kzalloc(fdt_totalsize(fdt1), GFP_KERNEL);
281 if (!fdt) { 280 if (!fdt) {
282 ret = -ENOMEM; 281 ret = -ENOMEM;
283 dev_warn(&php_slot->pdev->dev, "Cannot %d bytes memory\n",
284 fdt_totalsize(fdt1));
285 goto free_fdt1; 282 goto free_fdt1;
286 } 283 }
287 284