From: Dan Carpenter <dan.carpenter@oracle.com>
To: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: Marcos Souza <marcos.souza.org@gmail.com>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
kernel-janitors@vger.kernel.org, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 7/8] drivers/media/platform/davinci/vpbe.c: Removes useless kfree()
Date: Wed, 12 Sep 2012 17:25:54 +0000 [thread overview]
Message-ID: <20120912172554.GH19396@mwanda> (raw)
In-Reply-To: <CA+MoWDquDi6+kY9z3rj79dJK6j5tSWO9oWHCkvt6J-XBB=HNvA@mail.gmail.com>
On Wed, Sep 12, 2012 at 05:50:54PM +0200, Peter Senna Tschudin wrote:
> Marcos,
>
> > Now that you removed this kfree, you could remove this label too. Very
> > nice your cleanup :)
> Thanks!
>
> >
> >> vpbe_fail_sd_register:
> >> kfree(vpbe_dev->encoders);
> >> vpbe_fail_v4l2_device:
>
> The problem removing the label is that it will require some more work
> naming the labels. See:
> if (!vpbe_dev->amp) {
> ...
> goto vpbe_fail_amp_register;
>
> If I just remove the label vpbe_fail_amp_register, the label names
> will not make sense any more as the next label is
> vpbe_fail_sd_register. So I will need to change the name to something
> different or rename all labels to out1, out2, out3 or err1, err2,
> err3, or ....
>
> Any suggestions?
Labal names should not be numbers because this is not GW-BASIC. The
label should reflect what happens on the next line. Labeling the
place after the goto location where you started from is always
nonsense.
regards,
dan carpenter
prev parent reply other threads:[~2012-09-12 17:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-12 12:55 [PATCH v2 7/8] drivers/media/platform/davinci/vpbe.c: Removes useless kfree() Peter Senna Tschudin
2012-09-12 13:34 ` Marcos Souza
2012-09-12 15:50 ` Peter Senna Tschudin
2012-09-12 16:10 ` Marcos Souza
2012-09-12 17:25 ` Dan Carpenter [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=20120912172554.GH19396@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=marcos.souza.org@gmail.com \
--cc=mchehab@infradead.org \
--cc=peter.senna@gmail.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