Re: [PATCH v6] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-09-29 Thread Sebastian Andrzej Siewior
On 2020-09-29 05:14:31 [+], Song Bao Hua (Barry Song) wrote: > After second thought and trying to make this change, I would like to change > my mind > and disagree with this idea. Two reasons: > 1. while using this_cpu_ptr() without preemption lock, people usually put all > things bound > wit

RE: [PATCH v6] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-09-29 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Sebastian Andrzej Siewior [mailto:bige...@linutronix.de] > Sent: Tuesday, September 29, 2020 10:31 PM > To: Song Bao Hua (Barry Song) > Cc: a...@linux-foundation.org; herb...@gondor.apana.org.au; > da...@davemloft.net; linux-crypto@vger.kernel.org; linux...@k

Re: [PATCH v6] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-09-29 Thread Sebastian Andrzej Siewior
On 2020-09-29 10:02:15 [+], Song Bao Hua (Barry Song) wrote: > > My point was that there will be a warning at run-time and you don't want > > that. There are raw_ accessors if you know what you are doing. But… > > I have only seen get_cpu_ptr/var() things will disable preemption. I don't > th

RE: [PATCH v6] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-09-29 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Sebastian Andrzej Siewior [mailto:bige...@linutronix.de] > Sent: Tuesday, September 29, 2020 11:29 PM > To: Song Bao Hua (Barry Song) > Cc: a...@linux-foundation.org; herb...@gondor.apana.org.au; > da...@davemloft.net; linux-crypto@vger.kernel.org; linux...@k

Re: [PATCH 00/18] use semicolons rather than commas to separate statements

2020-09-29 Thread Julia Lawall
On Tue, 29 Sep 2020, Mark Brown wrote: > On Mon, Sep 28, 2020 at 05:45:24PM -0700, Joe Perches wrote: > > On Mon, 2020-09-28 at 20:35 +0100, Mark Brown wrote: > > > > [1/1] regmap: debugfs: use semicolons rather than commas to separate > > > statements > > > commit: 7f4a122d0b50b40c64d24

Re: [PATCH 00/18] use semicolons rather than commas to separate statements

2020-09-29 Thread Mark Brown
On Mon, Sep 28, 2020 at 05:45:24PM -0700, Joe Perches wrote: > On Mon, 2020-09-28 at 20:35 +0100, Mark Brown wrote: > > [1/1] regmap: debugfs: use semicolons rather than commas to separate > > statements > > commit: 7f4a122d0b50b40c64d24a5cf7aafe26dd9487ee > Rather than replying to the 0/n

Re: [PATCH 00/18] use semicolons rather than commas to separate statements

2020-09-29 Thread Ard Biesheuvel
On Sun, 27 Sep 2020 at 21:56, Julia Lawall wrote: > > These patches replace commas by semicolons. Why? > This was done using the > Coccinelle semantic patch (http://coccinelle.lip6.fr/) shown below. > > This semantic patch ensures that commas inside for loop headers will not be > transformed.

Re: [PATCH 00/18] use semicolons rather than commas to separate statements

2020-09-29 Thread Julia Lawall
On Tue, 29 Sep 2020, Ard Biesheuvel wrote: > On Sun, 27 Sep 2020 at 21:56, Julia Lawall wrote: > > > > These patches replace commas by semicolons. > > > Why? Among the complete 5000 lines of changes there is one probable bug where an if branch ends with a comma and thus pulls the subsequent s

Re: [PATCH 00/18] use semicolons rather than commas to separate statements

2020-09-29 Thread Mark Brown
On Tue, Sep 29, 2020 at 01:46:19PM +0200, Julia Lawall wrote: > On Tue, 29 Sep 2020, Mark Brown wrote: > > Feel free to submit patches to b4. Ideally things like this wouldn't be > > being sent as serieses in the first place, there's no dependencies or > > interactions between the patches. > It

Re: [PATCH 00/18] use semicolons rather than commas to separate statements

2020-09-29 Thread Dan Carpenter
On Tue, Sep 29, 2020 at 02:20:00PM +0200, Ard Biesheuvel wrote: > On Sun, 27 Sep 2020 at 21:56, Julia Lawall wrote: > > > > These patches replace commas by semicolons. > > > Why? > In the best case, these commas are just uninitentional mess, like typing an extra space character or something.

Re: [PATCH 00/18] use semicolons rather than commas to separate statements

2020-09-29 Thread Julia Lawall
On Tue, 29 Sep 2020, Mark Brown wrote: > On Tue, Sep 29, 2020 at 01:46:19PM +0200, Julia Lawall wrote: > > On Tue, 29 Sep 2020, Mark Brown wrote: > > > > Feel free to submit patches to b4. Ideally things like this wouldn't be > > > being sent as serieses in the first place, there's no dependen

Re: [PATCH 00/18] use semicolons rather than commas to separate statements

2020-09-29 Thread Julia Lawall
On Tue, 29 Sep 2020, Dan Carpenter wrote: > On Tue, Sep 29, 2020 at 02:20:00PM +0200, Ard Biesheuvel wrote: > > On Sun, 27 Sep 2020 at 21:56, Julia Lawall wrote: > > > > > > These patches replace commas by semicolons. > > > > > > Why? > > > > In the best case, these commas are just uninitentio

Re: [PATCH 00/18] use semicolons rather than commas to separate statements

2020-09-29 Thread Joe Perches
On Tue, 2020-09-29 at 14:47 +0200, Julia Lawall wrote: > On Tue, 29 Sep 2020, Dan Carpenter wrote: > > The times where commas are used deliberately to replace curly braces are > > just evil. Either way the code is cleaner with semi-colons. > > I also found exaamples like the following to be parti

[PATCH][next] crypto: sun8i-ss@: fix memory leak on pointer d

2020-09-29 Thread Colin King
From: Colin Ian King Currently the error return path on a failed dma_mapping_error call is not kfree'ing memory allocated to d. Add an extra error exit label to end of the function where the kfree and return occurs to fix this issue. Addresses-Coverity: ("Resource leak") Fixes: ac2614d721de ("cr

Re: [PATCH 00/18] use semicolons rather than commas to separate statements

2020-09-29 Thread Julia Lawall
On Tue, 29 Sep 2020, Joe Perches wrote: > On Tue, 2020-09-29 at 14:47 +0200, Julia Lawall wrote: > > On Tue, 29 Sep 2020, Dan Carpenter wrote: > > > The times where commas are used deliberately to replace curly braces are > > > just evil. Either way the code is cleaner with semi-colons. > > >

Re: [PATCH 00/18] use semicolons rather than commas to separate statements

2020-09-29 Thread Shuah Khan
On 9/29/20 7:34 AM, Joe Perches wrote: On Tue, 2020-09-29 at 14:47 +0200, Julia Lawall wrote: On Tue, 29 Sep 2020, Dan Carpenter wrote: The times where commas are used deliberately to replace curly braces are just evil. Either way the code is cleaner with semi-colons. I also found exaamples

Re: [PATCH 1/2] dt-bindings: crypto: update ccree optional params

2020-09-29 Thread Gilad Ben-Yossef
Hןת On Wed, Sep 23, 2020 at 4:57 AM Rob Herring wrote: > > On Wed, Sep 16, 2020 at 10:19:49AM +0300, Gilad Ben-Yossef wrote: > > Document ccree driver supporting new optional parameters allowing to > > customize the DMA transactions cache parameters and ACE bus sharability > > properties. > > > >

[PATCH v4 0/9] Update to zstd-1.4.6

2020-09-29 Thread Nick Terrell
From: Nick Terrell This patchset upgrades the zstd library to the latest upstream release. The current zstd version in the kernel is a modified version of upstream zstd-1.3.1. At the time it was integrated, zstd wasn't ready to be used in the kernel as-is. But, it is now possible to use upstream

[PATCH v4 1/9] lib: zstd: Add zstd compatibility wrapper

2020-09-29 Thread Nick Terrell
From: Nick Terrell Adds zstd_compat.h which provides the necessary functions from the current zstd.h API. It is only active for zstd versions 1.4.6 and newer. That means it is disabled currently, but will become active when a later patch in this series updates the zstd library in the kernel to 1.

[PATCH v4 4/9] crypto: zstd: Switch to zstd-1.4.6 API

2020-09-29 Thread Nick Terrell
From: Nick Terrell Move away from the compatibility wrapper to the zstd-1.4.6 API. This code is functionally equivalent. Signed-off-by: Nick Terrell --- crypto/zstd.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/crypto/zstd.c b/crypto/zstd.c in

[PATCH v4 2/9] lib: zstd: Add decompress_sources.h for decompress_unzstd

2020-09-29 Thread Nick Terrell
From: Nick Terrell Adds decompress_sources.h which includes every .c file necessary for zstd decompression. This is used in decompress_unzstd.c so the internal structure of the library isn't exposed. This allows us to upgrade the zstd library version without modifying any callers. Instead we jus

[PATCH v4 5/9] btrfs: zstd: Switch to the zstd-1.4.6 API

2020-09-29 Thread Nick Terrell
From: Nick Terrell Move away from the compatibility wrapper to the zstd-1.4.6 API. This code is functionally equivalent. Signed-off-by: Nick Terrell --- fs/btrfs/zstd.c | 48 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/fs/btr

[PATCH v4 6/9] f2fs: zstd: Switch to the zstd-1.4.6 API

2020-09-29 Thread Nick Terrell
From: Nick Terrell Move away from the compatibility wrapper to the zstd-1.4.6 API. This code is more efficient because it uses the single-pass API instead of the streaming API. The streaming API is not necessary because the whole input and output buffers are available. This saves memory because w

[PATCH v4 7/9] squashfs: zstd: Switch to the zstd-1.4.6 API

2020-09-29 Thread Nick Terrell
From: Nick Terrell Move away from the compatibility wrapper to the zstd-1.4.6 API. This code is functionally equivalent. Signed-off-by: Nick Terrell --- fs/squashfs/zstd_wrapper.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/squashfs/zstd_wrapper.c b/fs/squas

[PATCH v4 8/9] lib: unzstd: Switch to the zstd-1.4.6 API

2020-09-29 Thread Nick Terrell
From: Nick Terrell Move away from the compatibility wrapper to the zstd-1.4.6 API. This code is functionally equivalent. Signed-off-by: Nick Terrell --- lib/decompress_unzstd.c | 40 ++-- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/lib/de

[PATCH v4 9/9] lib: zstd: Remove zstd compatibility wrapper

2020-09-29 Thread Nick Terrell
From: Nick Terrell All callers have been transitioned to the new zstd-1.4.6 API. There are no more callers of the zstd compatibility wrapper, so delete it. Signed-off-by: Nick Terrell --- include/linux/zstd_compat.h | 116 1 file changed, 116 deletions(-)

Re: [PATCH v4 0/9] Update to zstd-1.4.6

2020-09-29 Thread Christoph Hellwig
As you keep resend this I keep retelling you that should not do it. Please provide a proper Linux API, and switch to that. Versioned APIs have absolutely no business in the Linux kernel. On Tue, Sep 29, 2020 at 11:53:09PM -0700, Nick Terrell wrote: > From: Nick Terrell > > This patchset upgrade