From: "Nitin Gupta" <nitingupta910@gmail.com>
To: "Jan Engelhardt" <jengelh@linux01.gwdg.de>
Cc: lkml <linux-kernel@vger.kernel.org>,
linux-mm-cc@laptop.org,
linuxcompressed-devel@lists.sourceforge.net,
"Andrew Morton" <akpm@linux-foundation.org>,
"Daniel Hazelton" <dhazelton@enter.net>,
"Richard Purdie" <richard@openedhand.com>,
"Bret Towe" <magnade@gmail.com>,
"Satyam Sharma" <satyam.sharma@gmail.com>
Subject: Re: [RFC] LZO de/compression support - take 6
Date: Wed, 30 May 2007 16:17:54 +0530 [thread overview]
Message-ID: <4cefeab80705300347gc618151we40a0cd34e6460ff@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0705301028190.11140@yvahk01.tjqt.qr>
On 5/30/07, Jan Engelhardt <jengelh@linux01.gwdg.de> wrote:
>
> On May 30 2007 11:24, Nitin Gupta wrote:
> >>
> >> It is the bytestream (ip) that is reinterpreted as uint16_t.
> >> And I really doubt that the LZO author has a big-endian machine,
> >> given the days of ubiquitous x86.
> >
> >> le16_to_cpu it is.
> >
> > But then why you think it should be
> > le_16_cpu() -- how will this make any difference?
>
> Like I said, we are reinterpreting the byte stream as a uint16_t
> (= reading from bytestream to CPU). While writing out an uint16_t
> as a bytestream is cpu_to_le16.
>
I didn't properly understand this. But you seem to be correct - now I
ran sparse check:
* using cpu_to_le16()
lib/lzo1x/lzo1x_decompress.c:141:35: error: incompatible types for
operation (>>)
lib/lzo1x/lzo1x_decompress.c:141:35: left side has type restricted
unsigned short [usertype] [force] <noident>
lib/lzo1x/lzo1x_decompress.c:141:35: right side has type int
lib/lzo1x/lzo1x_decompress.c:140:20: error: incompatible types for operation (-)
lib/lzo1x/lzo1x_decompress.c:140:20: left side has type unsigned
char *register [assigned] op
lib/lzo1x/lzo1x_decompress.c:140:20: right side has type bad type
lib/lzo1x/lzo1x_decompress.c:157:35: error: incompatible types for
operation (>>)
lib/lzo1x/lzo1x_decompress.c:157:35: left side has type restricted
unsigned short [usertype] [force] <noident>
lib/lzo1x/lzo1x_decompress.c:157:35: right side has type int
lib/lzo1x/lzo1x_decompress.c:156:11: error: incompatible types for
operation (-=)
* using le16_to_cpu()
lib/lzo1x/lzo1x_decompress.c:140:23: warning: cast to restricted type
lib/lzo1x/lzo1x_decompress.c:156:14: warning: cast to restricted type
But still, how do I get rid of these two warnings? or, do these
warning suggest some real problem that still exist in code?
- Nitin
> > For your ref (from big_endian.h):
> > # define __cpu_to_le16(x) ((__force __le16)__swab16((x)))
> > # define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
>
>
> Jan
> --
>
next prev parent reply other threads:[~2007-05-30 10:48 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-28 14:34 Nitin Gupta
2007-05-28 14:40 ` Nitin Gupta
2007-05-28 14:49 ` Daniel Hazelton
2007-05-28 15:06 ` Nitin Gupta
2007-05-28 15:43 ` Adrian Bunk
2007-05-28 16:03 ` Nitin Gupta
2007-05-28 17:11 ` Adrian Bunk
2007-05-28 19:59 ` Daniel Hazelton
2007-05-28 20:18 ` Daniel Hazelton
2007-05-28 20:52 ` Daniel Hazelton
2007-05-29 5:55 ` Nitin Gupta
2007-05-29 8:08 ` Michael-Luke Jones
2007-05-29 11:40 ` Adrian Bunk
2007-05-29 12:03 ` Nitin Gupta
2007-05-29 13:13 ` Daniel Hazelton
2007-05-29 21:10 ` Jan Engelhardt
2007-05-29 21:26 ` Adrian Bunk
2007-05-30 5:31 ` Nitin Gupta
2007-05-30 13:56 ` Johannes Stezenbach
2007-05-30 14:24 ` Satyam Sharma
2007-05-28 15:30 ` Adrian Bunk
2007-05-28 15:47 ` Nitin Gupta
2007-05-28 15:55 ` Daniel Hazelton
2007-05-28 17:01 ` Adrian Bunk
2007-05-28 19:51 ` Daniel Hazelton
2007-05-28 15:49 ` Daniel Hazelton
2007-05-28 22:57 ` Bret Towe
2007-05-29 5:48 ` Nitin Gupta
2007-05-29 13:09 ` Daniel Hazelton
2007-05-28 22:53 ` Bret Towe
2007-05-28 22:58 ` Bret Towe
2007-05-29 5:58 ` Nitin Gupta
2007-05-29 20:14 ` Daniel Hazelton
2007-05-29 20:33 ` Daniel Hazelton
2007-05-29 21:48 ` Daniel Hazelton
2007-05-29 23:32 ` Daniel Hazelton
2007-05-30 5:19 ` Nitin Gupta
2007-05-29 8:17 ` Makefile question (was [RFC] LZO de/compression support - take 6) Michael-Luke Jones
2007-05-29 10:41 ` Satyam Sharma
2007-05-29 10:51 ` Michael-Luke Jones
2007-05-29 11:27 ` Satyam Sharma
2007-05-29 13:33 ` JFFS2 using 'private' zlib header " Michael-Luke Jones
2007-05-29 13:43 ` Daniel Hazelton
2007-05-29 15:15 ` Satyam Sharma
2007-05-29 16:20 ` Daniel Hazelton
2007-05-30 5:31 ` Mark Adler
2007-05-30 13:05 ` Daniel Hazelton
2007-05-30 13:30 ` Satyam Sharma
2007-05-30 23:02 ` Mark Adler
2007-05-30 23:26 ` Daniel Hazelton
2007-06-01 3:06 ` Daniel Hazelton
2007-06-01 17:24 ` Satyam Sharma
2007-05-30 13:41 ` Artem Bityutskiy
2007-05-30 15:46 ` Artem Bityutskiy
2007-05-30 16:12 ` Satyam Sharma
2007-05-30 16:43 ` Artem Bityutskiy
2007-05-29 20:48 ` [RFC] LZO de/compression support - take 6 Jan Engelhardt
2007-05-30 5:54 ` Nitin Gupta
2007-05-30 8:31 ` Jan Engelhardt
2007-05-30 10:47 ` Nitin Gupta [this message]
2007-05-31 12:34 ` Nitin Gupta
2007-05-31 18:21 ` Satyam Sharma
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=4cefeab80705300347gc618151we40a0cd34e6460ff@mail.gmail.com \
--to=nitingupta910@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dhazelton@enter.net \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm-cc@laptop.org \
--cc=linuxcompressed-devel@lists.sourceforge.net \
--cc=magnade@gmail.com \
--cc=richard@openedhand.com \
--cc=satyam.sharma@gmail.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
Powered by JetHome