[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAB3wodfARQsBPb2Cw97AmjsTwTXBdeRmsbs+uajt4idhXAf=QA@mail.gmail.com>
Date: Mon, 14 Aug 2017 03:23:28 +0100
From: Phillip Lougher <phillip.lougher@...il.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Nick Terrell <terrelln@...com>,
"Austin S . Hemmelgarn" <ahferroin7@...il.com>,
Herbert Xu <herbert@...dor.apana.org.au>, kernel-team@...com,
Chris Mason <clm@...com>, Yann Collet <cyan@...com>,
Adam Borowski <kilobyte@...band.pl>,
David Sterba <dsterba@...e.cz>,
SquashFS developers <squashfs-devel@...ts.sourceforge.net>,
linux-btrfs <linux-btrfs@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Phillip Lougher <phillip@...ashfs.org.uk>,
Sean Purcell <me@...np.xyz>
Subject: Re: [PATCH v4 4/5] squashfs: Add zstd support
On Sun, Aug 13, 2017 at 9:31 AM, Geert Uytterhoeven
<geert@...ux-m68k.org> wrote:
> On Fri, Aug 4, 2017 at 10:19 PM, Nick Terrell <terrelln@...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@...ux-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
Powered by blists - more mailing lists