Re: [PATCH] omapfb/dss: Delete an error message for a failed memory allocation in three functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <elfring@xxxxxxxxxxxxxxxxxxxxx>
> >>> 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 <elfring@xxxxxxxxxxxxxxxxxxxxx>
> >>> ---
> >>
> >> nak, unlike many others, these message give extra info on which
> >> allocation failed, that can be useful.
> > 
> > <shrug>  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
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux