[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sat, 2 Feb 2013 16:30:37 -0300
From: Ezequiel Garcia <elezegarcia@...il.com>
To: gregkh <gregkh@...uxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Dan Carpenter <dan.carpenter@...cle.com>,
kernelnewbies <kernelnewbies@...nelnewbies.org>,
kernel-janitors@...r.kernel.org,
linux-media <linux-media@...r.kernel.org>,
devel@...verdev.osuosl.org
Subject: Question about printking
Hello,
I have a quick question.
I (think I) remember Greg KH reviewing some driver patch on staging
mailing list,
suggesting not to do this sort of printking upon an allocation request failure:
ptr = kmalloc(sizeof(foo));
if (!ptr) {
pr_err("Cannot allocate memory for foo\n");
return -ENOMEM;
}
His argue against it was that kmalloc already takes care of reporting/printking
a good deal of interesting information when this happens.
Is my memory right?
Can someone expand a bit on this whole idea? (of abuse of printing,
or futility of printing).
I'm asking after seeing *a lot* of drivers doing exactly this.
Thanks,
--
Ezequiel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists