From: Luciano Coelho <luciano.coelho@nokia.com>
To: ext Dan Carpenter <error27@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
"Oikarinen Juuso (Nokia-D/Tampere)" <juuso.oikarinen@nokia.com>,
"Paasikivi Teemu.3 (EXT-Ixonos/Tampere)"
<ext-teemu.3.paasikivi@nokia.com>, Kalle Valo <kalle.valo@iki.fi>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [patch 9/9] wl1271: remove some unneeded code
Date: Tue, 11 May 2010 07:28:03 +0300 [thread overview]
Message-ID: <1273552083.2021.27.camel@powerslave> (raw)
In-Reply-To: <20100508162638.GU27064@bicker>
On Sat, 2010-05-08 at 18:26 +0200, ext Dan Carpenter wrote:
> The goto and the break are equivelent. I removed the goto in memory of
> Edsger Dijkstra who famously hated gotos and who would have been eighty
> years old next Tuesday.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
> index 55aa813..da40cee 100644
> --- a/drivers/net/wireless/wl12xx/wl1271_main.c
> +++ b/drivers/net/wireless/wl12xx/wl1271_main.c
> @@ -1563,8 +1563,6 @@ static int wl1271_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
> default:
> wl1271_error("Unsupported key cmd 0x%x", cmd);
> ret = -EOPNOTSUPP;
> - goto out_sleep;
> -
> break;
> }
We use goto out_* in error cases throughout our code (sorry Edsger!) and
in many cases they are not needed because they're the last check in the
function, but we still use them for consistency.
In this case, there are two "consistency" items conflicting with each
other (ie. the "break" in the last case entry is not needed, but it's
there for consistency). Your change indeed makes the code look cleaner,
so I think the "keep-the-break-in-the-default-case" rule should win
here. ;)
Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
--
Cheers,
Luca.
prev parent reply other threads:[~2010-05-11 4:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-08 16:26 [patch 9/9] wl1271: remove some unneeded code Dan Carpenter
2010-05-11 4:28 ` Luciano Coelho [this message]
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=1273552083.2021.27.camel@powerslave \
--to=luciano.coelho@nokia.com \
--cc=error27@gmail.com \
--cc=ext-teemu.3.paasikivi@nokia.com \
--cc=juuso.oikarinen@nokia.com \
--cc=kalle.valo@iki.fi \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).