Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933015AbeAHNkq (ORCPT + 1 other); Mon, 8 Jan 2018 08:40:46 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39728 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932384AbeAHNko (ORCPT ); Mon, 8 Jan 2018 08:40:44 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 08 Jan 2018 14:40:43 +0100 From: haver To: Dan Carpenter Cc: SF Markus Elfring , kernel-janitors@vger.kernel.org, Arnd Bergmann , Greg Kroah-Hartman , "Guilherme G. Piccoli" , LKML , =?UTF-8?Q?J=C3=B6rg-Stephan_Vogt?= , Michael Jung , =?UTF-8?Q?Michael_R=C3=BCttger?= Subject: Re: [PATCH 1/3] GenWQE: Delete an error message for a failed memory allocation in genwqe_user_vmap() In-Reply-To: <20180108132307.chdoupnkv2ydfyka@mwanda> References: <127e28a8a4d9081eb323e3c7ab93dad0@linux.vnet.ibm.com> <20180108132307.chdoupnkv2ydfyka@mwanda> User-Agent: Roundcube Webmail/1.0.1 X-TM-AS-GCONF: 00 x-cbid: 18010813-0056-0000-0000-00000404D3ED X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008340; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000245; SDB=6.00972024; UDB=6.00492395; IPR=6.00751974; BA=6.00005767; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00018923; XFM=3.00000015; UTC=2018-01-08 13:40:41 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18010813-0057-0000-0000-0000083C2972 Message-Id: <7306e530d75dadf75fa65c39afec34e7@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-08_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801080198 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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 >> > 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 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