[PATCH v2] sh: dma: Add missing IS_ERR_OR_NULL test

2019-06-12 Thread Rolf Evers-Fischer
get_dma_channel may return ERR_PTR or NULL, so a check is added. Changes since v1: - Removed unnecessary parentheses - Replaced IS_ERR with IS_ERR_OR_NULL Signed-off-by: Rolf Evers-Fischer --- arch/sh/drivers/dma/dma-api.c | 20 +++- arch/sh/drivers/dma/dma-sysfs.c | 2

Re: [PATCH] sh: dma: Add missing IS_ERR test

2019-06-11 Thread Rolf Evers-Fischer
On Sat, 8 Jun 2019, Geert Uytterhoeven wrote: Hi Geert, thank you for your reply and your additional findings. > Hi Rolf, > > Thanks for your patch! > > On Fri, Jun 7, 2019 at 2:04 PM Rolf Evers-Fischer > wrote: > > get_dma_channel may return ERR_PTR, so a check is

Re: [PATCH] sh: dma: Add missing IS_ERR test

2019-06-11 Thread Rolf Evers-Fischer
Hello Sergei, thanks for your feedback. On Sat, 8 Jun 2019, Sergei Shtylyov wrote: > Hello! > > On 07.06.2019 14:54, Rolf Evers-Fischer wrote: > > > get_dma_channel may return ERR_PTR, so a check is added. > > > > Signed-off-by: Rolf Evers-Fischer > > ---

[PATCH] sh: dma: Add missing IS_ERR test

2019-06-07 Thread Rolf Evers-Fischer
get_dma_channel may return ERR_PTR, so a check is added. Signed-off-by: Rolf Evers-Fischer --- arch/sh/drivers/dma/dma-api.c | 20 +++- arch/sh/drivers/dma/dma-sysfs.c | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/arch/sh/drivers/dma/dma-api.c b/arch

Re: [PATCH] phy: ti-pipe3: Do not overwrite the whole PROGRAMMABILITY register

2019-02-26 Thread Rolf Evers-Fischer
Kishon, On Tue, 26 Feb 2019, Kishon Vijay Abraham I wrote: > Rolf, > > On 26/02/19 2:54 PM, Rolf Evers-Fischer wrote: > > From: Rolf Evers-Fischer > > > > Previously, ti_pipe3_calibrate() wrote all bits in the > > PCIEPHYRX_ANA_PROGRAMMABILITY register, thus o

[PATCH] phy: ti-pipe3: Do not overwrite the whole PROGRAMMABILITY register

2019-02-26 Thread Rolf Evers-Fischer
From: Rolf Evers-Fischer Previously, ti_pipe3_calibrate() wrote all bits in the PCIEPHYRX_ANA_PROGRAMMABILITY register, thus overwriting bits, which should not be modified. Fix ti_pipe3_calibrate() so that it only modifies LOSD and INTERFACE bits. Signed-off-by: Rolf Evers-Fischer --- drivers

[PATCH v5 3/3] PCI: endpoint: pci_epf_create: remove goto labels

2018-02-28 Thread Rolf Evers-Fischer
From: Rolf Evers-Fischer Removes the goto labels completely, handles the errors at the respective call site and just returns instead of jumping around. Signed-off-by: Rolf Evers-Fischer --- drivers/pci/endpoint/pci-epf-core.c | 32 1 file changed, 12

[PATCH v5 2/3] PCI: endpoint: Fix kernel panic after put_device()

2018-02-28 Thread Rolf Evers-Fischer
From: Rolf Evers-Fischer 'put_device()' calls the relase function 'pci_epf_dev_release()', which already frees 'epf->name' and 'epf'. Therefore we must not free them again after 'put_device()'. Fixes: 5e8cb4033807 ("PCI: endpoint: A

[PATCH v5 1/3] PCI: endpoint: Simplify name allocation for EPF device

2018-02-28 Thread Rolf Evers-Fischer
From: Rolf Evers-Fischer This commit replaces allocating and freeing the intermediate 'buf'/'func_name' with a combination of 'kstrndup()' and 'len'. 'len' is the required length of 'epf->name'. 'epf->name' should be

[PATCH v5 0/3] pci: endpoint: Fix double free in pci_epf_create()

2018-02-28 Thread Rolf Evers-Fischer
reworked in order to eliminate the need for the second 'kstrdup' allocation and the 'kfree' of the first allocation. It was tested with name="pci_epf_test.0" and name="pci_epb": The 'epf->name' was "pci_epf_test" or "pci_epb"

Re: [PATCH v4 3/3] PCI: endpoint: pci_epf_create: remove goto labels

2018-02-28 Thread Rolf Evers-Fischer
Hi Kishon and Lorenzo, On Wed, 28 Feb 2018, Lorenzo Pieralisi wrote: > On Wed, Feb 28, 2018 at 02:07:19PM +0100, Rolf Evers-Fischer wrote: > > From: Rolf Evers-Fischer > > > > Removes the goto labels completely, handles the errors at the > > respective call site

[PATCH v4 3/3] PCI: endpoint: pci_epf_create: remove goto labels

2018-02-28 Thread Rolf Evers-Fischer
From: Rolf Evers-Fischer Removes the goto labels completely, handles the errors at the respective call site and just returns instead of jumping around. Signed-off-by: Rolf Evers-Fischer --- drivers/pci/endpoint/pci-epf-core.c | 30 +- 1 file changed, 9 insertions

[PATCH v4 2/3] PCI: endpoint: Fix kernel panic after put_device()

2018-02-28 Thread Rolf Evers-Fischer
From: Rolf Evers-Fischer 'put_device()' calls the relase function 'pci_epf_dev_release()', which already frees 'epf->name' and 'epf'. Therefore we must not free them again after 'put_device()'. Fixes: 5e8cb4033807 ("PCI: endpoint: A

[PATCH v4 1/3] PCI: endpoint: Simplify name allocation for EPF device

2018-02-28 Thread Rolf Evers-Fischer
From: Rolf Evers-Fischer This commit replaces allocating and freeing the intermediate 'buf'/'func_name' with a combination of 'kstrndup()' and 'len'. 'len' is the required length of 'epf->name'. 'epf->name' should be

[PATCH v4 0/3] pci: endpoint: Fix double free in pci_epf_create()

2018-02-28 Thread Rolf Evers-Fischer
rked in order to eliminate the need for the second 'kstrdup' allocation and the 'kfree' of the first allocation. It was tested with name="pci_epf_test.0" and name="pci_epb": The 'epf->name' was "pci_epf_test" or "pci_epb"

Re: [PATCH v3 0/2] pci: endpoint: Fix double free in pci_epf_create()

2018-02-28 Thread Rolf Evers-Fischer
Hello Bjorn! On Tue, 27 Feb 2018, Bjorn Helgaas wrote: > On Tue, Feb 27, 2018 at 10:20:30AM +, Lorenzo Pieralisi wrote: > > On Tue, Feb 27, 2018 at 11:02:28AM +0100, Rolf Evers-Fischer wrote: > > > This is version 3 of a patchset to avoid double free in function >

Re: [PATCH v3 2/2] pci: endpoint: Fix kernel panic after put_device()

2018-02-28 Thread Rolf Evers-Fischer
Hello Lorenzo! On Tue, 27 Feb 2018, Lorenzo Pieralisi wrote: > On Tue, Feb 27, 2018 at 11:02:30AM +0100, Rolf Evers-Fischer wrote: > > From: Rolf Evers-Fischer > > > > 'put_device()' calls the relase function 'pci_epf_dev_release()', >

Re: [PATCH v3 0/2] pci: endpoint: Fix double free in pci_epf_create()

2018-02-27 Thread Rolf Evers-Fischer
Hello Lorenzo, On Tue, 27 Feb 2018, Lorenzo Pieralisi wrote: > On Tue, Feb 27, 2018 at 11:02:28AM +0100, Rolf Evers-Fischer wrote: > > This is version 3 of a patchset to avoid double free in function > > 'pci_epf_create()'. > > > > When I accidentally create

Re: [PATCH v3 1/2] pci: endpoint: Simplify name allocation for epf device

2018-02-27 Thread Rolf Evers-Fischer
Hi, On Tue, 27 Feb 2018, Kishon Vijay Abraham I wrote: > Hi, > > On Tuesday 27 February 2018 03:32 PM, Rolf Evers-Fischer wrote: > > From: Rolf Evers-Fischer > > > > This commit replaces allocating and freeing the intermediate > > 'buf'/'func_n

[PATCH v3 1/2] pci: endpoint: Simplify name allocation for epf device

2018-02-27 Thread Rolf Evers-Fischer
From: Rolf Evers-Fischer This commit replaces allocating and freeing the intermediate 'buf'/'func_name' with a combination of 'kstrndup()' and 'len'. 'len' is the required length of 'epf->name'. 'epf->name' should be

[PATCH v3 2/2] pci: endpoint: Fix kernel panic after put_device()

2018-02-27 Thread Rolf Evers-Fischer
From: Rolf Evers-Fischer 'put_device()' calls the relase function 'pci_epf_dev_release()', which already frees 'epf->name' and 'epf'. Therefore we must not free them again after 'put_device()'. Fixes: 5e8cb4033807 ("PCI: endpoint: A

[PATCH v3 0/2] pci: endpoint: Fix double free in pci_epf_create()

2018-02-27 Thread Rolf Evers-Fischer
the first allocation. It was tested with name="pci_epf_test.0" and name="pci_epb": The 'epf->name' was "pci_epf_test" or "pci_epb" (=unchanged). Rolf Evers-Fischer (2): pci: endpoint: Simplify name allocation for epf device pci: endpoin

[PATCH v2 2/2] pci: endpoint: Fix kernel panic after put_device()

2018-02-26 Thread Rolf Evers-Fischer
From: Rolf Evers-Fischer 'put_device()' calls the relase function 'pci_epf_dev_release()', which already frees 'epf->name' and 'epf'. Therefore we must not free them again after 'put_device()'. Signed-off-by: Rolf Evers-Fischer --- drive

[PATCH v2 1/2] pci: endpoint: Simplify name allocation for epf device

2018-02-26 Thread Rolf Evers-Fischer
From: Rolf Evers-Fischer This commit replaces allocating and freeing the intermediate 'buf'/'func_name' with a combination of 'kstrndup()' and 'len'. 'len' is the required length of 'epf->name'. 'epf->name' should be

[PATCH v2 0/2] pci: endpoint: Fix double free in pci_epf_create()

2018-02-26 Thread Rolf Evers-Fischer
Change IDs removed - First patch completely reworked in order to eliminate the need for the second 'kstrdup' allocation and the 'kfree' of the first allocation. It was tested with name="pci_epf_test.0" and name="pci_epb": The 'epf->name&#

Re: [PATCH 1/2] pci: endpoint: Free func_name after last usage

2018-02-23 Thread Rolf Evers-Fischer
18 11:49 PM, Lorenzo Pieralisi wrote: > >>> On Wed, Feb 21, 2018 at 01:47:06PM +0100, Rolf Evers-Fischer wrote: > >>>> From: Rolf Evers-Fischer > >>>> > >>>> This commit decreases the number of jump labels and ensures > >>>> that t

Re: [PATCH 1/2] pci: endpoint: Free func_name after last usage

2018-02-22 Thread Rolf Evers-Fischer
> > Signed-off-by: Rolf Evers-Fischer > > Signed-off-by: Rolf Evers-Fischer > > Looks like bipolar disorder? > You are right: One "Signed-off" should be enough. > To the topic. > This is a slow path and your change makes code slightly less readable > b/c of

[PATCH 2/2] pci: endpoint: Fix kernel panic after put_device()

2018-02-21 Thread Rolf Evers-Fischer
From: Rolf Evers-Fischer 'put_device()' calls the relase function 'pci_epf_dev_release()', which already frees 'epf->name' and 'epf'. Therefore we must not free them again after 'put_device()'. Change-Id: I14ca19f96abfbbb489dd1f4d489e08532

[PATCH 1/2] pci: endpoint: Free func_name after last usage

2018-02-21 Thread Rolf Evers-Fischer
From: Rolf Evers-Fischer This commit decreases the number of jump labels and ensures that the next commit doesn't increase the number of occurrences of 'kfree(func_name)'. Change-Id: I0d1b6fd652395b85f82b11c43bf9b7db512854d1 Signed-off-by: Rolf Evers-Fischer Signed-off-by: Rol

[PATCH 0/2] pci: endpoint: Fix double free in pci_epf_create()

2018-02-21 Thread Rolf Evers-Fischer
'epf->name' and 'epf'. The first patch just simplifies the code, while the second patch fixes the problem. Rolf Evers-Fischer (2): pci: endpoint: Free func_name after last usage pci: endpoint: Fix kernel panic after put_device() drivers/pci/endpoint/pci-epf-core.c | 9 ++

[v2][PATCH 1/1] serial: 8250: 8250_omap: Fix spelling error.

2017-12-06 Thread Rolf Evers-Fischer
From: Rolf Evers-Fischer Fixed a spelling error in a comment. Signed-off-by: Rolf Evers-Fischer --- drivers/tty/serial/8250/8250_omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index

Re: Checkpatch ignores spelling error by using -f

2017-12-06 Thread Rolf Evers-Fischer
On Wed, 6 Dec 2017, Joe Perches wrote: > On Wed, 2017-12-06 at 15:13 +0100, Rolf Evers-Fischer wrote: > > Hello, > > I've just checked the file drivers/tty/serial/8250/8250_omap.c, using > > checkpatch.pl, but I forgot the '-f' option (for file). > &g

Checkpatch ignores spelling error by using -f

2017-12-06 Thread Rolf Evers-Fischer
Hello, I've just checked the file drivers/tty/serial/8250/8250_omap.c, using checkpatch.pl, but I forgot the '-f' option (for file). Surprisingly the checkpatch script reported a misspelling: "WARNING: 'additionaly' may be misspelled - perhaps 'additionally'? #417: * We enable TRIG_GRA

[PATCH 1/1] serial: 8250: 8250_omap: Fix spelling error.

2017-12-06 Thread Rolf Evers-Fischer
From: Rolf Evers-Fischer Signed-off-by: Rolf Evers-Fischer --- drivers/tty/serial/8250/8250_omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index bd40ba402410..57f6eba47f44 100644 --- a

[PATCH] arch: arm: mach-shmobile: Remove ARCH_HAS_OPP completely

2014-10-15 Thread Rolf Evers-Fischer
For some reason that commit did not remove all select statements for that symbol. These statements are now useless. Commit adad5621f3e1 ("PM / devfreq: Remove ARCH_HAS_OPP completely") removed it for devfreq. Remove one from mach-shmobile too. Signed-off-by: Rolf Evers-Fischer --- arch