From: Nishanth Aravamudan <nacc@us.ibm.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] [PATCH] Removed unreachable code and fixed one compiler
Date: Mon, 28 Aug 2006 17:51:36 +0000 [thread overview]
Message-ID: <20060828175136.GJ5195@us.ibm.com> (raw)
In-Reply-To: <1156784251.4195.7.camel@localhost.localdomain>
On 28.08.2006 [20:49:58 +0300], ville palo wrote:
> On Mon, 2006-08-28 at 10:26 -0700, Nishanth Aravamudan wrote:
> > On 28.08.2006 [19:57:31 +0300], ville palo wrote:
> > >
> > >
> > > There were some unreachable code segments in drivers/cdrom.
> > > This patch removes them and fixes one compiler warning:
> > > "gscd.c:269: warning: unsigned int format, long unsigned int arg"
> >
> > Should be separate patches then. Please read tpp
> > (http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt) and
> > Documentation/SubmittingPatches if you haven't already (reread them, if
> > you have).
>
> Ok, I'll reread them :)
>
> > Perhapse move the xtrace (which is presumably useful) to before the
> > goto?
> >
> > > }
> > >
> > > goto again;
> > > @@ -1710,11 +1707,7 @@ static int mcdx_tray_move(struct cdrom_d
> > > if (!(stuffp->present & DOOR))
> > > return -ENOSYS;
> > >
> > > - if (position) /* 1: eject */
> > > - return mcdx_talk(stuffp, "\xf6", 1, NULL, 1, 5 * HZ, 3);
> > > - else /* 0: close */
> > > - return mcdx_talk(stuffp, "\xf8", 1, NULL, 1, 5 * HZ, 3);
> > > - return 1;
> > > + return mcdx_talk(stuffp, position ? "\xf6" : "\xf8", 1, NULL, 1, 5 * HZ, 3);
> >
> > As mentioned elsewhere the comments are useful. This also doesn't seem
> > to fit into either category of your description and thus should have
> > been in a different patch (Have you (re)read tpp or SubmittingPatches yet?).
>
> I already fixed the comments part but I have to disagree about the
> description part. IMHO this fits in "removed unreachable code"
> category, because 'return 1;' was unreachable.
Only the return 1; removal does. The other is code rearrangement, and
is a distinct (and unnecessary) logical change.
Thanks,
Nish
--
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
next prev parent reply other threads:[~2006-08-28 17:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-28 16:57 [KJ] [PATCH] Removed unreachable code and fixed one compiler warning ville palo
2006-08-28 16:59 ` [KJ] [PATCH] Removed unreachable code and fixed one compiler Benoit Boissinot
2006-08-28 17:26 ` Nishanth Aravamudan
2006-08-28 17:26 ` [KJ] [PATCH] Removed unreachable code and fixed one ville palo
2006-08-28 17:49 ` ville palo
2006-08-28 17:51 ` Nishanth Aravamudan [this message]
2006-08-28 18:00 ` [KJ] [PATCH] Removed unreachable code and fixed one compiler Richard Knutsson
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=20060828175136.GJ5195@us.ibm.com \
--to=nacc@us.ibm.com \
--cc=kernel-janitors@vger.kernel.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 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.