From: Dan Carpenter <dan.carpenter@oracle.com>
To: ander.conselvan.de.oliveira@intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: drm/i915: Copy the staged connector config to the legacy atomic state
Date: Mon, 30 Mar 2015 15:02:59 +0300 [thread overview]
Message-ID: <20150330120259.GS16501@mwanda> (raw)
In-Reply-To: <20150330105040.GA7970@boom>
This is a typical "one err bug" which is a kind of bug where there is
just one err: label which does all the error handling. One err bugs are
one of the most common class of bugs in the kernel. "Oh, we didn't
initialize that struct member" or "That pointer is NULL."
In networking they have resisted patches to add sanity checks to
free_netdev() so that people can't do one err style error handling. You
always have to know if the dev is allocated or not.
Having one error label makes sense if the label is "unlock:" but labels
like fail:, err:, out:, or bail are not very good label names.
The disadvantage of having multiple returns is that it means you can't
have a debug statement, but debug statements are mostly a waste of RAM
and we can use ftrace for that.
regards,
dan carpenter
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-03-30 12:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-27 14:36 drm/i915: Copy the staged connector config to the legacy atomic state Dan Carpenter
2015-03-30 7:59 ` Ander Conselvan De Oliveira
2015-03-30 10:50 ` David Weinehall
2015-03-30 11:03 ` Ander Conselvan De Oliveira
2015-03-30 12:02 ` Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-03-27 13:15 Dan Carpenter
2015-03-27 13:35 ` Ander Conselvan De Oliveira
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=20150330120259.GS16501@mwanda \
--to=dan.carpenter@oracle.com \
--cc=ander.conselvan.de.oliveira@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox