From: Phillip Lougher <phillip@lougher.demon.co.uk>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-embedded@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, phillip.lougher@gmail.com,
tim.bird@am.sony.com
Subject: Re: [PATCH 1/9] Squashfs: move zlib decompression wrapper code into a separate file
Date: Tue, 08 Dec 2009 22:20:18 +0000 [thread overview]
Message-ID: <4B1ED122.3040309@lougher.demon.co.uk> (raw)
In-Reply-To: <20091207145705.cd30cae8.akpm@linux-foundation.org>
Andrew Morton wrote:
> On Mon, 07 Dec 2009 02:25:08 +0000
> Phillip Lougher <phillip@lougher.demon.co.uk> wrote:
>
>> +
>> +int zlib_uncompress(struct squashfs_sb_info *msblk, void **buffer,
>> + struct buffer_head **bh, int b, int offset, int length, int srclength,
>> + int pages)
>
> This isn't a very good function name. zlib_uncompress() now becomes a
> kernel-wide identifier, but it's part of squashfs, not part of zlib.
>
> Maybe that gets fixed in a later patch. If so, thwap me.
>
Yes, they get fixed up in [PATCH 3/9] Squashfs: add a decompressor framework.
That patch makes the functions static, and instead exports them via a
suitably named decompressor ops structure.
+const struct squashfs_decompressor squashfs_zlib_comp_ops = {
+ .init = zlib_init,
+ .free = zlib_free,
+ .decompress = zlib_uncompress,
+ .id = ZLIB_COMPRESSION,
+ .name = "zlib",
+ .supported = 1
+};
I split the patches up to make them easier to review. The first two patches
move the zlib code out to a separate file (ready for adding the framework).
The third patch adds the framework. At the time of the second patch, however,
to not break compilation, the functions have to be global. In hindsight
I should have made named the functions squashfs_xxx, and removed the squashfs_
when they were made static in the third patch.
Thanks
Phillip
next prev parent reply other threads:[~2009-12-08 22:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1NHTHg-0001sM-NQ@dylan.lougher.demon.co.uk>
2009-12-07 22:57 ` [PATCH 1/9] Squashfs: move zlib decompression wrapper code into a separate file Andrew Morton
2009-12-08 22:20 ` Phillip Lougher [this message]
2009-12-09 10:00 ` Artem Bityutskiy
2009-12-10 0:38 ` Phillip Lougher
2009-12-10 10:01 ` Geert Uytterhoeven
2009-12-10 21:17 ` Phillip Lougher
2009-12-10 22:20 ` Felix Fietkau
2009-12-10 23:20 ` Phillip Lougher
2009-12-07 8:37 Phillip Lougher
-- strict thread matches above, loose matches on Subject: below --
2009-12-07 8:25 root
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=4B1ED122.3040309@lougher.demon.co.uk \
--to=phillip@lougher.demon.co.uk \
--cc=akpm@linux-foundation.org \
--cc=linux-embedded@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phillip.lougher@gmail.com \
--cc=tim.bird@am.sony.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).