From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: <20160408165051.GB16346@kroah.com> References: <1460129004-2011-1-git-send-email-rsalvaterra@gmail.com> <20160408165051.GB16346@kroah.com> Date: Fri, 8 Apr 2016 20:51:17 +0100 Message-ID: Subject: Re: [PATCH] lib: lz4: fixed zram with lz4 on big endian machines From: Rui Salvaterra To: Greg KH Cc: Chanho Min , Sergey Senozhatsky , eunb.song@samsung.com, linux-kernel@vger.kernel.org, kyungsik.lee@lge.com, stable@vger.kernel.org, minchan@kernel.org, sergey.senozhatsky@gmail.com, linux-mm@kvack.org Content-Type: multipart/alternative; boundary=001a11c36bdcafa988052ffe84d4 Sender: owner-linux-mm@kvack.org List-ID: --001a11c36bdcafa988052ffe84d4 Content-Type: text/plain; charset=UTF-8 On 8 Apr 2016 17:50, "Greg KH" wrote: > > On Fri, Apr 08, 2016 at 04:23:24PM +0100, Rui Salvaterra wrote: > > Based on Sergey's test patch [1], this fixes zram with lz4 compression on big endian cpus. Tested on ppc64 with no regression on x86_64. > > Please wrap your text at 72 columns in a changelog comment. > > > > > [1] http://marc.info/?l=linux-kernel&m=145994470805853&w=4 > > > > Cc: stable@vger.kernel.org > > Signed-off-by: Rui Salvaterra > > Please attribute Sergey here in the signed-off-by area with a > "Suggested-by:" type mark > > > --- > > lib/lz4/lz4defs.h | 29 +++++++++++++++-------------- > > 1 file changed, 15 insertions(+), 14 deletions(-) > > > > diff --git a/lib/lz4/lz4defs.h b/lib/lz4/lz4defs.h > > index abcecdc..a98c08c 100644 > > --- a/lib/lz4/lz4defs.h > > +++ b/lib/lz4/lz4defs.h > > @@ -11,8 +11,7 @@ > > /* > > * Detects 64 bits mode > > */ > > -#if (defined(__x86_64__) || defined(__x86_64) || defined(__amd64__) \ > > - || defined(__ppc64__) || defined(__LP64__)) > > +#if defined(CONFIG_64BIT) > > This patch seems to do two different things, clean up the #if tests, and > change the endian of some calls. Can you break this up into 2 different > patches? > > thanks, > > greg k-h Hi Greg, Thanks for the review (and patience). The 64-bit #if test is actually part of the fix, since __ppc64__ isn't defined anywhere and we'd fall into the 32-bit definitions for ppc64. I can send the other one separately, for sure. I'll do a v2 tomorrow. Thanks, Rui --001a11c36bdcafa988052ffe84d4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On 8 Apr 2016 17:50, "Greg KH" <gregkh@linuxfoundation.org> wrote:
>
> On Fri, Apr 08, 2016 at 04:23:24PM +0100, Rui Salvaterra wrote:
> > Based on Sergey's test patch [1], this fixes zram with lz4 co= mpression on big endian cpus. Tested on ppc64 with no regression on x86_64.=
>
> Please wrap your text at 72 columns in a changelog comment.
>
> >
> > [1] http://marc.info/?l=3Dlinux-kernel&m=3D145994470805= 853&w=3D4
> >
> > Cc: stable@vger.kernel.= org
> > Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
>
> Please attribute Sergey here in the signed-off-by area with a
> "Suggested-by:" type mark
>
> > ---
> >=C2=A0 lib/lz4/lz4defs.h | 29 +++++++++++++++--------------
> >=C2=A0 1 file changed, 15 insertions(+), 14 deletions(-)
> >
> > diff --git a/lib/lz4/lz4defs.h b/lib/lz4/lz4defs.h
> > index abcecdc..a98c08c 100644
> > --- a/lib/lz4/lz4defs.h
> > +++ b/lib/lz4/lz4defs.h
> > @@ -11,8 +11,7 @@
> >=C2=A0 /*
> >=C2=A0 =C2=A0* Detects 64 bits mode
> >=C2=A0 =C2=A0*/
> > -#if (defined(__x86_64__) || defined(__x86_64) || defined(__amd64= __) \
> > -=C2=A0 =C2=A0 =C2=A0|| defined(__ppc64__) || defined(__LP64__))<= br> > > +#if defined(CONFIG_64BIT)
>
> This patch seems to do two different things, clean up the #if tests, a= nd
> change the endian of some calls.=C2=A0 Can you break this up into 2 di= fferent
> patches?
>
> thanks,
>
> greg k-h

Hi Greg,

Thanks for the review (and patience). The 64-bit #if test is= actually part of the fix, since __ppc64__ isn't defined anywhere and w= e'd fall into the 32-bit definitions for ppc64. I can send the other on= e separately, for sure. I'll do a v2 tomorrow.

Thanks,

Rui

--001a11c36bdcafa988052ffe84d4-- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org