Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933315AbeAHNXj (ORCPT + 1 other); Mon, 8 Jan 2018 08:23:39 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:42076 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932423AbeAHNXh (ORCPT ); Mon, 8 Jan 2018 08:23:37 -0500 Date: Mon, 8 Jan 2018 16:23:07 +0300 From: Dan Carpenter To: haver Cc: SF Markus Elfring , kernel-janitors@vger.kernel.org, Arnd Bergmann , Greg Kroah-Hartman , "Guilherme G. Piccoli" , LKML , =?iso-8859-1?Q?J=F6rg-Stephan?= Vogt , Michael Jung , Michael =?iso-8859-1?Q?R=FCttger?= Subject: Re: [PATCH 1/3] GenWQE: Delete an error message for a failed memory allocation in genwqe_user_vmap() Message-ID: <20180108132307.chdoupnkv2ydfyka@mwanda> References: <127e28a8a4d9081eb323e3c7ab93dad0@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <127e28a8a4d9081eb323e3c7ab93dad0@linux.vnet.ibm.com> User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8767 signatures=668652 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801080194 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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 > > 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 > > --- > > 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 why > do > you suggest to remove it? > It's a checkpatch warning and a small memory savings. regards, dan carpenter