[PATCH] dmaengine: ti: k3-udma: Fix a resource leak in an error handling path

2021-01-23 Thread Christophe JAILLET
In 'dma_pool_create()', we return -ENOMEM, but don't release the resources already allocated, as in all the other error handling paths. Go to 'err_res_free' instead of returning directly. Fixes: 017794739702 ("dmaengine: ti: k3-udma: Initial support for K3 BCDMA") Signed-off-by:

[PATCH] driver core: Fix a reource leak in 'fw_devlink_create_devlink()'

2021-01-23 Thread Christophe JAILLET
In 'fw_devlink_create_devlink()', all exit paths, successful or not, release the reference taken on 'sup_dev'. All but this one. Use the existing error handling case to call the missing 'put_device()'. Fixes: f9aa460672c9c ("driver core: Refactor fw_devlink feature") Signed-off-by:

[PATCH v2 2/2] cpufreq: brcmstb-avs-cpufreq: Fix some resource leaks in the remove function

2021-01-17 Thread Christophe JAILLET
If 'cpufreq_unregister_driver()' fails, just WARN and continue, so that other resources are freed. Fixes: de322e085995 ("cpufreq: brcmstb-avs-cpufreq: AVS CPUfreq driver for Broadcom STB SoCs") Signed-off-by: Christophe JAILLET --- v1->v2: New patch --- drivers/cpufreq/brcmstb-

[PATCH v2 1/2] cpufreq: brcmstb-avs-cpufreq: Fix some resource leaks in the error handling path of the probe function

2021-01-17 Thread Christophe JAILLET
). Fixes: de322e085995 ("cpufreq: brcmstb-avs-cpufreq: AVS CPUfreq driver for Broadcom STB SoCs") Signed-off-by: Christophe JAILLET --- v1->v2: be less verbose when writing the error handling path of the probe --- drivers/cpufreq/brcmstb-avs-cpufreq.c | 21 - 1 fil

[PATCH] rapidio/tsi721: Use dma_set_mask_and_coherent to simplify code

2021-01-17 Thread Christophe JAILLET
'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. Signed-off-by: Christophe JAILLET --- drivers/rapidio/devices/tsi721.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git

[PATCH] scsi: pm80xx: switch from 'pci_' to 'dma_' API

2021-01-17 Thread Christophe JAILLET
2) +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-janitors=158745678307186=4 --- drivers/

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

2021-01-17 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-janitors=15

[PATCH] media: cx25821: Fix a bug when reallocating some dma memory

2021-01-16 Thread Christophe JAILLET
emove bogus btcx_risc dependency) Signed-off-by: Christophe JAILLET --- Completly speculative and untested. --- drivers/media/pci/cx25821/cx25821-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/pci/cx25821/cx25821-core.c b/drivers/media/pci/cx25821/cx2

[PATCH] media: smipcie: switch from 'pci_' to 'dma_' API

2021-01-15 Thread Christophe JAILLET
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-janitors=158745678307186=4 --- drivers/media/pci/s

[PATCH] media: saa7164: switch from 'pci_' to 'dma_' API

2021-01-15 Thread Christophe JAILLET
;dev, e2, e3, e4) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +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

Re: [PATCH][next] drm/amdgpu: Add missing BOOTUP_DEFAULT to profile_name[]

2021-01-15 Thread Christophe JAILLET
Le 15/01/2021 à 11:10, Colin Ian King a écrit : On 15/01/2021 10:07, Christophe JAILLET wrote: Le 15/01/2021 à 10:37, Colin Ian King a écrit : On 12/01/2021 10:07, Dan Carpenter wrote: On Mon, Jan 11, 2021 at 11:46:38AM +, Colin King wrote: From: Colin Ian King A recent change added

Re: [PATCH][next] drm/amdgpu: Add missing BOOTUP_DEFAULT to profile_name[]

2021-01-15 Thread Christophe JAILLET
Le 15/01/2021 à 10:37, Colin Ian King a écrit : On 12/01/2021 10:07, Dan Carpenter wrote: On Mon, Jan 11, 2021 at 11:46:38AM +, Colin King wrote: From: Colin Ian King A recent change added a new BOOTUP_DEFAULT power profile mode to the PP_SMC_POWER_PROFILE enum but omitted updating the

[PATCH] mlxsw: pci: switch from 'pci_' to 'dma_' API

2021-01-14 Thread Christophe JAILLET
(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-janitors=1

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

2021-01-13 Thread Christophe JAILLET
) +dma_sync_sg_for_device(>dev, e2, e3, e4) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +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_coher

[PATCH] habanalabs: Use 'dma_set_mask_and_coherent()' instead of hand-writing it

2020-12-29 Thread Christophe JAILLET
Axe 'hl_pci_set_dma_mask()' and replace it with an equivalent 'dma_set_mask_and_coherent()' call. This makes the code a bit less verbose. It also removes an erroneous comment, because 'hl_pci_set_dma_mask()' does not try to use a fall-back value. Signed-off-by: Christophe JAILLET --- drivers

[PATCH] ASoC: Intel: common: Fix some typos

2020-12-29 Thread Christophe JAILLET
s/apci/acpi/ Turn an ICL into a TGL because it is likely a cut'n'paste error Signed-off-by: Christophe JAILLET --- sound/soc/intel/common/soc-acpi-intel-ehl-match.c | 2 +- sound/soc/intel/common/soc-acpi-intel-tgl-match.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] cpufreq: brcmstb-avs-cpufreq: Fix some resource leaks in the error handling path of the probe function

2020-12-27 Thread Christophe JAILLET
Le 22/12/2020 à 05:35, Viresh Kumar a écrit : On 19-12-20, 11:17, Christophe JAILLET wrote: If 'cpufreq_register_driver()' fails, we must release the resources allocated in 'brcm_avs_prepare_init()' as already done in the remove function. To do that, introduce a new function

Re: [PATCH] irqdomain: Add documentation for irq_create_of_mapping()

2020-12-19 Thread Marion & Christophe JAILLET
Le 18/12/2020 à 19:59, Marc Zyngier a écrit : Hi Christophe, On Tue, 15 Dec 2020 20:07:47 +, Christophe JAILLET wrote: Add a description for 'irq_create_of_mapping()' and make explicit the fact that the resources allocated by this function can be freed by calling 'irq_dispose_mapping

[PATCH] dmaengine: milbeaut-xdmac: Fix a resource leak in the error handling path of the probe function

2020-12-19 Thread Christophe JAILLET
'disable_xdmac()' should be called in the error handling path of the probe function to undo a previous 'enable_xdmac()' call, as already done in the remove function. Fixes: a6e9be055d47 ("dmaengine: milbeaut-xdmac: Add XDMAC driver for Milbeaut platforms") Signed-off-by: Christop

[PATCH] dmaengine: mediatek: mtk-hsdma: Fix a resource leak in the error handling path of the probe function

2020-12-19 Thread Christophe JAILLET
t;) Signed-off-by: Christophe JAILLET --- 'mtk_hsdma_hw_init()' can return an error code, it could be good to check it as well. --- drivers/dma/mediatek/mtk-hsdma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/mediatek/mtk-hsdma.c b/drivers/dma/mediatek/mtk-hsdma.c index f1

[PATCH] cpufreq: brcmstb-avs-cpufreq: Fix some resource leaks in the error handling path of the probe function

2020-12-19 Thread Christophe JAILLET
). Fixes: de322e085995 ("cpufreq: brcmstb-avs-cpufreq: AVS CPUfreq driver for Broadcom STB SoCs") Signed-off-by: Christophe JAILLET --- I'm not sure that the existing error handling in the remove function is correct and/or needed. --- drivers/cpufreq/brcmstb-avs-cpuf

[PATCH] hwrng: ingenic - Fix a resource leak in an error handling path

2020-12-18 Thread Christophe JAILLET
In case of error, we should call 'clk_disable_unprepare()' to undo a previous 'clk_prepare_enable()' call, as already done in the remove function. Fixes: 406346d22278 ("hwrng: ingenic - Add hardware TRNG for Ingenic X1830") Signed-off-by: Christophe JAILLET --- drivers/char/hw_rand

[PATCH] soc: ti: pm33xx: Fix some resource leak in the error handling paths of the probe function

2020-12-18 Thread Christophe JAILLET
dling path of the probe function now. Fixes: 2152fbbd47c0 ("soc: ti: pm33xx: Simplify RTC usage to prepare to drop platform data") Signed-off-by: Christophe JAILLET --- drivers/soc/ti/pm33xx.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/soc/ti/pm33xx.c b/dri

Re: [PATCH] mmc: sdhci-sprd: Fix some resource leaks in the remove function

2020-12-18 Thread Christophe JAILLET
Le 17/12/2020 à 23:55, Orson Zhai a écrit : + cc: Billows Hi Christophe, On Fri, Dec 18, 2020 at 4:50 AM Christophe JAILLET wrote: 'sdhci_remove_host()' and 'sdhci_pltfm_free()' should be used in place of 'mmc_remove_host()' and 'mmc_free_host()'. This avoids some resource leaks, is more

[PATCH] mmc: usdhi6rol0: Fix a resource leak in the error handling path of the probe

2020-12-17 Thread Christophe JAILLET
Signed-off-by: Christophe JAILLET --- drivers/mmc/host/usdhi6rol0.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c index e2d5112d809d..615f3d008af1 100644 --- a/drivers/mmc/host/usdhi6rol0.c +++ b/driver

[PATCH] mmc: sdhci-sprd: Fix some resource leaks in the remove function

2020-12-17 Thread Christophe JAILLET
sdhci-sprd: Add Spreadtrum's initial host controller") Signed-off-by: Christophe JAILLET --- Other adjustment may be needed. I'm not sure at all of the 0 passed to 'sdhci_remove_host()'. Some drivers pass 0, some have some more complicated computation. --- drivers/mmc/host/sdhci-sprd.c | 6 +++-

[PATCH] media: venus: core: Fix a resource leak in error handling paths of the probe function

2020-12-17 Thread Christophe JAILLET
Add 2 missing 'icc_put()' calls in the error handling path of the probe function, as already done in the remove function. Fixes: 32f0a6ddc8c9 ("media: venus: Use on-chip interconnect API") Signed-off-by: Christophe JAILLET --- drivers/media/platform/qcom/venus/c

[PATCH V2] irqdomain: Add documentation for irq_create_of_mapping()

2020-12-15 Thread Christophe JAILLET
Add a description for 'irq_create_of_mapping()' and make explicit the fact that the resources allocated by this function can be freed by calling 'irq_dispose_mapping()' when needed (i.e. error handling path, remove function, ...) Signed-off-by: Christophe JAILLET --- The wording can certainly

Re: [PATCH] net: allwinner: Fix some resources leak in the error handling path of the probe and in the remove function

2020-12-15 Thread Christophe JAILLET
Le 15/12/2020 à 20:35, Dan Carpenter a écrit : On Tue, Dec 15, 2020 at 08:08:15PM +0100, Maxime Ripard wrote: On Tue, Dec 15, 2020 at 07:18:48PM +0100, Christophe JAILLET wrote: Le 15/12/2020 à 12:37, Maxime Ripard a écrit : On Tue, Dec 15, 2020 at 12:11:53PM +0300, Dan Carpenter wrote

[PATCH] irqdomain: Add documentation for irq_create_of_mapping()

2020-12-15 Thread Christophe JAILLET
Add a description for 'irq_create_of_mapping()' and make explicit the fact that the resources allocated by this function can be freed by calling 'irq_dispose_mapping()' when needed (i.e. error handling path, remove function, ...) Signed-off-by: Christophe JAILLET --- The wording can certainly

Re: [PATCH] net: allwinner: Fix some resources leak in the error handling path of the probe and in the remove function

2020-12-15 Thread Christophe JAILLET
Le 15/12/2020 à 12:37, Maxime Ripard a écrit : On Tue, Dec 15, 2020 at 12:11:53PM +0300, Dan Carpenter wrote: On Tue, Dec 15, 2020 at 09:56:55AM +0100, Maxime Ripard wrote: Hi, On Mon, Dec 14, 2020 at 09:21:17PM +0100, Christophe JAILLET wrote: 'irq_of_parse_and_map()' should be balanced

[PATCH] net: allwinner: Fix some resources leak in the error handling path of the probe and in the remove function

2020-12-14 Thread Christophe JAILLET
found on Allwinner A10 SoC's") Signed-off-by: Christophe JAILLET --- Please, carefully check the remove function, I'm not always confident by the correct order when releasing resources. This is sometimes tricky. --- drivers/net/ethernet/allwinner/sun4i-emac.c | 7 +-- 1 file changed, 5 insert

Re: [PATCH] net: mscc: ocelot: Fix a resource leak in the error handling path of the probe function

2020-12-14 Thread Christophe JAILLET
Le 14/12/2020 à 12:48, Dan Carpenter a écrit : On Sun, Dec 13, 2020 at 12:48:38PM +0100, Christophe JAILLET wrote: In case of error after calling 'ocelot_init()', it must be undone by a corresponding 'ocelot_deinit()' call, as already done in the remove function. This changes the behavior

[PATCH] staging: mt7621-dma: Fix a resource leak in an error handling path

2020-12-13 Thread Christophe JAILLET
If an error occurs after calling 'mtk_hsdma_init()', it must be undone by a corresponding call to 'mtk_hsdma_uninit()' as already done in the remove function. Fixes: 0853c7a53eb3 ("staging: mt7621-dma: ralink: add rt2880 dma engine") Signed-off-by: Christophe JAILLET --- drivers/stag

[PATCH] staging: spmi: hisi-spmi-controller: Fix some error handling paths

2020-12-13 Thread Christophe JAILLET
/spmi_controller_add/) Signed-off-by: Christophe JAILLET --- .../staging/hikey9xx/hisi-spmi-controller.c | 21 +-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/staging/hikey9xx/hisi-spmi-controller.c b/drivers/staging/hikey9xx/hisi-spmi-controller.c index

[PATCH] net: mscc: ocelot: Fix a resource leak in the error handling path of the probe function

2020-12-13 Thread Christophe JAILLET
In case of error after calling 'ocelot_init()', it must be undone by a corresponding 'ocelot_deinit()' call, as already done in the remove function. Fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support") Signed-off-by: Christophe JAILLET --- drivers/net/eth

[PATCH] net: bcmgenet: Fix a resource leak in an error handling path in the probe functin

2020-12-12 Thread Christophe JAILLET
If the 'register_netdev()' call fails, we must undo a previous 'bcmgenet_mii_init()' call. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Christophe JAILLET --- The missing 'bcmgenet_mii_exit()' call is added here, instead of in the error handling pat

[PATCH] media: vsp1: Fix an error handling path in the probe function

2020-12-12 Thread Christophe JAILLET
A previous 'rcar_fcp_get()' call must be undone in the error handling path, as already done in the remove function. Fixes: 94fcdf829793 ("[media] v4l: vsp1: Add FCP support") Signed-off-by: Christophe JAILLET --- drivers/media/platform/vsp1/vsp1_drv.c | 4 +++- 1 file changed, 3

[PATCH] dmaengine: owl-dma: Fix a resource leak in the remove function

2020-12-12 Thread Christophe JAILLET
A 'dma_pool_destroy()' call is missing in the remove function. Add it. This call is already made in the error handling path of the probe function. Fixes: 47e20577c24d ("dmaengine: Add Actions Semi Owl family S900 DMA driver") Signed-off-by: Christophe JAILLET --- drivers/dma/owl-dma.

[PATCH 2/2] dmaengine: fsldma: Fix a resource leak in an error handling path of the probe function

2020-12-12 Thread Christophe JAILLET
f620b2c4fe ("fsldma: simplify IRQ probing and handling") Signed-off-by: Christophe JAILLET --- Patch provided as-is. I don't have the configuration to compile test this patch --- drivers/dma/fsldma.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/dma/fsldma.c b/driver

[PATCH 1/2] dmaengine: fsldma: Fix a resource leak in the remove function

2020-12-12 Thread Christophe JAILLET
sldma: simplify IRQ probing and handling") Fixes: 77cd62e8082b ("fsldma: allow Freescale Elo DMA driver to be compiled as a module") Signed-off-by: Christophe JAILLET --- Patch provided as-is. I don't have the configuration to compile test this patch --- drivers/dma/fsldma.c | 1

[PATCH] sata_fsl: Fix a resource leak in an error handling path in the probe function

2020-12-12 Thread Christophe JAILLET
'irq_dispose_mapping()' should be called in the error handling path of the probe function, as already done in the remove function. Fixes: 6b4b8fc87dc5 ("sata_fsl: add support for interrupt coalsecing feature") Signed-off-by: Christophe JAILLET --- drivers/ata/sata_fsl.c | 3 +++ 1 fi

[PATCH] clk: s2mps11: Fix a resource leak in error handling paths in the probe function

2020-12-12 Thread Christophe JAILLET
11: Add support for s2mps11") Signed-off-by: Christophe JAILLET --- drivers/clk/clk-s2mps11.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index aa21371f9104..a3e883a9f406 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps1

[PATCH] Bluetooth: btqcomsmd: Fix a resource leak in error handling paths in the probe function

2020-12-12 Thread Christophe JAILLET
roduce Qualcomm WCNSS SMD based HCI driver") Signed-off-by: Christophe JAILLET --- drivers/bluetooth/btqcomsmd.c | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/drivers/bluetooth/btqcomsmd.c b/drivers/bluetooth/btqcomsmd.c index 98d53764871f.

Re: [PATCH] checkpatch: Fix "Missing a blank line after declarations" test on patches

2020-12-10 Thread Christophe JAILLET
Le 10/12/2020 à 19:13, Joe Perches a écrit : On Thu, 2020-12-10 at 18:52 +0100, Christophe JAILLET wrote: "Missing a blank line after declarations" is not triggered on patches. That's not true. It does work on any patch that does a new function addition. There are some pat

Re: [PATCH] cxl: Reduce scope for the variable “mm” in cxllib_get_PE_attributes()

2020-12-10 Thread Christophe JAILLET
Le 10/12/2020 à 17:04, Markus Elfring a écrit : A local variable was used only within an if branch. Thus move the definition for the variable “mm” into the corresponding code block. You did nothing here except add a checkpatch warning :( elfring@Sonne:~/Projekte/Linux/next-patched>

[PATCH] checkpatch: Fix "Missing a blank line after declarations" test on patches

2020-12-10 Thread Christophe JAILLET
"Missing a blank line after declarations" is not triggered on patches. Tweak the regex to match such cases. Signed-off-by: Christophe JAILLET --- This patch is mostly a PoC. I don't know enough about checkpatch.pl to be sure that the fix is the right thing to do. At least, it wo

[PATCH 2/2] video: fbdev: Fix a dev_err format specifier

2020-12-10 Thread Christophe JAILLET
'phys_addr' is of type 'dma_addr_t'. Use '%pad' instead of '%x' to print this variable in an error message. Signed-off-by: Christophe JAILLET --- drivers/video/fbdev/ep93xx-fb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/ep93xx-fb.c b/drivers

[PATCH 1/2] video: fbdev: Use framebuffer_release instead of kfree to free a frame buffer

2020-12-10 Thread Christophe JAILLET
Use 'framebuffer_release()' instead of 'kfree()' to undo a 'framebuffer_alloc()' call, both in the error handling path of the probe function and in remove function. Signed-off-by: Christophe JAILLET --- drivers/video/fbdev/ep93xx-fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH] mmc: owl-mmc: Fix a resource leak in an error handling path and in the remove function

2020-12-09 Thread Christophe JAILLET
'dma_request_chan()' calls should be balanced by a corresponding 'dma_release_channel()' call. Add the missing call both in the error handling path of the probe function and in the remove function. Fixes: ff65ffe46d28 ("mmc: Add Actions Semi Owl SoCs SD/MMC driver") Signed-off-by:

[PATCH] mmc: mxs-mmc: Fix a resource leak in an error handling path in 'mxs_mmc_probe()'

2020-12-08 Thread Christophe JAILLET
If 'mmc_of_parse()' fails, we must undo the previous 'dma_request_chan()' call. Fixes: abd37cccd47f ("mmc: mxs: use mmc_gpio_get_ro for detecting read-only status") Signed-off-by: Christophe JAILLET --- I'm not 100% sure of the Fixes tag, but it seems to be the root cause. The

[PATCH] dpaa2-mac: Add a missing of_node_put after of_device_is_available

2020-12-06 Thread Christophe JAILLET
Add an 'of_node_put()' call when a tested device node is not available. Fixes:94ae899b2096 ("dpaa2-mac: add PCS support through the Lynx module") Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 1/2] interconnect: imx: Add a missing of_node_put after of_device_is_available

2020-12-06 Thread Christophe JAILLET
Add an 'of_node_put()' call when a tested device node is not available. Fixes: f0d8048525d7 ("interconnect: Add imx core driver") Signed-off-by: Christophe JAILLET --- drivers/interconnect/imx/imx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/interconnect/imx/imx.c

[PATCH 2/2] interconnect: imx: Remove a useless test

2020-12-06 Thread Christophe JAILLET
'dn' can't be NULL here, it is tested just the line above. Remove this useless test. Signed-off-by: Christophe JAILLET --- drivers/interconnect/imx/imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c index

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

2020-12-05 Thread Christophe JAILLET
2; @@ -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/vme/bridges/vme_ca91cx42.c | 13 ++

[PATCH] misc: genwqe: Use dma_set_mask_and_coherent to simplify code

2020-12-01 Thread Christophe JAILLET
'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. Signed-off-by: Christophe JAILLET --- drivers/misc/genwqe/card_base.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions

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

2020-11-30 Thread Christophe JAILLET
Le 29/11/2020 à 22:46, Heiner Kallweit a écrit : Am 29.11.2020 um 22:17 schrieb Christophe JAILLET: @@ -1817,17 +1817,17 @@ static int mlxsw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) goto err_pci_request_regions; } - err = pci_set_dma_mask(pdev

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

2020-11-29 Thread Christophe JAILLET
apping_error(e1, e2) +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,

Re: [PATCH] Input: Fix a ref counting issue

2020-11-29 Thread Christophe JAILLET
Le 29/11/2020 à 20:49, Dmitry Torokhov a écrit : Hi Christophe, On Sun, Nov 29, 2020 at 09:45:16AM +0100, Christophe JAILLET wrote: In case of a managed resource, 'devm_input_device_release()' already has a 'input_put_device(dev)' call. Avoid a double reference decrement by explicitly

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

2020-11-29 Thread Christophe JAILLET
g_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 Christoph Hellwig on

[PATCH] vdpa: ifcvf: Use dma_set_mask_and_coherent to simplify code

2020-11-29 Thread Christophe JAILLET
'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. While at it, fix a typo (s/confiugration/configuration) Signed-off-by: Christophe JAILLET --- drivers/vdpa/ifcvf/ifcvf_main.c | 11 ++- 1

[PATCH v2] media: saa7146: switch from 'pci_' to 'dma_' API

2020-11-29 Thread Christophe JAILLET
on 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-janitors ML: https://ma

Re: [PATCH NACK] media: saa7146: switch from 'pci_' to 'dma_' API

2020-11-29 Thread Christophe JAILLET
Le 29/11/2020 à 08:38, Christophe JAILLET a écrit : When memory is allocated in 'saa7146_vv_init()' GFP_KERNEL can be used because this function already uses GFP_KERNEL and no lock is taken in the between. When memory is allocated in 'vbi_workaround()' GFP_KERNEL can be used because it is only

[PATCH] Input: Fix a ref counting issue

2020-11-29 Thread Christophe JAILLET
evres support)") Signed-off-by: Christophe JAILLET --- This patch is completely speculative and compile tested only. --- drivers/input/input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/input.c b/drivers/input/input.c index 3cfd2c18eebd..c09c9f020

[PATCH] HID: elan: Fix some error handling path

2020-11-29 Thread Christophe JAILLET
9a6a4193d65b ("HID: Add driver for USB ELAN Touchpad") Signed-off-by: Christophe JAILLET --- drivers/hid/hid-elan.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/hid/hid-elan.c b/drivers/hid/hid-elan.c index dae193749d44..8587f9d2fffb 100644 --- a/drivers/hid/hid-elan.

[PATCH] EDAC/al-mc-edac: Slighly simplify code

2020-11-28 Thread Christophe JAILLET
Use 'devm_add_action_or_reset()' instead of open coding it. This makes the error handling code look more consistent. This also save a few LoC. Signed-off-by: Christophe JAILLET --- drivers/edac/al_mc_edac.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers

[PATCH] media: saa7146: switch from 'pci_' to 'dma_' API

2020-11-28 Thread Christophe JAILLET
on 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-janitors ML: https:

[PATCH] media: ttpci: switch from 'pci_' to 'dma_' API

2020-11-27 Thread Christophe JAILLET
_sync_sg_for_device(>dev, e2, e3, e4) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +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_coher

[PATCH] media: solo6x10: switch from 'pci_' to 'dma_' API

2020-11-27 Thread Christophe JAILLET
(>dev, e2, e3, e4) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +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

Re: [PATCH] crypto: qat - Use dma_set_mask_and_coherent to simplify code

2020-11-26 Thread Christophe JAILLET
Le 26/11/2020 à 13:04, Giovanni Cabiddu a écrit : Hi Christophe, On Sat, Nov 21, 2020 at 07:13:59AM +, Christophe JAILLET wrote: 'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. While

[PATCH] sctp: Fix some typo

2020-11-22 Thread Christophe JAILLET
s/tranport/transport/ Signed-off-by: Christophe JAILLET --- net/sctp/transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 60fcf31cdcfb..bf0ac467e757 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c

[PATCH] ath11k: Fix an error handling path

2020-11-22 Thread Christophe JAILLET
If 'kzalloc' fails, we must return an error code. While at it, remove a useless initialization of 'err' which could hide the issue. Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Christophe JAILLET --- drivers/net/wireless/ath/ath11k

[PATCH 2/2] ath10k: Release some resources in an error handling path

2020-11-22 Thread Christophe JAILLET
Should an error occur after calling 'ath10k_usb_create()', it should be undone by a corresponding 'ath10k_usb_destroy()' call Fixes: 4db66499df91 ("ath10k: add initial USB support") Signed-off-by: Christophe JAILLET --- This patch is speculative and compile tested only. --- drivers/ne

[PATCH 1/2] ath10k: Fix an error handling path

2020-11-22 Thread Christophe JAILLET
If 'ath10k_usb_create()' fails, we should release some resources and report an error instead of silently continuing. Fixes: 4db66499df91 ("ath10k: add initial USB support") Signed-off-by: Christophe JAILLET --- drivers/net/wireless/ath/ath10k/usb.c | 2 ++ 1 file changed, 2 insertion

[PATCH] IB/qib: Use dma_set_mask_and_coherent to simplify code

2020-11-21 Thread Christophe JAILLET
'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. Signed-off-by: Christophe JAILLET --- drivers/infiniband/hw/qib/qib_pcie.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff

[PATCH 2/2] net: pch_gbe: Use 'dma_free_coherent()' to undo 'dma_alloc_coherent()'

2020-11-21 Thread Christophe JAILLET
Memory allocation are done with 'dma_alloc_coherent()'. Be consistent and use 'dma_free_coherent()' to free the corresponding memory. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff

[PATCH 1/2] net: pch_gbe: Use dma_set_mask_and_coherent to simplify code

2020-11-21 Thread Christophe JAILLET
'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. Signed-off-by: Christophe JAILLET --- .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 14 -- 1 file changed, 4 insertions(+), 10

[PATCH V2] ALSA: emu10k1: Use dma_set_mask_and_coherent to simplify code

2020-11-21 Thread Christophe JAILLET
'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. Signed-off-by: Christophe JAILLET --- v2: do not update the dev_err message, to keep consistency with other dev_err --- sound/pci/emu10k1/emu10k1x.c

[PATCH] ALSA: emu10k1: Use dma_set_mask_and_coherent to simplify code

2020-11-21 Thread Christophe JAILLET
e line above. Signed-off-by: Christophe JAILLET --- sound/pci/emu10k1/emu10k1x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c index def8161cde4c..f2b6fd434474 100644 --- a/sound/pci/emu10k1/emu10k1x.c +++ b

[PATCH] crypto: cavium - Use dma_set_mask_and_coherent to simplify code

2020-11-20 Thread Christophe JAILLET
'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. Signed-off-by: Christophe JAILLET --- drivers/crypto/cavium/cpt/cptpf_main.c | 10 ++ drivers/crypto/cavium/cpt/cptvf_main.c | 10

[PATCH] crypto: marvell/octeontx - Use dma_set_mask_and_coherent to simplify code

2020-11-20 Thread Christophe JAILLET
'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. Signed-off-by: Christophe JAILLET --- drivers/crypto/marvell/octeontx/otx_cptpf_main.c | 10 ++ drivers/crypto/marvell/octeontx

[PATCH] crypto: cavium/zip - Use dma_set_mask_and_coherent to simplify code

2020-11-20 Thread Christophe JAILLET
'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. Signed-off-by: Christophe JAILLET --- drivers/crypto/cavium/zip/zip_main.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff

[PATCH] crypto: qat - Use dma_set_mask_and_coherent to simplify code

2020-11-20 Thread Christophe JAILLET
'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. While at it, also remove some unless extra () in the 32 bits case. Signed-off-by: Christophe JAILLET --- Instead of returning -EFAULT, we could also

Re: [PATCH net] atl1c: fix error return code in atl1c_probe()

2020-11-17 Thread Marion & Christophe JAILLET
Le 17/11/2020 à 03:55, Zhang Changzhong a écrit : Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 85eb5bc33717 ("net: atheros: switch from 'pci_' to 'dma_' API") Hi, should it have any importance, the Fixes tag is

Re: [PATCH net] atl1e: fix error return code in atl1e_probe()

2020-11-17 Thread Marion & Christophe JAILLET
Le 17/11/2020 à 03:57, Zhang Changzhong a écrit : Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 85eb5bc33717 ("net: atheros: switch from 'pci_' to 'dma_' API") Hi, should it have any importance, the Fixes tag is

[PATCH] iommu/vt-d: Avoid GFP_ATOMIC where it is not needed

2020-10-30 Thread Christophe JAILLET
There is no reason to use GFP_ATOMIC in a 'suspend' function. Use GFP_KERNEL instead to give more opportunities to allocate the requested memory. Signed-off-by: Christophe JAILLET --- Should GFP_ATOMIC be mandatory here, a comment explaining why would be great --- drivers/iommu/intel/iommu.c

Re: [PATCH] staging: wfx: make a const array static, makes object smaller

2020-10-19 Thread Christophe JAILLET
Le 17/10/2020 à 02:11, Joe Perches a écrit : On Fri, 2020-10-16 at 23:33 +0100, Colin King wrote: From: Colin Ian King Don't populate const array filter_ies on the stack but instead make it static. Makes the object code smaller by 261 bytes. Before: text data bss dec

[PATCH] scsi: isci: Fix a typo in a comment

2020-10-02 Thread Christophe JAILLET
s/remtoe/remote/ and add a missing '.' Signed-off-by: Christophe JAILLET --- drivers/scsi/isci/remote_node_table.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/isci/remote_node_table.h b/drivers/scsi/isci/remote_node_table.h index 721ab982d2ac..0ddfdda2b248

[PATCH] net: typhoon: Fix a typo Typoon --> Typhoon

2020-10-02 Thread Christophe JAILLET
s/Typoon/Typhoon/ Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/3com/typhoon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/3com/typhoon.h b/drivers/net/ethernet/3com/typhoon.h index 2f634c64d5d1..38e6dcab4e94 100644 --- a/drivers/net

[PATCH] ASoC: tlv320adcx140: Fix a typo in a comment

2020-10-02 Thread Christophe JAILLET
It is likely that this header file is about the TLV320ADCX140. (0 and 4 swapped) While at it fix a missing "H" in a comment related to the include guard. Signed-off-by: Christophe JAILLET --- sound/soc/codecs/tlv320adcx140.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH] ASoC: wm8523: Fix a typo in a comment

2020-10-02 Thread Christophe JAILLET
It is likely that this header file is about the WM8523. Signed-off-by: Christophe JAILLET --- sound/soc/codecs/wm8523.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8523.h b/sound/soc/codecs/wm8523.h index 79afbf1e4f1a..5f9bb3df1866 100644 --- a/sound

Re: [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements

2020-09-29 Thread Christophe JAILLET
Le 29/09/2020 à 15:14, Julia Lawall a écrit : Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression

Re: [PATCH 04/20] media: saa7134: use semicolons rather than commas to separate statements

2020-09-29 Thread Christophe JAILLET
Le 29/09/2020 à 15:14, Julia Lawall a écrit : Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression

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

2020-09-27 Thread Christophe JAILLET
Le 27/09/2020 à 21:12, Julia Lawall a écrit : Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall ---

Re: [PATCH] leds: lp50xx: Fix an error handling path in 'lp50xx_probe_dt()'

2020-09-23 Thread Christophe JAILLET
Le 23/09/2020 à 15:35, Dan Carpenter a écrit : I've added Heikki Krogerus to the CC list because my question is mostly about commit 59abd83672f7 ("drivers: base: Introducing software nodes to the firmware node framework"). I have been trying to teach Smatch to understand reference counting so

[PATCH] leds: lp50xx: Fix an error handling path in 'lp50xx_probe_dt()'

2020-09-22 Thread Christophe JAILLET
;leds: lp50xx: Add the LP50XX family of the RGB LED driver") Signed-off-by: Christophe JAILLET --- drivers/leds/leds-lp50xx.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/leds/leds-lp50xx.c b/drivers/leds/leds-lp50xx.c index 47144a37cb94..8178782f2

Re: [PATCH] lib/scatterlist: Avoid a double memset

2020-09-20 Thread Christophe JAILLET
Le 20/09/2020 à 10:32, Julia Lawall a écrit : On Sun, 20 Sep 2020, Joe Perches wrote: On Sun, 2020-09-20 at 09:15 +0200, Christophe JAILLET wrote: 'sgl' is zeroed a few lines below in 'sg_init_table()'. There is no need to clear it twice. Remove the redundant initialization. I didn't

[PATCH] scsi: pmcraid: Fix memory allocation in 'pmcraid_alloc_sglist()'

2020-09-20 Thread Christophe JAILLET
;scsi: pmcraid: Use sgl_alloc_order() and sgl_free_order()") Signed-off-by: Christophe JAILLET --- This patch is completely speculative and untested. Should it be correct, I think that their should be some trouble somewhere. Either NULL pointer dereference or incorrect behavior. The patch that

[PATCH] lib/scatterlist: Avoid a double memset

2020-09-20 Thread Christophe JAILLET
'sgl' is zeroed a few lines below in 'sg_init_table()'. There is no need to clear it twice. Remove the redundant initialization. Signed-off-by: Christophe JAILLET --- lib/scatterlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/scatterlist.c b/lib/scatterlist.c

[PATCH] media: ngene: switch from 'pci_' to 'dma_' API

2020-09-13 Thread Christophe JAILLET
(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/media/pci/ngene/ngene-core.c | 56 ++-- 1

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