Received: by 10.223.164.202 with SMTP id h10csp2221463wrb; Mon, 27 Nov 2017 13:46:21 -0800 (PST) X-Google-Smtp-Source: AGs4zMYboXvXWPyGG9095JlzIUryIib6IM6mEniRfsCk5F64fMAWmxOMUs3xCirsUNzY6+pWnp/a X-Received: by 10.84.241.5 with SMTP id a5mr27828989pll.128.1511819181510; Mon, 27 Nov 2017 13:46:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511819181; cv=none; d=google.com; s=arc-20160816; b=v+K5SKDIY2YnfU14yO2JhFfFs+cEXoaJdPt3clUCOUo+pV0uwsiuxkjBedvLKkllZU qnNNpR8Dos2peJuaQ6iScN3EooKZDMALqtxyh/YwDLcwaxzKNQ5Wn6JlCGVBS1qo0kk6 LkoPSxmOk6hUEqwtQ2brEH3fdyt5/2OXr9XWMvlY5Un6fplfZJ6URdKn50DK6+xhyd8Z 7D+CryAOQ/tYraO2WcWPwGAUpu9EyiKtaZ/UwPvTdY2vzBK4FAfYicJjTb5D/V4ZRWW4 6IpWJvNC/VAQpCHAnIUqO5+cU6EWvNn6RpVYUBXsc1Ifqsj93JLY+r5eUO64XSDTctG4 9XEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=W6YTx94KDPlJZHE/+4OrA344qEyHWLSU6qGIfyoVNZA=; b=KFOpBNdWromWpFl/q1wo7oSjTlQBkjOj4Ut5GA6GqCVITeNrcyp1b5hIDHx0+FU/z9 TQin75xWyvVylU0mwgX9/jPNs/c/vBoEaBhRsNqBFuldpv1X+mUiBlRfaRU0bL28gBwC h+T7nfa+uN1aS6ah6i1b/rxaOM2bsiBKHRQ4LZdkIESzglr6d+vZtrEl+P1KPciwTejQ unkXULpIQGLt3drdvCfjMMaPrn+vLcI6rblSVyT8JRcidh6A2z505qTaOc2DQd1xtxfq o53RJXLdbbuo16OgBEEQRBzMCww11yzaCjxJ0bxFMzwOc6t/MSgR9WZOCFaC2pVJU89X 8NfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i15si2764659plk.117.2017.11.27.13.46.10; Mon, 27 Nov 2017 13:46:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752611AbdK0VpQ (ORCPT + 78 others); Mon, 27 Nov 2017 16:45:16 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:35384 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752275AbdK0VpO (ORCPT ); Mon, 27 Nov 2017 16:45:14 -0500 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23990409AbdK0VpLlGMqr (ORCPT + 3 others); Mon, 27 Nov 2017 22:45:11 +0100 Date: Mon, 27 Nov 2017 22:45:08 +0100 From: Ladislav Michl To: "Andrew F. Davis" Cc: Joe Perches , SF Markus Elfring , linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Arvind Yadav , Bartlomiej Zolnierkiewicz , Tomi Valkeinen , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH] omapfb/dss: Delete an error message for a failed memory allocation in three functions Message-ID: <20171127214508.GA9448@lenoch> References: <1511809633.32426.70.camel@perches.com> <15209a13-c53b-068b-c0b2-f073117d39e2@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15209a13-c53b-068b-c0b2-f073117d39e2@ti.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 27, 2017 at 03:33:13PM -0600, Andrew F. Davis wrote: > On 11/27/2017 01:07 PM, Joe Perches wrote: > > On Mon, 2017-11-27 at 10:43 -0600, Andrew F. Davis wrote: > >> On 11/26/2017 12:55 PM, SF Markus Elfring wrote: > >>> From: Markus Elfring > >>> Date: Sun, 26 Nov 2017 19:46:09 +0100 > >>> > >>> Omit an extra message for a memory allocation failure in these functions. > >>> > >>> This issue was detected by using the Coccinelle software. > >>> > >>> Signed-off-by: Markus Elfring > >>> --- > >> > >> nak, unlike many others, these message give extra info on which > >> allocation failed, that can be useful. > > > > Not really. There are tradeoffs. > > > > There is the generic stack dump on OOM so the module/line > > is already known. > > > > If that is the case then I have no strong feelings either way. > > > The existence of these messages increases code size which > > also make the OOM condition slightly more likely. > > > > These are generally used only at initialization and those > > if you are OOM at initialization, bad things happen anyway > > so where the specific OOM occurred doesn't really matter. > > > > True, these messages will probably only ever get displayed if someone is > messing with the allocated structs and accidentally balloons their size, > so these are more debug statements than anything. All those messages are result of allocation failure. The memory allocated is later used to hold duplicate of static const data. Do we need that copy (and thus allocation) at all? ladis From 1585248449629949648@xxx Mon Nov 27 19:25:31 +0000 2017 X-GM-THRID: 1585156039807309629 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread