All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: Jan Beulich <jbeulich@suse.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Ian Jackson <iwj@xenproject.org>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>
Subject: Re: [PATCH 1/7] xz: add fall-through comments to a switch statement
Date: Thu, 25 Nov 2021 16:54:07 +0000	[thread overview]
Message-ID: <b28ec75a-f5e5-cd3d-12b5-20338c7c88e0@xen.org> (raw)
In-Reply-To: <a36df6b5-9f55-a199-e8d3-3f6cd58a054d@xen.org>



On 25/11/2021 16:49, Julien Grall wrote:
> On 19/11/2021 10:21, Jan Beulich wrote:
>> From: Lasse Collin <lasse.collin@tukaani.org>
>>
>> It's good style. I was also told that GCC 7 is more strict and might
>> give a warning when such comments are missing.
>>
>> Suggested-by: Andrei Borzenkov <arvidjaar@gmail.com>
>> Signed-off-by: Lasse Collin <lasse.collin@tukaani.org>

Actually, any reason why there are some signed-off-by missing?

>> [Linux commit: 5a244f48ecbbd03a11eb84819c5c599db81823ee]
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> Acked-by: Julien Grall <jgrall@amazon.com>
> 
> Cheers,
> 
>> ---
>> Linux has meanwhile further moved to using the "fallthrough" pseudo-
>> keyword, but us doing so requires the tool stack to first make this
>> available for use in at least stubdom builds.
>>
>> --- a/xen/common/xz/dec_stream.c
>> +++ b/xen/common/xz/dec_stream.c
>> @@ -583,6 +583,8 @@ static enum xz_ret __init dec_main(struc
>>               if (ret != XZ_OK)
>>                   return ret;
>> +        /* Fall through */
>> +
>>           case SEQ_BLOCK_START:
>>               /* We need one byte of input to continue. */
>>               if (b->in_pos == b->in_size)
>> @@ -606,6 +608,8 @@ static enum xz_ret __init dec_main(struc
>>               s->temp.pos = 0;
>>               s->sequence = SEQ_BLOCK_HEADER;
>> +        /* Fall through */
>> +
>>           case SEQ_BLOCK_HEADER:
>>               if (!fill_temp(s, b))
>>                   return XZ_OK;
>> @@ -616,6 +620,8 @@ static enum xz_ret __init dec_main(struc
>>               s->sequence = SEQ_BLOCK_UNCOMPRESS;
>> +        /* Fall through */
>> +
>>           case SEQ_BLOCK_UNCOMPRESS:
>>               ret = dec_block(s, b);
>>               if (ret != XZ_STREAM_END)
>> @@ -623,6 +629,8 @@ static enum xz_ret __init dec_main(struc
>>               s->sequence = SEQ_BLOCK_PADDING;
>> +        /* Fall through */
>> +
>>           case SEQ_BLOCK_PADDING:
>>               /*
>>                * Size of Compressed Data + Block Padding
>> @@ -643,6 +651,8 @@ static enum xz_ret __init dec_main(struc
>>               s->sequence = SEQ_BLOCK_CHECK;
>> +        /* Fall through */
>> +
>>           case SEQ_BLOCK_CHECK:
>>               if (s->check_type == XZ_CHECK_CRC32) {
>>                   ret = crc32_validate(s, b);
>> @@ -665,6 +675,8 @@ static enum xz_ret __init dec_main(struc
>>               s->sequence = SEQ_INDEX_PADDING;
>> +        /* Fall through */
>> +
>>           case SEQ_INDEX_PADDING:
>>               while ((s->index.size + (b->in_pos - s->in_start))
>>                       & 3) {
>> @@ -687,6 +699,8 @@ static enum xz_ret __init dec_main(struc
>>               s->sequence = SEQ_INDEX_CRC32;
>> +        /* Fall through */
>> +
>>           case SEQ_INDEX_CRC32:
>>               ret = crc32_validate(s, b);
>>               if (ret != XZ_STREAM_END)
>> @@ -695,6 +709,8 @@ static enum xz_ret __init dec_main(struc
>>               s->temp.size = STREAM_HEADER_SIZE;
>>               s->sequence = SEQ_STREAM_FOOTER;
>> +        /* Fall through */
>> +
>>           case SEQ_STREAM_FOOTER:
>>               if (!fill_temp(s, b))
>>                   return XZ_OK;
>>
> 

-- 
Julien Grall


  reply	other threads:[~2021-11-25 16:54 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19 10:20 [PATCH 0/7] (mainly) xz imports from Linux Jan Beulich
2021-11-19 10:21 ` [PATCH 1/7] xz: add fall-through comments to a switch statement Jan Beulich
2021-11-25 16:49   ` Julien Grall
2021-11-25 16:54     ` Julien Grall [this message]
2021-11-25 17:03       ` Jan Beulich
2021-11-25 17:13         ` Julien Grall
2021-11-26  7:37           ` Jan Beulich
2021-11-26  9:03             ` Julien Grall
2021-11-26  9:12               ` Jan Beulich
2021-11-26 10:04                 ` Julien Grall
2021-11-26 11:52                   ` Jan Beulich
2021-11-26 12:52                     ` Ian Jackson
2021-12-06 13:44                       ` Jan Beulich
2021-12-06 14:28                         ` Julien Grall
2021-12-06 15:06                           ` Jan Beulich
2021-12-06 16:06                             ` Julien Grall
2021-12-06 16:12                               ` Jan Beulich
2021-12-06 16:21                                 ` Julien Grall
2021-12-06 16:24                                   ` Jan Beulich
2021-12-06 16:30                                     ` Julien Grall
2021-12-06 16:45                                   ` Ian Jackson
2021-12-07  8:55                                     ` Jan Beulich
2021-12-07  9:11                                   ` Jan Beulich
2021-12-07  9:59                                     ` Julien Grall
2021-12-07 10:19                                       ` Jan Beulich
2021-12-07 12:00                                         ` Ian Jackson
2021-12-07 13:30                                           ` Jan Beulich
2021-11-19 10:21 ` [PATCH 2/7] xz: fix XZ_DYNALLOC to avoid useless memory reallocations Jan Beulich
2021-11-25 16:55   ` Julien Grall
2021-11-19 10:21 ` [PATCH 3/7] decompressors: fix spelling mistakes Jan Beulich
2021-11-25 16:57   ` Julien Grall
2021-11-19 10:22 ` [PATCH 4/7] xz: avoid overlapping memcpy() with invalid input with in-place decompression Jan Beulich
2021-11-19 10:22 ` [PATCH 5/7] xz: fix spelling in comments Jan Beulich
2021-11-19 10:23 ` [PATCH 6/7] xz: move s->lzma.len = 0 initialization to lzma_reset() Jan Beulich
2021-11-19 10:23 ` [PATCH 7/7] xz: validate the value before assigning it to an enum variable Jan Beulich
2021-11-19 14:25 ` [PATCH 0/7] (mainly) xz imports from Linux Ian Jackson
2021-11-22  7:10   ` Jan Beulich
2021-12-03 15:35 ` Luca Fancellu

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=b28ec75a-f5e5-cd3d-12b5-20338c7c88e0@xen.org \
    --to=julien@xen.org \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=jbeulich@suse.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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.