Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1494762 > unrolled thread
| Started by | Stefan Hajnoczi <stefanha@gmail.com> |
|---|---|
| First post | 2016-10-03 11:10 +0200 |
| Last post | 2016-10-03 14:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 4/4] virtio_blk: Rename a jump label in virtblk_get_id() Stefan Hajnoczi <stefanha@gmail.com> - 2016-10-03 11:10 +0200
Re: virtio_blk: Rename a jump label in virtblk_get_id() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-03 14:20 +0200
| From | Stefan Hajnoczi <stefanha@gmail.com> |
|---|---|
| Date | 2016-10-03 11:10 +0200 |
| Subject | Re: [PATCH 4/4] virtio_blk: Rename a jump label in virtblk_get_id() |
| Message-ID | <so7q2-2Wv-23@gated-at.bofh.it> |
On Tue, Sep 13, 2016 at 1:15 PM, SF Markus Elfring <elfring@users.sourceforge.net> wrote: > From: Markus Elfring <elfring@users.sourceforge.net> > Date: Tue, 13 Sep 2016 13:50:56 +0200 > > Adjust a jump label according to the current Linux coding style convention. I think you mean "goto label". "Jump label" has a different meaning, see <linux/jump_label.h>. > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> > --- > drivers/block/virtio_blk.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index 696f452..fef2bd0 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -247,10 +247,10 @@ static int virtblk_get_id(struct gendisk *disk, char *id_str) > > err = blk_rq_map_kern(q, req, id_str, VIRTIO_BLK_ID_BYTES, GFP_KERNEL); > if (err) > - goto out; > + goto put_request; > > err = blk_execute_rq(vblk->disk->queue, vblk->disk, req, false); > -out: > + put_request: I checked Documentation/CodingStyle and see no reason to rename the label. It's also not clear why you added a space. The CodingStyle example does not use a space before the label.
[toc] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-10-03 14:20 +0200 |
| Subject | Re: virtio_blk: Rename a jump label in virtblk_get_id() |
| Message-ID | <soanT-4OL-1@gated-at.bofh.it> |
| In reply to | #1494762 |
>> Adjust a jump label according to the current Linux coding style convention. > > I think you mean "goto label". "Jump label" has a different meaning, > see <linux/jump_label.h>. Does a "goto" statement jump to the code position finally which is specified by the label? >> @@ -247,10 +247,10 @@ static int virtblk_get_id(struct gendisk *disk, char *id_str) >> >> err = blk_rq_map_kern(q, req, id_str, VIRTIO_BLK_ID_BYTES, GFP_KERNEL); >> if (err) >> - goto out; >> + goto put_request; >> >> err = blk_execute_rq(vblk->disk->queue, vblk->disk, req, false); >> -out: >> + put_request: > > I checked Documentation/CodingStyle and see no reason to rename the label. Can the suggested longer identifier explain better the "what" and "why" for this software situation? > It's also not clear why you added a space. The CodingStyle example > does not use a space before the label. Do you find information from a commit like "docs: Remove space-before-label guidance from CodingStyle" (from 2016-09-21) interesting? ;-) https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/Documentation/CodingStyle?id=79c70c304b0b443429b2a0019518532c5162817a Regards, Markus
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web