public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: haver <haver@linux.vnet.ibm.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "SF Markus Elfring" <elfring@users.sourceforge.net>,
	kernel-janitors@vger.kernel.org, "Arnd Bergmann" <arnd@arndb.de>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Guilherme G. Piccoli" <gpiccoli@linux.vnet.ibm.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"Jörg-Stephan Vogt" <jsvogt@de.ibm.com>,
	"Michael Jung" <MIJUNG@de.ibm.com>,
	"Michael Rüttger" <michael@ibmra.de>
Subject: Re: [PATCH 1/3] GenWQE: Delete an error message for a failed memory allocation in genwqe_user_vmap()
Date: Mon, 08 Jan 2018 14:40:43 +0100	[thread overview]
Message-ID: <7306e530d75dadf75fa65c39afec34e7@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180108132307.chdoupnkv2ydfyka@mwanda>

Hi Dan,

On 2018-01-08 14:23, Dan Carpenter wrote:
> On Mon, Jan 08, 2018 at 01:45:02PM +0100, haver wrote:
>> Hi Markus,
>> 
>> On 2018-01-08 10:41, SF Markus Elfring wrote:
>> > From: Markus Elfring <elfring@users.sourceforge.net>
>> > Date: Mon, 8 Jan 2018 09:37:23 +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/misc/genwqe/card_utils.c | 1 -
>> >  1 file changed, 1 deletion(-)
>> >
>> > diff --git a/drivers/misc/genwqe/card_utils.c
>> > b/drivers/misc/genwqe/card_utils.c
>> > index 8f2e6442d88b..55c389a9e7d7 100644
>> > --- a/drivers/misc/genwqe/card_utils.c
>> > +++ b/drivers/misc/genwqe/card_utils.c
>> > @@ -593,7 +593,6 @@ int genwqe_user_vmap(struct genwqe_dev *cd, struct
>> > dma_mapping *m, void *uaddr,
>> >  			       sizeof(struct page *) + sizeof(dma_addr_t),
>> >  			       GFP_KERNEL);
>> >  	if (!m->page_list) {
>> > -		dev_err(&pci_dev->dev, "err: alloc page_list failed\n");
>> 
>> Are there different printouts which cover this? I mean the debug 
>> printout is
>> not
>> appearing all the time, it must be enabled, if I remember correctly.
> 
> The kmalloc() error messages are enabled by default.  See warn_alloc().
> The stack trace from this specific call site is going to be very clear
> what went wrong.
> 

So it appears it is ok to be removed. Let's remove the redundant 
printout as suggested.

> 
>> So why
>> do
>> you suggest to remove it?
>> 
> 
> It's a checkpatch warning and a small memory savings.
> 
> regards,
> dan carpenter

Acked-by: Frank Haverkamp <haver@linux.vnet.ibm.com>

  reply	other threads:[~2018-01-08 13:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-08  9:40 [PATCH 0/3] GenWQE: Adjustments for some function implementations SF Markus Elfring
2018-01-08  9:41 ` [PATCH 1/3] GenWQE: Delete an error message for a failed memory allocation in genwqe_user_vmap() SF Markus Elfring
2018-01-08 12:45   ` haver
2018-01-08 13:23     ` Dan Carpenter
2018-01-08 13:40       ` haver [this message]
2018-01-08 13:24     ` SF Markus Elfring
2018-01-08 13:42       ` haver
2018-01-08  9:42 ` [PATCH 2/3] GenWQE: Fix a typo in two comments SF Markus Elfring
2018-01-08 12:47   ` haver
2018-01-08  9:43 ` [PATCH 3/3] GenWQE: Adjust 12 checks for null pointers SF Markus Elfring
2018-01-08 12:50   ` haver
2018-01-08 13:50     ` [3/3] " SF Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7306e530d75dadf75fa65c39afec34e7@linux.vnet.ibm.com \
    --to=haver@linux.vnet.ibm.com \
    --cc=MIJUNG@de.ibm.com \
    --cc=arnd@arndb.de \
    --cc=dan.carpenter@oracle.com \
    --cc=elfring@users.sourceforge.net \
    --cc=gpiccoli@linux.vnet.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jsvogt@de.ibm.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@ibmra.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox