Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1710450 > unrolled thread

Re: [PATCH v4 4/5] squashfs: Add zstd support

Started byGeert Uytterhoeven <geert@linux-m68k.org>
First post2017-08-13 10:40 +0200
Last post2017-08-14 04:30 +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.


Contents

  Re: [PATCH v4 4/5] squashfs: Add zstd support Geert Uytterhoeven <geert@linux-m68k.org> - 2017-08-13 10:40 +0200
    Re: [PATCH v4 4/5] squashfs: Add zstd support Phillip Lougher <phillip.lougher@gmail.com> - 2017-08-14 04:30 +0200

#1710450 — Re: [PATCH v4 4/5] squashfs: Add zstd support

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2017-08-13 10:40 +0200
SubjectRe: [PATCH v4 4/5] squashfs: Add zstd support
Message-ID<udWBb-4Qg-3@gated-at.bofh.it>
On Fri, Aug 4, 2017 at 10:19 PM, Nick Terrell <terrelln@fb.com> wrote:
> --- a/fs/squashfs/decompressor.c
> +++ b/fs/squashfs/decompressor.c
> @@ -65,6 +65,12 @@ static const struct squashfs_decompressor squashfs_zlib_comp_ops = {
>  };
>  #endif
>
> +#ifndef CONFIG_SQUASHFS_ZSTD
> +static const struct squashfs_decompressor squashfs_zstd_comp_ops = {
> +       NULL, NULL, NULL, NULL, ZSTD_COMPRESSION, "zstd", 0

Can you please use designated initializers?

> +};
> +#endif
> +
>  static const struct squashfs_decompressor squashfs_unknown_comp_ops = {
>         NULL, NULL, NULL, NULL, 0, "unknown", 0
> ;

> +const struct squashfs_decompressor squashfs_zstd_comp_ops = {
> +       .init = zstd_init,
> +       .free = zstd_free,
> +       .decompress = zstd_uncompress,
> +       .id = ZSTD_COMPRESSION,
> +       .name = "zstd",
> +       .supported = 1
> +};

... like you did here.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

[toc] | [next] | [standalone]


#1710612

FromPhillip Lougher <phillip.lougher@gmail.com>
Date2017-08-14 04:30 +0200
Message-ID<uediG-6Mg-7@gated-at.bofh.it>
In reply to#1710450
On Sun, Aug 13, 2017 at 9:31 AM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> On Fri, Aug 4, 2017 at 10:19 PM, Nick Terrell <terrelln@fb.com> wrote:
>> --- a/fs/squashfs/decompressor.c
>> +++ b/fs/squashfs/decompressor.c
>> @@ -65,6 +65,12 @@ static const struct squashfs_decompressor squashfs_zlib_comp_ops = {
>>  };
>>  #endif
>>
>> +#ifndef CONFIG_SQUASHFS_ZSTD
>> +static const struct squashfs_decompressor squashfs_zstd_comp_ops = {
>> +       NULL, NULL, NULL, NULL, ZSTD_COMPRESSION, "zstd", 0
>
> Can you please use designated initializers?

I prefer it as it is.  It matches the coding style that I used in the
rest of that file to declare the "unsupported" compressor entries (if
this patch uses a different style it would look odd).    There's no
pointers to functions being assigned here, and it makes it a short and
concise one-line.

Phillip

>
>> +};
>> +#endif
>> +
>>  static const struct squashfs_decompressor squashfs_unknown_comp_ops = {
>>         NULL, NULL, NULL, NULL, 0, "unknown", 0
>> ;
>
>> +const struct squashfs_decompressor squashfs_zstd_comp_ops = {
>> +       .init = zstd_init,
>> +       .free = zstd_free,
>> +       .decompress = zstd_uncompress,
>> +       .id = ZSTD_COMPRESSION,
>> +       .name = "zstd",
>> +       .supported = 1
>> +};
>
> ... like you did here.
>
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web