[PATCH] lan743x: switch from 'pci_' to 'dma_' API

2020-07-14 Thread Christophe JAILLET
ma_mask(e1, e2) +dma_set_mask(>dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(>dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-jani

[PATCH] pcnet32: switch from 'pci_' to 'dma_' API

2020-07-13 Thread Christophe JAILLET
ession e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(>dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors=158745678307186=4 --- drivers/net/ethernet/amd/pcnet

[PATCH] amd8111e: switch from 'pci_' to 'dma_' API

2020-07-13 Thread Christophe JAILLET
dma_mapping_error(>dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(>dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(>dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christop

[PATCH 1/2] Crypto/chcr: Avoid some code duplication

2020-07-12 Thread Christophe JAILLET
The error handling path of 'chcr_authenc_setkey()' is the same as this error handling code. So just 'goto out' as done everywhere in the function to simplify the code. Signed-off-by: Christophe JAILLET --- drivers/crypto/chelsio/chcr_algo.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions

[PATCH 2/2] Crypto/chcr: Fix some pr_xxx messages

2020-07-12 Thread Christophe JAILLET
At the top this file, we have: #define pr_fmt(fmt) "chcr:" fmt So there is no need to repeat "chcr : " in some error message when the pr_xxx macro is used. This would lead to log "chcr:chcr : blabla" Signed-off-by: Christophe JAILLET --- drivers/c

[PATCH 2/2] nl80211: Simplify error handling path in 'nl80211_trigger_scan()'

2020-07-12 Thread Christophe JAILLET
Re-write the end of 'nl80211_trigger_scan()' with a more standard, easy to understand and future proof version. Signed-off-by: Christophe JAILLET --- net/wireless/nl80211.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/net/wireless/nl80211.c b/net

[PATCH 1/2] nl80211: Remove a misleading label in 'nl80211_trigger_scan()'

2020-07-12 Thread Christophe JAILLET
plify code accordingly. Signed-off-by: Christophe JAILLET --- net/wireless/nl80211.c | 31 ++- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 98bfc6a1c806..a671ee5f5da7 100644 --- a/net/wireless

Re: [PATCH] net: sky2: switch from 'pci_' to 'dma_' API

2020-07-12 Thread Christophe JAILLET
Le 12/07/2020 à 08:32, Joe Perches a écrit : On Sun, 2020-07-12 at 08:29 +0200, Christophe JAILLET wrote: Le 11/07/2020 à 23:20, Joe Perches a écrit : On Sat, 2020-07-11 at 22:49 +0200, Christophe JAILLET wrote: The wrappers in include/linux/pci-dma-compat.h should go away. why? From

[PATCH] net: sky2: switch from 'pci_' to 'dma_' API

2020-07-11 Thread Christophe JAILLET
et_dma_mask(e1, e2) +dma_set_mask(>dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(>dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=ke

[PATCH] net: skge: switch from 'pci_' to 'dma_' API

2020-07-11 Thread Christophe JAILLET
dma_set_coherent_mask(>dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors=158745678307186=4 --- drivers/net/ethernet/marvell/skge.c | 76 ++--- 1 file changed, 36 insertio

Re: [PATCH] staging: comedi: s626: Remove pci-dma-compat wrapper APIs.

2020-07-11 Thread Christophe JAILLET
Le 11/07/2020 à 14:35, Suraj Upadhyay a écrit : The legacy API wrappers in include/linux/pci-dma-compat.h should go away as it creates unnecessary midlayering for include/linux/dma-mapping.h APIs, instead use dma-mapping.h APIs directly. The patch has been generated with the coccinelle script

[PATCH] RDMA/usnic: switch from 'pci_' to 'dma_' API

2020-07-11 Thread Christophe JAILLET
ession e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(>dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(>dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-jani

[PATCH] rsxx: switch from 'pci_free_consistent()' to 'dma_free_coherent()'

2020-07-11 Thread Christophe JAILLET
ma_mask(e1, e2) +dma_set_mask(>dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(>dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitor

[PATCH] rsxx: switch from 'pci_free_consistent()' to 'dma_free_coherent()'

2020-07-11 Thread Christophe JAILLET
ma_mask(e1, e2) +dma_set_mask(>dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(>dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitor

Re: [PATCH v2] dma-pool: Fix too large DMA pools on medium systems

2020-06-27 Thread Marion & Christophe JAILLET
Le 24/06/2020 à 09:38, Christoph Hellwig a écrit : Hi Guenter, can you try the patch below? This just converts the huge allocations in mptbase to use GFP_KERNEL. Christophe (added to Cc) actually has a scripted conversion for the rest that he hasn't posted yet, so I'll aim for the minimal

Re: [PATCH V3] firmware: stratix10-svc: Fix some error handling code

2020-06-27 Thread Marion & Christophe JAILLET
Le 27/06/2020 à 07:15, Greg KH a écrit : On Fri, Jun 26, 2020 at 09:37:20PM +0200, Christophe JAILLET wrote: --- v2: takes Dan's comment into account and fix another resource leak. v3: merge the previous 4 patches in a single one to ease review No, 4 small patches are _MUCH_ easier

[PATCH V3] firmware: stratix10-svc: Fix some error handling code

2020-06-26 Thread Christophe JAILLET
ess test in the remove function. Fixes: b5dc75c915cd ("firmware: stratix10-svc: extend svc to support new RSU features") Fixes: 7ca5ce896524 ("firmware: add Intel Stratix10 service layer driver") Signed-off-by: Christophe JAILLET --- v2: takes Dan's comment into account and fi

[PATCH V2] scsi: eesox: Fix different dev_id between 'request_irq()' and 'free_irq()'

2020-06-25 Thread Christophe JAILLET
The dev_id used in 'request_irq()' and 'free_irq()' should match. So use 'info' in both cases. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET --- V2: update free_irq instead of request_irq in order not to obviously break code --- drivers/scsi/arm/e

[PATCH V2] scsi: powertec: Fix different dev_id between 'request_irq()' and 'free_irq()'

2020-06-25 Thread Christophe JAILLET
The dev_id used in 'request_irq()' and 'free_irq()' should match. So use 'info' in both cases. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET --- V2: update free_irq instead of request_irq in order not to obviously break code --- drivers/scsi/arm/powe

[PATCH] scsi: cumana_2: Fix different dev_id between 'request_irq()' and 'free_irq()'

2020-06-25 Thread Christophe JAILLET
The dev_id used in 'request_irq()' and 'free_irq()' should match. Use 'info' in both cases. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET --- V2: update free_irq instead of request_irq in order not to obviously break code --- drivers/scsi/arm/cuma

[PATCH] media: s5p-g2d: Fix a memory leak in an error handling path in 'g2d_probe()'

2020-06-25 Thread Christophe JAILLET
dd DT based discovery support") Fixes: 918847341af0 ("[media] v4l: add G2D driver for s5p device family") Signed-off-by: Christophe JAILLET --- V2: Call 'video_register_device()' as required by Hans Verkuil Compile tested only. --- drivers/media/platfor

[PATCH V2] firewire: nosy: Fix the amount of memory deallocated by some 'pci_free_consistent' calls

2020-06-25 Thread Christophe JAILLET
'lynx->pci_device' is allocated with a size of RCV_BUFFER_SIZE. This is to say (16 * 1024). Pass the same size when it is freed. Fixes: 286468210d83 ("firewire: new driver: nosy - IEEE 1394 traffic sniffer") Signed-off-by: Christophe JAILLET --- v2: move the #define RCV_BUFFER_SI

[PATCH] firewire: nosy: Fix the amount of memory deallocated by some 'pci_free_consistent' calls

2020-06-24 Thread Christophe JAILLET
'lynx->pci_device' is allocated with a size of RCV_BUFFER_SIZE. This is to say (16 * 1024). Pass the same size when it is freed. Fixes: 286468210d83 ("firewire: new driver: nosy - IEEE 1394 traffic sniffer") Signed-off-by: Christophe JAILLET --- drivers/firewire/nosy.c | 4 ++-- 1

Re: [PATCH 5.7 318/477] pinctrl: freescale: imx: Use devm_of_iomap() to avoid a resource leak in case of error in imx_pinctrl_probe()

2020-06-23 Thread Marion & Christophe JAILLET
;-). CJ Le 23/06/2020 à 21:55, Greg Kroah-Hartman a écrit : From: Christophe JAILLET [ Upstream commit ba403242615c2c99e27af7984b1650771a2cc2c9 ] Use 'devm_of_iomap()' instead 'of_iomap()' to avoid a resource leak in case of error. Update the error handling code accordingly. Fixes

[PATCH] kernel/cpu_pm: mark 1 function as __init to save some memory

2020-06-21 Thread Christophe JAILLET
'cpu_pm_init()' is only called via 'core_initcall'. It can be marked as __init to save a few bytes of memory. Signed-off-by: Christophe JAILLET --- kernel/cpu_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cpu_pm.c b/kernel/cpu_pm.c index 44a259338e33

[PATCH] drivers: base: power: mark 2 functions as __init to save some memory

2020-06-21 Thread Christophe JAILLET
'early_resume_init()' and 'late_resume_init() 'are only called respectively via 'early_resume_init' and 'late_resume_init'. They can be marked as __init to save a few bytes of memory. Signed-off-by: Christophe JAILLET --- drivers/base/power/trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH] topology: mark a function as __init to save some memory

2020-06-21 Thread Christophe JAILLET
'topology_sysfs_init()' is only called via 'device_initcall'. It can be marked as __init to save a few bytes of memory. Signed-off-by: Christophe JAILLET --- drivers/base/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/topology.c b/drivers/base

Re: [PATCH] pcmcia/electra_cf: Fix some return values in 'electra_cf_probe()' in case of error

2020-06-17 Thread Christophe JAILLET
Le 17/06/2020 à 22:10, Olof Johansson a écrit : On Wed, Jun 17, 2020 at 12:54 PM Christophe JAILLET wrote: 'status' is known to be 0 at this point. It must be set to a meaningful value in order to return an error code if one of the 'of_get_property()' call fails. Return -EINVAL in such a case

[PATCH] ia64: Fix a typo in a comment

2020-06-17 Thread Christophe JAILLET
s/permfon/perfmon/ Signed-off-by: Christophe JAILLET --- arch/ia64/kernel/perfmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 971f166873aa..e8e30a408946 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch

[PATCH] pcmcia/electra_cf: Fix some return values in 'electra_cf_probe()' in case of error

2020-06-17 Thread Christophe JAILLET
'status' is known to be 0 at this point. It must be set to a meaningful value in order to return an error code if one of the 'of_get_property()' call fails. Return -EINVAL in such a case. Fixes: 2b571a066a2f("pcmcia: CompactFlash driver for PA Semi Electra boards") Signed-off-by:

[tip: sched/core] sched/deadline: Fix a typo in a comment

2020-06-16 Thread tip-bot2 for Christophe JAILLET
The following commit has been merged into the sched/core branch of tip: Commit-ID: c49694173da004b1b16082f82f28bd625415fbb2 Gitweb: https://git.kernel.org/tip/c49694173da004b1b16082f82f28bd625415fbb2 Author:Christophe JAILLET AuthorDate:Tue, 02 Jun 2020 21:50:02 +02:00

Re: [PATCH] scsi: powertec: Fix different dev_id between 'request_irq()' and 'free_irq()'

2020-06-09 Thread Christophe JAILLET
Le 10/06/2020 à 04:41, Martin K. Petersen a écrit : On Sat, 30 May 2020 09:29:33 +0200, Christophe JAILLET wrote: The dev_id used in 'request_irq()' and 'free_irq()' should match. So use 'host' in both cases. Applied to 5.8/scsi-queue, thanks! [1/1] scsi: powertec: Fix different dev_id

Re: [PATCH] scsi: eesox: Fix different dev_id between 'request_irq()' and 'free_irq()'

2020-06-09 Thread Christophe JAILLET
Le 10/06/2020 à 04:41, Martin K. Petersen a écrit : On Sat, 30 May 2020 09:34:18 +0200, Christophe JAILLET wrote: The dev_id used in 'request_irq()' and 'free_irq()' should match. So use 'host' in both cases. Applied to 5.8/scsi-queue, thanks! [1/1] scsi: eesox: Fix different dev_id between

Re: [PATCH] pinctrl: freescale: imx: Fix an error handling path in 'imx_pinctrl_probe()'

2020-06-02 Thread Christophe JAILLET
Le 02/06/2020 à 12:13, Dan Carpenter a écrit : On Sat, May 30, 2020 at 10:49:55PM +0200, Christophe JAILLET wrote: 'pinctrl_unregister()' should not be called to undo 'devm_pinctrl_register_and_init()', it is already handled by the framework. This simplifies the error handling paths

[PATCH] sched/deadline: Fix a typo in a comment

2020-06-02 Thread Christophe JAILLET
s/deadine/deadline/ Signed-off-by: Christophe JAILLET --- kernel/sched/deadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index 504d2f51b0d6..cc2066e25dcf 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched

Re: [PATCH] kernel: power: swap: mark a function as __init to save some memory

2020-06-01 Thread Christophe JAILLET
Le 01/06/2020 à 00:11, Joe Perches a écrit : (adding Dan Carpenter) On Sun, 2020-05-31 at 23:00 +0200, Christophe JAILLET wrote: 'swsusp_header_init()' is only called via 'core_initcall'. It can be marked as __init to save a few bytes of memory. Hey Dan smatch has a full function calling

[tip: timers/core] clocksource: davinci: axe a pointless __GFP_NOFAIL

2020-06-01 Thread tip-bot2 for Christophe JAILLET
The following commit has been merged into the timers/core branch of tip: Commit-ID: 4855f2bd91b6e3461af7d795bfe9a40420122131 Gitweb: https://git.kernel.org/tip/4855f2bd91b6e3461af7d795bfe9a40420122131 Author:Christophe JAILLET AuthorDate:Thu, 09 Apr 2020 12:12:26 +02:00

[tip: timers/core] clocksource/drivers/davinci: Avoid trailing '\n' hidden in pr_fmt()

2020-06-01 Thread tip-bot2 for Christophe JAILLET
The following commit has been merged into the timers/core branch of tip: Commit-ID: bdf8783c0dae9d3d8fc1c4078fe849ab8aa8b583 Gitweb: https://git.kernel.org/tip/bdf8783c0dae9d3d8fc1c4078fe849ab8aa8b583 Author:Christophe JAILLET AuthorDate:Thu, 09 Apr 2020 11:25:43 +02:00

Re: [PATCH] pinctrl: pxa: pxa2xx: Remove 'pxa2xx_pinctrl_exit()' which is unused and broken

2020-06-01 Thread Christophe JAILLET
Le 01/06/2020 à 10:58, Robert Jarzmik a écrit : Christophe JAILLET writes: Commit 6d33ee7a0534 ("pinctrl: pxa: Use devm_pinctrl_register() for pinctrl registration") has turned a 'pinctrl_register()' into 'devm_pinctrl_register()' in 'pxa2xx_pinctrl_init()'. However, the cor

[PATCH] kernel: power: swap: mark a function as __init to save some memory

2020-05-31 Thread Christophe JAILLET
'swsusp_header_init()' is only called via 'core_initcall'. It can be marked as __init to save a few bytes of memory. Signed-off-by: Christophe JAILLET --- kernel/power/swap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/power/swap.c b/kernel/power/swap.c index

[PATCH] arm64: debug: mark a function as __init to save some memory

2020-05-31 Thread Christophe JAILLET
'debug_monitors_init()' is only called via 'postcore_initcall'. It can be marked as __init to save a few bytes of memory. Signed-off-by: Christophe JAILLET --- arch/arm64/kernel/debug-monitors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/debug

[PATCH] MIPS: ralink: bootrom: mark a function as __init to save some memory

2020-05-31 Thread Christophe JAILLET
'bootrom_setup()' is only called via 'postcore_initcall'. It can be marked as __init to save a few bytes of memory. Signed-off-by: Christophe JAILLET --- arch/mips/ralink/bootrom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/ralink/bootrom.c b/arch/mips/ralink

[PATCH] ARM: smp_twd: mark a function as __init to save some memory

2020-05-31 Thread Christophe JAILLET
'twd_clk_init()' is only called via 'core_initcall'. It can be marked as __init to save a few bytes of memory. Signed-off-by: Christophe JAILLET --- For the records, this function has been introduced in commit 4fd7f9b12810 ("ARM: 7212/1: smp_twd: reconfigure clockevents after cpufreq c

[PATCH] ARM: riscpc: mark a function as __init to save some memory

2020-05-31 Thread Christophe JAILLET
'ecard_bus_init()' is only called via 'postcore_initcall'. It can be marked as __init to save a few bytes of memory. Signed-off-by: Christophe JAILLET --- arch/arm/mach-rpc/ecard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-rpc/ecard.c b/arch/arm/mach-rpc

[PATCH] pinctrl: pxa: pxa2xx: Remove 'pxa2xx_pinctrl_exit()' which is unused and broken

2020-05-31 Thread Christophe JAILLET
en removed. This is not an issue, because 'pxa2xx_pinctrl_exit()' is unused. Remove it now to avoid some wondering in the future and save a few LoC. Signed-off-by: Christophe JAILLET --- If some some reason the function should be kept, at least it should be only 'return 0;' --- drivers/pinctrl/pxa/pinctr

[PATCH] pinctrl: freescale: imx: Fix an error handling path in 'imx_pinctrl_probe()'

2020-05-30 Thread Christophe JAILLET
trees for groups and functions") Signed-off-by: Christophe JAILLET --- drivers/pinctrl/freescale/pinctrl-imx.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c index 9f

[PATCH] pinctrl: imxl: Fix an error handling path in 'imx1_pinctrl_core_probe()'

2020-05-30 Thread Christophe JAILLET
When 'pinctrl_register()' has been turned into 'devm_pinctrl_register()', an error handling path has not been updated. Axe a now unneeded 'pinctrl_unregister()'. Fixes: e55e025d1687 ("pinctrl: imxl: Use devm_pinctrl_register() for pinctrl registration") Signed-off-by: Christop

[PATCH v2] crypto: cavium/nitrox - Fix 'nitrox_get_first_device()' when ndevlist is fully iterated

2020-05-30 Thread Christophe JAILLET
ithms.") Signed-off-by: Christophe JAILLET --- v2: Do not introduce an extra variable to check if the list has been fully iterated. Test with "if (>list == )" instead --- drivers/crypto/cavium/nitrox/nitrox_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

Re: [PATCH] scsi: cumana_2: Fix different dev_id between 'request_irq()' and 'free_irq()'

2020-05-30 Thread Marion & Christophe JAILLET
Le 30/05/2020 à 11:43, Russell King - ARM Linux admin a écrit : On Sat, May 30, 2020 at 09:35:55AM +0200, Christophe JAILLET wrote: The dev_id used in 'request_irq()' and 'free_irq()' should match. So use 'host' in both cases. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")

[PATCH] dlm: Fix a typo in a comment

2020-05-30 Thread Christophe JAILLET
s/locksapce/lockspace/ Signed-off-by: Christophe JAILLET --- fs/dlm/lockspace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c index e93670ecfae5..f17e091daab3 100644 --- a/fs/dlm/lockspace.c +++ b/fs/dlm/lockspace.c @@ -859,7 +859,7

[PATCH] scsi: acornscsi: Fix an error handling path in 'acornscsi_probe()'

2020-05-30 Thread Christophe JAILLET
'ret' is known to be 0 at this point. So, explicitly return -ENOMEM if one of the 'ecardm_iomap()' calls fail. Fixes: e95a1b656a98 ("[ARM] rpc: acornscsi: update to new style ecard driver") Signed-off-by: Christophe JAILLET --- drivers/scsi/arm/acornscsi.c | 4 +++- 1 file changed, 3

[PATCH] scsi: cumana_2: Fix different dev_id between 'request_irq()' and 'free_irq()'

2020-05-30 Thread Christophe JAILLET
The dev_id used in 'request_irq()' and 'free_irq()' should match. So use 'host' in both cases. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET --- drivers/scsi/arm/cumana_2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ar

[PATCH] scsi: eesox: Fix different dev_id between 'request_irq()' and 'free_irq()'

2020-05-30 Thread Christophe JAILLET
The dev_id used in 'request_irq()' and 'free_irq()' should match. So use 'host' in both cases. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET --- drivers/scsi/arm/eesox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/arm

[PATCH] scsi: powertec: Fix different dev_id between 'request_irq()' and 'free_irq()'

2020-05-30 Thread Christophe JAILLET
The dev_id used in 'request_irq()' and 'free_irq()' should match. So use 'host' in both cases. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET --- drivers/scsi/arm/powertec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver

Re: [PATCH 3.16 35/99] pxa168fb: Fix the function used to release some memory in an error handling path

2020-05-21 Thread Marion & Christophe JAILLET
Hi, sorry for the noise, I have messed up my https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ usage. I thought I was looking at the 3.16.83 branch, but I was not. The patch looks good to me. CJ Le 21/05/2020 à 16:09, Marion & Christophe JAILLET a écrit : Hi, I don't t

Re: [PATCH 3.16 35/99] pxa168fb: Fix the function used to release some memory in an error handling path

2020-05-21 Thread Marion & Christophe JAILLET
Hutchings a écrit : 3.16.84-rc1 review patch. If anyone has any objections, please let me know. -- From: Christophe JAILLET commit 3c911fe799d1c338d94b78e7182ad452c37af897 upstream. In the probe function, some resources are allocated using 'dma_alloc_wc()', they should

[PATCH] crypto: cavium/nitrox - Fix 'nitrox_get_first_device()' when ndevlist is fully iterated

2020-05-19 Thread Christophe JAILLET
rypto algorithms.") Signed-off-by: Christophe JAILLET --- drivers/crypto/cavium/nitrox/nitrox_main.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/cavium/nitrox/nitrox_main.c b/drivers/crypto/cavium/nitrox/nitrox_main.c index 788c6607078b..172cafe7c

[PATCH] crypto: cavium/nitrox - Fix a typo in a comment

2020-05-19 Thread Christophe JAILLET
s/NITORX/NITROX/ Signed-off-by: Christophe JAILLET --- drivers/crypto/cavium/nitrox/nitrox_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/cavium/nitrox/nitrox_main.c b/drivers/crypto/cavium/nitrox/nitrox_main.c index e91be9b8b083..788c6607078b 100644

[PATCH] iio: adc: ad7780: Fix a resource handling path in 'ad7780_probe()'

2020-05-17 Thread Christophe JAILLET
upport") Signed-off-by: Christophe JAILLET --- drivers/iio/adc/ad7780.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ad7780.c b/drivers/iio/adc/ad7780.c index f47606ee..b33fe6c3907e 100644 --- a/drivers/iio/adc/ad7780.c +++ b/drivers/iio/adc/ad7780.c @@

[PATCH] drm/mm: Fix an error handling path in '__igt_once()'

2020-05-17 Thread Christophe JAILLET
The label of the last gotos must be switched for the error handling code to work as expected. Fixes: 83bc4ec37210 ("drm/mm: Add a search-by-address variant to only inspect a single hole") Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/selftests/test-drm_mm.c | 4 ++-- 1 file

[PATCH] dmaengine: tegra210-adma: Fix an error handling path in 'tegra_adma_probe()'

2020-05-16 Thread Christophe JAILLET
resources are released. Fixes: b53611fb1ce9 ("dmaengine: tegra210-adma: Fix crash during probe") Signed-off-by: Christophe JAILLET --- drivers/dma/tegra210-adma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/tegra210-adma.c b/drivers/dma/tegra210-adma.

[PATCH v2] drm/exynos: dsi: Remove bridge node reference in error handling path in probe function

2020-05-16 Thread Christophe JAILLET
et_pll (use pll_clk_rate) While at it, also handle cases where 'component_add()' fails. This patch is similar to commit 70505c2ef94b ("drm/exynos: dsi: Remove bridge node reference in removal") which fixed the issue in the remove function. Signed-off-by: Christophe JAILLET --- A Fi

[PATCH] ath11k: Fix some resource leaks in error path in 'ath11k_thermal_register()'

2020-05-13 Thread Christophe JAILLET
->thermal.cdev = cdev' a few lines above in order for this to be done in 'ath11k_thermal_unregister()' which is called in the error handling path. Fixes: 2a63bbca06b2 ("ath11k: add thermal cooling device support") Signed-off-by: Christophe JAILLET --- I'm not 100% confident with this p

[PATCH] ASoC: ti: omap-mcbsp: Fix an error handling path in 'asoc_mcbsp_probe()'

2020-05-12 Thread Christophe JAILLET
eak in the probe and has the side effect to simplify both the error handling path of 'omap_mcbsp_init()' and the remove function. Signed-off-by: Christophe JAILLET --- I've not been able to identify the when the issue has been introduced, so no Fixes: tag. --- sound/soc/ti/omap-mcbsp.c | 8 ++--

[PATCH] ASoC: ux500: mop500: Fix some refcounted resources issues

2020-05-12 Thread Christophe JAILLET
' is refcounted only once in the probe and must be decremented only once. Fixes: 39013bd60e79 ("ASoC: Ux500: Dispose of device nodes correctly") Signed-off-by: Christophe JAILLET --- sound/soc/ux500/mop500.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sound

[PATCH] drm/exynos: dsi: Remove bridge node reference in error handling path in probe function

2020-05-10 Thread Christophe JAILLET
'exynos_dsi_parse_dt()' takes a reference to 'dsi->in_bridge_node'. This must be released in the error handling path. This patch is similar to commit 70505c2ef94b ("drm/exynos: dsi: Remove bridge node reference in removal") which fixed the issue in the remove function. Signed-off-b

[PATCH] firmware: xilinx: Fix an error handling path in 'zynqmp_firmware_probe()'

2020-05-10 Thread Christophe JAILLET
river") Signed-off-by: Christophe JAILLET --- Not related to this fix, but I think that: - a call to 'of_platform_depopulate()' is missing in the remove function - we shouldn't return of_platform_populate(); directly because we don't have the opportunity to call 'mfd_remove_devices(

[PATCH] extcon: adc-jack: Fix an error handling path in 'adc_jack_probe()'

2020-05-10 Thread Christophe JAILLET
xtcon: adc_jack: adc-jack driver to support 3.5 pi or simliar devices") Signed-off-by: Christophe JAILLET --- This patch in a more complete version than commit 5a696d9760fe ("extcon: adc-jack: Release IIO channel on driver remove") which fixed the issue for the remove function only.

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-09 Thread Christophe JAILLET
Le 09/05/2020 à 20:13, Jakub Kicinski a écrit : On Sat, 9 May 2020 18:47:08 +0200 Christophe JAILLET wrote: Le 09/05/2020 à 03:54, Jakub Kicinski a écrit : On Fri, 8 May 2020 19:25:57 +0200 Christophe JAILLET wrote: @@ -527,8 +531,9 @@ static int mac_sonic_platform_remove(struct

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-09 Thread Christophe JAILLET
Le 09/05/2020 à 03:54, Jakub Kicinski a écrit : On Fri, 8 May 2020 19:25:57 +0200 Christophe JAILLET wrote: @@ -527,8 +531,9 @@ static int mac_sonic_platform_remove(struct platform_device *pdev) struct sonic_local* lp = netdev_priv(dev); unregister_netdev(dev

[PATCH V2] power: supply: lp8788: Fix an error handling path in 'lp8788_charger_probe()'

2020-05-09 Thread Christophe JAILLET
()' function which is now useless. Fixes: 98a276649358 ("power_supply: Add new lp8788 charger driver") Signed-off-by: Christophe JAILLET --- V2: use devm_iio_channel_get instead of iio_channel_get and simplify code --- drivers/power/supply/lp8788-charger.c | 18 ++ 1 file

[PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-08 Thread Christophe JAILLET
informative and split some too long lines. This patch is similar to commit 10e3cc180e64 ("net/sonic: Fix a resource leak in an error handling path in 'jazz_sonic_probe()'") which was for 'jazzsonic.c'. Suggested-by: Finn Thain Signed-off-by: Christophe JAILLET --- Only macsonic has be

Re: [PATCH] memory: tegra: Fix an error handling path in 'tegra186_emc_probe()'

2020-05-08 Thread Marion & Christophe JAILLET
Le 08/05/2020 à 10:49, Dan Carpenter a écrit : On Wed, May 06, 2020 at 10:09:07PM +0200, Christophe JAILLET wrote: @@ -237,7 +239,7 @@ static int tegra186_emc_probe(struct platform_device *pdev) "failed to set rate range [%lu-%lu] for

[PATCH] power: supply: lp8788: Fix an error handling path in 'lp8788_charger_probe()'

2020-05-08 Thread Christophe JAILLET
In case of error, resources allocated in 'lp8788_setup_adc_channel()' must be released. Add a call to 'lp8788_release_adc_channel()' as already done in the remove function. Fixes: 98a276649358 ("power_supply: Add new lp8788 charger driver") Signed-off-by: Christophe JAILLET --- dri

[PATCH] phy: cpcap-usb: Remove some useless code

2020-05-07 Thread Christophe JAILLET
Axe a clk that is unused in the driver. Signed-off-by: Christophe JAILLET --- drivers/phy/motorola/phy-cpcap-usb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/phy/motorola/phy-cpcap-usb.c b/drivers/phy/motorola/phy-cpcap-usb.c index 12e71a315a2c..089db0dea703 100644

[PATCH] wcn36xx: Fix error handling path in 'wcn36xx_probe()'

2020-05-06 Thread Christophe JAILLET
In case of error, 'qcom_wcnss_open_channel()' must be undone by a call to 'rpmsg_destroy_ept()', as already done in the remove function. Fixes: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to rpmsg") Signed-off-by: Christophe JAILLET --- Not 100% sure of

[PATCH] memory: tegra: Fix an error handling path in 'tegra186_emc_probe()'

2020-05-06 Thread Christophe JAILLET
The call to 'tegra_bpmp_get()' must be balanced by a call to 'tegra_bpmp_put()' in case of error, as already done in the remove function. Add an error handling path and corresponding goto. Fixes: 52d15dd23f0b ("memory: tegra: Support DVFS on Tegra186 and later") Signed-off-by: Christop

[PATCH] i2c: mux: demux-pinctrl: Fix an error handling path in 'i2c_demux_pinctrl_probe()'

2020-05-06 Thread Christophe JAILLET
A call to 'i2c_demux_deactivate_master()' is missing in the error handling path, as already done in the remove function. Fixes: 50a5ba876908 ("i2c: mux: demux-pinctrl: add driver") Signed-off-by: Christophe JAILLET --- drivers/i2c/muxes/i2c-demux-pinctrl.c | 1 + 1 file changed, 1

[PATCH V2] video: fbdev: w100fb: Fix a potential double free.

2020-05-06 Thread Christophe JAILLET
, set the corresponding pointer to NULL once freed in the 'w100fb_restore_vidmem' function. Fixes: aac51f09d96a ("[PATCH] w100fb: Rewrite for platform independence") Cc: Richard Purdie Cc: Antonino Daplas Cc: Bartlomiej Zolnierkiewicz Cc: # v2.6.14+ Signed-off-by: Christophe JAILL

Re: [PATCH] iio: sca3000: Remove an erroneous 'get_device()'

2020-05-06 Thread Marion & Christophe JAILLET
Le 06/05/2020 à 12:38, Andy Shevchenko a écrit : On Wed, May 6, 2020 at 6:55 AM Christophe JAILLET wrote: This looks really unusual to have a 'get_device()' hidden in a 'dev_err()' call. Remove it. While at it add a missing \n at the end of the message. It should have Fixes tag because

[PATCH] iio: sca3000: Remove an erroneous 'get_device()'

2020-05-05 Thread Christophe JAILLET
This looks really unusual to have a 'get_device()' hidden in a 'dev_err()' call. Remove it. While at it add a missing \n at the end of the message. Signed-off-by: Christophe JAILLET --- This patch is purely speculative. I've looked a bit arround and see no point for this get_device() but other

[PATCH] i2c: puv3: Fix an error handling path in 'puv3_i2c_probe()'

2020-05-05 Thread Christophe JAILLET
d11 ("unicore32 machine related files: add i2c bus drivers for pkunity-v3 soc") Signed-off-by: Christophe JAILLET --- This patch is provided as-is. It is not even compile tested because I don't use cross-compiler. It is purely speculative and based on what looks like an unbalance

Re: [PATCH 3/4 v2] firmware: stratix10-svc: Fix some error handling paths in 'stratix10_svc_drv_probe()'

2020-05-05 Thread Christophe JAILLET
_chans = SVC_NUM_CHANNEL; Hi, This is addressed in patch 1/4. It moves 'svc_create_memory_pool' after these 2 allocations in order to avoid the goto. I'll send a V3 in only 1 patch, as you proposed, it will ease review. CJ On 4/29/20 1:52 AM, Christophe JAILLET wrote: If an error occurs after c

Re: [PATCH 2/4 v2] firmware: stratix10-svc: Unmap some previously memremap'ed memory

2020-05-05 Thread Christophe JAILLET
Le 05/05/2020 à 16:43, Greg KH a écrit : On Wed, Apr 29, 2020 at 08:52:43AM +0200, Christophe JAILLET wrote: In 'svc_create_memory_pool()' we memremap some memory. This has to be undone in case of error and if the driver is removed. The easiest way to do it is to use 'devm_memremap()'. Fixes

[PATCH] i2c: bcm2835: Fix an error handling path in 'bcm2835_i2c_probe()'

2020-05-05 Thread Christophe JAILLET
effect to propagate the error code returned by 'request_irq()' instead of returning -ENODEV. This way, the error handling path of the probe function looks similar to the remove function. Fixes: bebff81fb8b9 ("i2c: bcm2835: Model Divider in CCF") Signed-off-by: Christophe JAILLET --- d

[PATCH] media: sun8i: Fix an error handling path in 'deinterlace_runtime_resume()'

2020-05-05 Thread Christophe JAILLET
It is spurious to call 'clk_disable_unprepare()' when 'clk_prepare_enable()' has not been called yet. Re-order the error handling path to avoid it. Fixes: a4260ea49547 ("media: sun4i: Add H3 deinterlace driver") Signed-off-by: Christophe JAILLET --- drivers/media/platform/sunxi/sun8

[PATCH] ext4: Fix a typo in a comment

2020-05-03 Thread Christophe JAILLET
s/extnets/extents/ Signed-off-by: Christophe JAILLET --- fs/ext4/extents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index f2b577b315a0..779a0687858a 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -4490,7 +4490,7

[PATCH] thermal: stm32: fix spelling mistake "acces" -> "access"

2020-05-03 Thread Christophe JAILLET
Fix a typo in Kconfig. Signed-off-by: Christophe JAILLET --- drivers/thermal/st/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/st/Kconfig b/drivers/thermal/st/Kconfig index 3c3b695cc3e9..58ece381956b 100644 --- a/drivers/thermal/st/Kconfig +++ b

[PATCH] clk: clk-xgene: Fix a typo in Kconfig

2020-05-03 Thread Christophe JAILLET
s/Sypport/Support Signed-off-by: Christophe JAILLET --- drivers/clk/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index bcb257baed06..99ddc1478493 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -252,7 +252,7

[PATCH] usb: gadget: audio: Fix a missing error return value in audio_bind()

2020-05-03 Thread Christophe JAILLET
If 'usb_otg_descriptor_alloc()' fails, we must return an error code, not 0. Fixes: 56023ce0fd70 ("usb: gadget: audio: allocate and init otg descriptor by otg capabilities") Signed-off-by: Christophe JAILLET --- drivers/usb/gadget/legacy/audio.c | 4 +++- 1 file changed, 3 insert

[PATCH] powerpc/powernv: Fix a warning message

2020-05-02 Thread Christophe JAILLET
Fix a cut'n'paste error in a warning message. This should be 'cpu-idle-state-residency-ns' to match the property searched in the previous 'of_property_read_u32_array()' Fixes: 9c7b185ab2fe ("powernv/cpuidle: Parse dt idle properties into global structure") Signed-off-by: Christop

Re: [PATCH 4/4 v2] firmware: stratix10-svc: Slightly simplify code

2020-05-02 Thread Christophe JAILLET
Le 01/05/2020 à 18:55, Richard Gong a écrit : Hi, On 5/1/20 10:48 AM, Christophe JAILLET wrote: Le 01/05/2020 à 17:40, Richard Gong a écrit : Hi, On 4/29/20 1:52 AM, Christophe JAILLET wrote: Replace 'devm_kmalloc_array(... | __GFP_ZERO)' with the equivalent and shorter 'devm_kcalloc

Re: [PATCH 4/4 v2] firmware: stratix10-svc: Slightly simplify code

2020-05-01 Thread Christophe JAILLET
Le 01/05/2020 à 17:40, Richard Gong a écrit : Hi, On 4/29/20 1:52 AM, Christophe JAILLET wrote: Replace 'devm_kmalloc_array(... | __GFP_ZERO)' with the equivalent and shorter 'devm_kcalloc(...)'. It doesn't make much sense. Actually devm_kcalloc returns devm_kmalloc_array(.., flag

[PATCH] drm/stm: Fix an error handling path in 'stm_drm_platform_probe()'

2020-05-01 Thread Christophe JAILLET
If 'drm_dev_register()' fails, a call to 'drv_load()' must be undone, as already done in the remove function. Fixes: b759012c5fa7 ("drm/stm: Add STM32 LTDC driver") Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/stm/drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletio

[PATCH] dmaengine: sf-pdma: Simplify the error handling path in 'sf_pdma_probe()'

2020-05-01 Thread Christophe JAILLET
There is no need to explicitly free memory that have been 'devm_kzalloc'ed. Simplify the probe function accordingly. Signed-off-by: Christophe JAILLET --- drivers/dma/sf-pdma/sf-pdma.c | 25 +++-- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/drivers/dma/sf

Re: [PATCH] video: fbdev: pxa3xx_gcu: Fix some resource leak in an error handling path in 'pxa3xx_gcu_probe()'

2020-04-29 Thread Christophe JAILLET
Le 29/04/2020 à 14:25, Dan Carpenter a écrit : On Wed, Apr 29, 2020 at 06:34:38AM +0200, Christophe JAILLET wrote: If an error occurs in the loop where we call 'pxa3xx_gcu_add_buffer()', any resource already allocated should be freed. In order to fix it, add a call to 'pxa3xx_gcu_free_buffers

[PATCH] video: pxafb: Fix the function used to balance a 'dma_alloc_coherent()' call

2020-04-29 Thread Christophe JAILLET
Signed-off-by: Christophe JAILLET --- drivers/video/fbdev/pxafb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index 00b96a78676e..6f972bed410a 100644 --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -2417

[PATCH 1/4 v2] firmware: stratix10-svc: Fix genpool creation error handling

2020-04-29 Thread Christophe JAILLET
t;) Signed-off-by: Christophe JAILLET --- drivers/firmware/stratix10-svc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/firmware/stratix10-svc.c b/drivers/firmware/stratix10-svc.c index d5f0769f3761..3a176e62754a 100644 --- a/drivers/firmware/stratix10-s

[PATCH 4/4 v2] firmware: stratix10-svc: Slightly simplify code

2020-04-29 Thread Christophe JAILLET
Replace 'devm_kmalloc_array(... | __GFP_ZERO)' with the equivalent and shorter 'devm_kcalloc(...)'. 'ctrl->genpool' can not be NULL, so axe a useless test in the remove function. Signed-off-by: Christophe JAILLET --- drivers/firmware/stratix10-svc.c | 6 ++ 1 file changed, 2 inserti

[PATCH 2/4 v2] firmware: stratix10-svc: Unmap some previously memremap'ed memory

2020-04-29 Thread Christophe JAILLET
In 'svc_create_memory_pool()' we memremap some memory. This has to be undone in case of error and if the driver is removed. The easiest way to do it is to use 'devm_memremap()'. Fixes: 7ca5ce896524 ("firmware: add Intel Stratix10 service layer driver") Signed-off-by: Christop

<    1   2   3   4   5   6   7   8   9   10   >