From: Joe Perches <joe@perches.com>
To: "Andrew F. Davis" <afd@ti.com>,
SF Markus Elfring <elfring@users.sourceforge.net>,
linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
dri-devel@lists.freedesktop.org,
Arvind Yadav <arvind.yadav.cs@gmail.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] omapfb/dss: Delete an error message for a failed memory allocation in three functions
Date: Mon, 27 Nov 2017 19:07:13 +0000 [thread overview]
Message-ID: <1511809633.32426.70.camel@perches.com> (raw)
In-Reply-To: <d29a0bae-7b6f-b8f6-6809-5a097cd5a26a@ti.com>
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@users.sourceforge.net>
> > 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@users.sourceforge.net>
> > ---
>
> 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.
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.
Markus' commit messages are always really poor descriptions
of why these removals are somewhat useful and the commit
could/should/might be applied.
Your choice.
> > drivers/video/fbdev/omap2/omapfb/dss/dispc.c | 4 +---
> > drivers/video/fbdev/omap2/omapfb/dss/dss.c | 4 +---
> > drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c | 4 +---
> > 3 files changed, 3 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
> > index 7a75dfda9845..10164a3bae4a 100644
> > --- a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
> > +++ b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
> > @@ -3982,10 +3982,8 @@ static int dispc_init_features(struct platform_device *pdev)
> > struct dispc_features *dst;
> >
> > dst = devm_kzalloc(&pdev->dev, sizeof(*dst), GFP_KERNEL);
> > - if (!dst) {
> > - dev_err(&pdev->dev, "Failed to allocate DISPC Features\n");
> > + if (!dst)
> > return -ENOMEM;
> > - }
> >
> > switch (omapdss_get_version()) {
> > case OMAPDSS_VER_OMAP24xx:
> > diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss.c b/drivers/video/fbdev/omap2/omapfb/dss/dss.c
> > index 48c6500c24e1..a5de13777e2b 100644
> > --- a/drivers/video/fbdev/omap2/omapfb/dss/dss.c
> > +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss.c
> > @@ -893,10 +893,8 @@ static int dss_init_features(struct platform_device *pdev)
> > struct dss_features *dst;
> >
> > dst = devm_kzalloc(&pdev->dev, sizeof(*dst), GFP_KERNEL);
> > - if (!dst) {
> > - dev_err(&pdev->dev, "Failed to allocate local DSS Features\n");
> > + if (!dst)
> > return -ENOMEM;
> > - }
> >
> > switch (omapdss_get_version()) {
> > case OMAPDSS_VER_OMAP24xx:
> > diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c
> > index 9a13c35fd6d8..d25eea10c665 100644
> > --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c
> > +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c
> > @@ -195,10 +195,8 @@ static int hdmi_phy_init_features(struct platform_device *pdev)
> > const struct hdmi_phy_features *src;
> >
> > dst = devm_kzalloc(&pdev->dev, sizeof(*dst), GFP_KERNEL);
> > - if (!dst) {
> > - dev_err(&pdev->dev, "Failed to allocate HDMI PHY Features\n");
> > + if (!dst)
> > return -ENOMEM;
> > - }
> >
> > switch (omapdss_get_version()) {
> > case OMAPDSS_VER_OMAP4430_ES1:
> >
WARNING: multiple messages have this Message-ID (diff)
From: Joe Perches <joe@perches.com>
To: "Andrew F. Davis" <afd@ti.com>,
SF Markus Elfring <elfring@users.sourceforge.net>,
linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
dri-devel@lists.freedesktop.org,
Arvind Yadav <arvind.yadav.cs@gmail.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] omapfb/dss: Delete an error message for a failed memory allocation in three functions
Date: Mon, 27 Nov 2017 11:07:13 -0800 [thread overview]
Message-ID: <1511809633.32426.70.camel@perches.com> (raw)
In-Reply-To: <d29a0bae-7b6f-b8f6-6809-5a097cd5a26a@ti.com>
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@users.sourceforge.net>
> > 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@users.sourceforge.net>
> > ---
>
> 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.
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.
Markus' commit messages are always really poor descriptions
of why these removals are somewhat useful and the commit
could/should/might be applied.
Your choice.
> > drivers/video/fbdev/omap2/omapfb/dss/dispc.c | 4 +---
> > drivers/video/fbdev/omap2/omapfb/dss/dss.c | 4 +---
> > drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c | 4 +---
> > 3 files changed, 3 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
> > index 7a75dfda9845..10164a3bae4a 100644
> > --- a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
> > +++ b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
> > @@ -3982,10 +3982,8 @@ static int dispc_init_features(struct platform_device *pdev)
> > struct dispc_features *dst;
> >
> > dst = devm_kzalloc(&pdev->dev, sizeof(*dst), GFP_KERNEL);
> > - if (!dst) {
> > - dev_err(&pdev->dev, "Failed to allocate DISPC Features\n");
> > + if (!dst)
> > return -ENOMEM;
> > - }
> >
> > switch (omapdss_get_version()) {
> > case OMAPDSS_VER_OMAP24xx:
> > diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss.c b/drivers/video/fbdev/omap2/omapfb/dss/dss.c
> > index 48c6500c24e1..a5de13777e2b 100644
> > --- a/drivers/video/fbdev/omap2/omapfb/dss/dss.c
> > +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss.c
> > @@ -893,10 +893,8 @@ static int dss_init_features(struct platform_device *pdev)
> > struct dss_features *dst;
> >
> > dst = devm_kzalloc(&pdev->dev, sizeof(*dst), GFP_KERNEL);
> > - if (!dst) {
> > - dev_err(&pdev->dev, "Failed to allocate local DSS Features\n");
> > + if (!dst)
> > return -ENOMEM;
> > - }
> >
> > switch (omapdss_get_version()) {
> > case OMAPDSS_VER_OMAP24xx:
> > diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c
> > index 9a13c35fd6d8..d25eea10c665 100644
> > --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c
> > +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c
> > @@ -195,10 +195,8 @@ static int hdmi_phy_init_features(struct platform_device *pdev)
> > const struct hdmi_phy_features *src;
> >
> > dst = devm_kzalloc(&pdev->dev, sizeof(*dst), GFP_KERNEL);
> > - if (!dst) {
> > - dev_err(&pdev->dev, "Failed to allocate HDMI PHY Features\n");
> > + if (!dst)
> > return -ENOMEM;
> > - }
> >
> > switch (omapdss_get_version()) {
> > case OMAPDSS_VER_OMAP4430_ES1:
> >
next prev parent reply other threads:[~2017-11-27 19:07 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-26 18:55 [PATCH] omapfb/dss: Delete an error message for a failed memory allocation in three functions SF Markus Elfring
2017-11-26 18:55 ` SF Markus Elfring
2017-11-26 18:55 ` SF Markus Elfring
2017-11-27 16:43 ` Andrew F. Davis
2017-11-27 16:43 ` Andrew F. Davis
2017-11-27 16:43 ` Andrew F. Davis
2017-11-27 17:27 ` SF Markus Elfring
2017-11-27 17:27 ` SF Markus Elfring
2017-11-27 17:27 ` SF Markus Elfring
2017-11-27 17:44 ` Ladislav Michl
2017-11-27 17:44 ` Ladislav Michl
2017-11-27 17:44 ` Ladislav Michl
2017-11-27 18:12 ` SF Markus Elfring
2017-11-27 18:12 ` SF Markus Elfring
2017-11-27 18:12 ` SF Markus Elfring
2017-11-27 18:56 ` Geert Uytterhoeven
2017-11-27 18:56 ` Geert Uytterhoeven
2017-11-27 18:56 ` Geert Uytterhoeven
2017-11-27 19:22 ` Ladislav Michl
2017-11-27 19:22 ` Ladislav Michl
2017-11-27 22:20 ` Ladislav Michl
2017-11-27 22:20 ` Ladislav Michl
2017-11-27 19:07 ` Joe Perches [this message]
2017-11-27 19:07 ` [PATCH] " Joe Perches
2017-11-27 21:33 ` Andrew F. Davis
2017-11-27 21:33 ` Andrew F. Davis
2017-11-27 21:33 ` Andrew F. Davis
2017-11-27 21:45 ` Ladislav Michl
2017-11-27 21:45 ` Ladislav Michl
2017-11-27 21:48 ` SF Markus Elfring
2017-11-27 21:48 ` SF Markus Elfring
2017-11-27 21:48 ` SF Markus Elfring
2017-11-27 21:48 ` SF Markus Elfring
2017-11-28 1:45 ` Joe Perches
2017-11-28 1:45 ` Joe Perches
2017-11-28 1:45 ` Joe Perches
2017-11-28 7:41 ` SF Markus Elfring
2017-11-28 7:41 ` SF Markus Elfring
2017-11-28 7:41 ` SF Markus Elfring
2017-11-28 7:49 ` Julia Lawall
2017-11-28 7:49 ` Julia Lawall
2017-11-28 8:49 ` SF Markus Elfring
2017-11-28 8:49 ` SF Markus Elfring
2017-11-28 9:26 ` Julia Lawall
2017-11-28 9:26 ` Julia Lawall
2017-11-28 9:26 ` Julia Lawall
2017-11-28 9:56 ` SF Markus Elfring
2017-11-28 9:56 ` SF Markus Elfring
2017-11-28 9:56 ` SF Markus Elfring
2017-11-28 8:04 ` Joe Perches
2017-11-28 8:04 ` Joe Perches
2017-11-28 8:49 ` Ladislav Michl
2017-11-28 8:49 ` Ladislav Michl
2017-11-28 9:11 ` SF Markus Elfring
2017-11-28 9:11 ` SF Markus Elfring
2017-11-28 9:11 ` SF Markus Elfring
2017-11-28 9:28 ` Julia Lawall
2017-11-28 9:28 ` Julia Lawall
2017-11-28 9:28 ` Julia Lawall
2017-11-28 10:15 ` SF Markus Elfring
2017-11-28 10:15 ` SF Markus Elfring
2017-11-28 10:23 ` Ladislav Michl
2017-11-28 10:23 ` Ladislav Michl
2017-11-28 10:50 ` SF Markus Elfring
2017-11-28 10:50 ` SF Markus Elfring
2017-11-28 10:50 ` SF Markus Elfring
2017-11-28 11:41 ` Ladislav Michl
2017-11-28 11:41 ` Ladislav Michl
2017-11-28 12:13 ` SF Markus Elfring
2017-11-28 12:13 ` SF Markus Elfring
2017-11-28 12:13 ` SF Markus Elfring
2017-11-28 17:50 ` Ladislav Michl
2017-11-28 17:50 ` Ladislav Michl
2017-11-28 18:09 ` SF Markus Elfring
2017-11-28 18:09 ` SF Markus Elfring
2017-11-28 18:09 ` SF Markus Elfring
2017-11-28 14:36 ` Joe Perches
2017-11-28 14:36 ` Joe Perches
2017-12-03 18:20 ` SF Markus Elfring
2017-12-03 18:20 ` 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=1511809633.32426.70.camel@perches.com \
--to=joe@perches.com \
--cc=afd@ti.com \
--cc=arvind.yadav.cs@gmail.com \
--cc=b.zolnierkie@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=elfring@users.sourceforge.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tomi.valkeinen@ti.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.