[PATCH] KVM: PPC: Book3S HV nestedv2: Fix an error handling path in gs_msg_ops_kvmhv_nestedv2_config_fill_info()

2024-01-28 Thread Christophe JAILLET
The return value of kvmppc_gse_put_buff_info() is not assigned to 'rc' and 'rc' is uninitialized at this point. So the error handling can not work. Assign the expected value to 'rc' to fix the issue. Fixes: 19d31c5f1157 ("KVM: PPC: Add support for nestedv2 guests") Signed-off-by:

Re: [PATCH 1/1] PCI: layerscape-ep: set 64-bit DMA mask

2023-09-21 Thread Christophe JAILLET
Le 21/09/2023 à 20:35, Frank Li a écrit : On Thu, Sep 21, 2023 at 07:59:51PM +0200, Christophe JAILLET wrote: Le 21/09/2023 à 17:37, Frank Li a écrit : From: Guanhua Gao Set DMA mask and coherent DMA mask to enable 64-bit addressing. Signed-off-by: Guanhua Gao Signed-off-by: Hou Zhiqiang

Re: [PATCH 1/1] PCI: layerscape-ep: set 64-bit DMA mask

2023-09-21 Thread Christophe JAILLET
Le 21/09/2023 à 17:37, Frank Li a écrit : From: Guanhua Gao Set DMA mask and coherent DMA mask to enable 64-bit addressing. Signed-off-by: Guanhua Gao Signed-off-by: Hou Zhiqiang Signed-off-by: Frank Li --- drivers/pci/controller/dwc/pci-layerscape-ep.c | 5 + 1 file changed, 5

Re: [PATCH v4 20/28] wan: qmc_hdlc: Add runtime timeslots changes support

2023-08-21 Thread Christophe JAILLET
Le 18/08/2023 à 18:39, Christophe Leroy a écrit : From: Herve Codina QMC channels support runtime timeslots changes but nothing is done at the QMC HDLC driver to handle these changes. Use existing IFACE ioctl in order to configure the timeslots to use. Signed-off-by: Herve Codina

Re: [PATCH v4 21/28] net: wan: Add framer framework support

2023-08-21 Thread Christophe JAILLET
Le 18/08/2023 à 18:39, Christophe Leroy a écrit : From: Herve Codina A framer is a component in charge of an E1/T1 line interface. Connected usually to a TDM bus, it converts TDM frames to/from E1/T1 frames. It also provides information related to the E1/T1 line. The framer framework provides

Re: [PATCH] powerpc: powermac: Use of_get_cpu_hwid() to read CPU node 'reg'

2023-07-03 Thread Christophe JAILLET
Le 03/07/2023 à 07:26, Michael Ellerman a écrit : On Sun, 19 Mar 2023 09:59:31 -0500, Rob Herring wrote: Replace open coded reading of CPU nodes' "reg" properties with of_get_cpu_hwid() dedicated for this purpose. Applied to powerpc/next. [1/1] powerpc: powermac: Use of_get_cpu_hwid() to

Re: [PATCH] powerpc: powermac: Use of_get_cpu_hwid() to read CPU node 'reg'

2023-07-03 Thread Marion & Christophe JAILLET
Le 03/07/2023 à 19:01, Christophe JAILLET a écrit : Le 03/07/2023 à 07:26, Michael Ellerman a écrit : On Sun, 19 Mar 2023 09:59:31 -0500, Rob Herring wrote: Replace open coded reading of CPU nodes' "reg" properties with of_get_cpu_hwid() dedicated for this purpose. Applied

[PATCH] ASoC: fsl: Simplify an error message

2023-04-16 Thread Christophe JAILLET
dev_err_probe() already display the error code. There is no need to duplicate it explicitly in the error message. Signed-off-by: Christophe JAILLET --- sound/soc/fsl/fsl-asoc-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl

Re: [PATCH linux-next] powerpc/cell/axon_msi: Use dma_zalloc_coherent()

2023-01-17 Thread Christophe JAILLET
Le 17/01/2023 à 10:06, ye.xingc...@zte.com.cn a écrit : From: ye xingchen Instead of using dma_alloc_coherent() and memset() directly use dma_zalloc_coherent(). Hi, dma_zalloc_coherent() has been removed at the very beginning of 2019 in commit dfd32cad146e. It is not existing since

Re: [PATCH] macintosh/adb: Fix warning comparing pointer to 0

2022-11-06 Thread Christophe JAILLET
Le 06/11/2022 à 16:28, wangkail...@jari.cn a écrit : Fix the following coccicheck warning: drivers/macintosh/adb.c:676:14-15: WARNING comparing pointer to 0. Signed-off-by: KaiLong Wang --- drivers/macintosh/adb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] macintosh: Fix warning comparing pointer to 0

2022-11-06 Thread Christophe JAILLET
Le 06/11/2022 à 16:18, wangkail...@jari.cn a écrit : Fix the following coccicheck warning: drivers/macintosh/macio-adb.c:103:13-14: WARNING comparing pointer to 0. Signed-off-by: KaiLong Wang --- drivers/macintosh/macio-adb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] powerpc/sysdev: Remove some duplicate prefix in some messages

2022-10-09 Thread Christophe JAILLET
XIVE interrupt controller") Signed-off-by: Christophe JAILLET --- arch/powerpc/sysdev/xive/native.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/sysdev/xive/native.c b/arch/powerpc/sysdev/xive/native.c index 3925825954bc..19d880ebc5e6 100644 --- a/arc

[PATCH 1/2] cxl: Use the bitmap API to allocate bitmaps

2022-07-11 Thread Christophe JAILLET
Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET --- drivers/misc/cxl/context.c | 2 +- drivers/misc/cxl/guest.c | 2 +- drivers/misc/cxl/irq.c | 3 +-- drivers/misc/cxl/of.c | 5

[PATCH 2/2] cxl: Fix a memory leak in an error handling path

2022-07-11 Thread Christophe JAILLET
A bitmap_zalloc() must be balanced by a corresponding bitmap_free() in the error handling path of afu_allocate_irqs(). Signed-off-by: Christophe JAILLET --- The error handling path should be done in the reversed order but it should work as-is. --- drivers/misc/cxl/irq.c | 1 + 1 file changed, 1

[PATCH] KVM: PPC: Book3S HV: Use the bitmap API to allocate bitmaps

2022-07-09 Thread Christophe JAILLET
Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET --- arch/powerpc/kvm/book3s_hv_uvmem.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kvm/book3s_hv_uvmem.c

[PATCH] powerpc/xive: Fix some incorrect memory allocation

2022-06-25 Thread Christophe JAILLET
oitation of the XIVE interrupt controller") Signed-off-by: Christophe JAILLET --- I don't cross compile, so this patch is NOT compile-tested. --- arch/powerpc/sysdev/xive/spapr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/xive/spapr.c b/arch/powerp

Re: [PATCH] powerpc: powernv: Fix refcount leak bug in opal-powercap

2022-06-18 Thread Christophe JAILLET
Le 17/06/2022 à 07:42, Liang He a écrit : At 2022-06-17 13:01:27, "Christophe JAILLET" wrote: Le 17/06/2022 à 06:20, Liang He a écrit : In opal_powercap_init(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() in fail pa

Re: [PATCH v3] powerpc:85xx: Add missing of_node_put() in sgy_cst1000

2022-06-16 Thread Christophe JAILLET
Le 17/06/2022 à 07:22, Liang He a écrit : In gpio_halt_probe(), of_find_matching_node() will return a node pointer with refcount incremented. We should use of_node_put() in fail path or when it is not used anymore. Signed-off-by: Liang He --- arch/powerpc/platforms/85xx/sgy_cts1000.c | 39

Re: [PATCH] powerpc: powernv: Fix refcount leak bug in opal-powercap

2022-06-16 Thread Christophe JAILLET
Le 17/06/2022 à 06:20, Liang He a écrit : In opal_powercap_init(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() in fail path or when it is not used anymore. Besides, for_each_child_of_node() will automatically *inc* and *dec*

Re: [PATCH v2] arch: powerpc: platforms: 85xx: Add missing of_node_put in sgy_cts1000.c

2022-06-16 Thread Christophe JAILLET
Le 16/06/2022 à 17:19, Liang He a écrit : In gpio_halt_probe(), of_find_matching_node() will return a node pointer with refcount incremented. We should use of_node_put() in each fail path or when it is not used anymore. Signed-off-by: Liang He --- changelog: v2: use goto-label patch style

Re: [PATCH V2] platforms/83xx: Use of_device_get_match_data()

2022-05-24 Thread Christophe JAILLET
Le 25/02/2022 à 02:07, cgel@gmail.com a écrit : From: Minghao Chi (CGEL ZTE) Use of_device_get_match_data() to simplify the code. v1->v2: Add a judgment on the return value of the A function as NULL Reported-by: Zeal Robot Signed-off-by: Minghao Chi (CGEL ZTE) ---

Re: [PATCH 00/16] Remove usage of the deprecated "pci-dma-compat.h" API

2022-02-24 Thread Christophe JAILLET
Le 24/02/2022 à 08:07, Arnd Bergmann a écrit : On Thu, Feb 24, 2022 at 7:25 AM Christoph Hellwig wrote: On Wed, Feb 23, 2022 at 09:26:56PM +0100, Christophe JAILLET wrote: Patch 01, 04, 05, 06, 08, 09 have not reached -next yet. They all still apply cleanly. 04 has been picked it up

Re: [PATCH 00/16] Remove usage of the deprecated "pci-dma-compat.h" API

2022-02-23 Thread Christophe JAILLET
Le 23/02/2022 à 08:46, Christoph Hellwig a écrit : Hi Christophe, do you know what the state is in current linux-next? I think we'll just want to queue up anything left at this point in the dma-mapping or PCI tree and get it done. Hi, Patch 01, 04, 05, 06, 08, 09 have not reached -next

Re: [PATCH] powerpc/xive: Add some error handling code to 'xive_spapr_init()'

2022-02-01 Thread Christophe JAILLET
Le 01/02/2022 à 12:31, Christophe Leroy a écrit : Hi, Le 01/08/2019 à 13:09, Christophe JAILLET a écrit : 'xive_irq_bitmap_add()' can return -ENOMEM. In this case, we should free the memory already allocated and return 'false' to the caller. Also add an error path which undoes the 'tima

[PATCH v2] powerpc/xive: Add some error handling code to 'xive_spapr_init()'

2022-02-01 Thread Christophe JAILLET
'xive_irq_bitmap_add()' can return -ENOMEM. In this case, we should free the memory already allocated and return 'false' to the caller. Also add an error path which undoes the 'tima = ioremap(...)' Signed-off-by: Christophe JAILLET --- NOT compile tested (I don't have a cross compiler and won't

[PATCH] powerpc: platforms: 52xx: Fix a resource leak in an error handling path

2022-01-28 Thread Christophe JAILLET
The error handling path of mpc52xx_lpbfifo_probe() and a request_irq() is not balanced by a corresponding free_irq(). Add the missing call, as already done in the remove function. Fixes: 3c9059d79f5e ("powerpc/5200: add LocalPlus bus FIFO device driver") Signed-off-by: Christop

[PATCH] floppy: Remove usage of the deprecated "pci-dma-compat.h" API

2022-01-02 Thread Christophe JAILLET
gt;dev, e2, e3, e4) [1]: https://lore.kernel.org/kernel-janitors/20200421081257.ga131...@infradead.org/ [2]: https://lore.kernel.org/kernel-janitors/alpine.DEB.2.22.394.2007120902170.2424@hadrien/ Signed-off-by: Christophe JAILLET --- arch/powerpc/include/asm/floppy.h | 8 +--- 1 file chan

[PATCH] powerpc/mpic: Use bitmap_zalloc() when applicable

2021-12-17 Thread Christophe JAILLET
'mpic->protected' is a bitmap. So use 'bitmap_zalloc()' to simplify code and improve the semantic, instead of hand writing it. Signed-off-by: Christophe JAILLET --- arch/powerpc/sysdev/mpic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/mpic.c b/a

[PATCH] net: spider_net: Use non-atomic bitmap API when applicable

2021-11-27 Thread Christophe JAILLET
-by: Christophe JAILLET --- This patch is *not* compile tested. I don't have the needed cross compiling tool chain. --- drivers/net/ethernet/toshiba/spider_net.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/toshiba/spider_net.c b/drivers/net

[PATCH 2/2] soc: fsl: guts: Add a missing memory allocation failure check

2021-11-03 Thread Christophe JAILLET
If 'devm_kstrdup()' fails, we should return -ENOMEM. While at it, move the 'of_node_put()' call in the error handling path and after the 'machine' has been copied. Better safe than sorry. Suggested-by: Tyrel Datwyler Signed-off-by: Christophe JAILLET --- Not sure of which Fixes tag to add

[PATCH 1/2] soc: fsl: guts: Revert commit 3c0d64e867ed

2021-11-03 Thread Christophe JAILLET
This reverts commit 3c0d64e867ed ("soc: fsl: guts: reuse machine name from device tree"). A following patch will fix the missing memory allocation failure check instead. Suggested-by: Tyrel Datwyler Signed-off-by: Christophe JAILLET --- This is a follow-up of discussion

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

2021-08-27 Thread Christophe JAILLET
-janitors/alpine.DEB.2.22.394.2007120902170.2424@hadrien/ Signed-off-by: Christophe JAILLET --- It has *not* been compile tested because I don't have the needed configuration or cross-compiler. However, the modification is completely mechanical and done by coccinelle. --- drivers/net/etherne

[PATCH] powerpc/512x: Fix an error handling path in 'mpc512x_lpbfifo_kick()'

2021-08-21 Thread Christophe JAILLET
At this point 'dma_map_single()' has not been called yet, so there is no point in branching in the error handling path to undo it. Use a direct return instead. Fixes: 1a4bb93f7955 ("powerpc/512x: add LocalPlus Bus FIFO device driver") Signed-off-by: Christophe JAILLET ---

[PATCH] soc: fsl: guts: Fix a resource leak in the error handling path of 'fsl_guts_probe()'

2021-08-18 Thread Christophe JAILLET
when needed. Simplify the remove function accordingly. As an extra benefit, the 'root' global variable can now be removed as well. Fixes: 3c0d64e867ed ("soc: fsl: guts: reuse machine name from device tree") Signed-off-by: Christophe JAILLET --- Compile tested only --- drivers/soc/fsl/g

[PATCH] cxl: Fix an error message

2021-05-05 Thread Christophe JAILLET
Signed-off-by: Christophe JAILLET --- drivers/misc/cxl/file.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/misc/cxl/file.c b/drivers/misc/cxl/file.c index bd3bd32333c5..3dbdce96fae0 100644 --- a/drivers/misc/cxl/file.c +++ b/drivers/misc/cxl/file.c @@ -569,7 +569,8 @@

[PATCH 2/2] powerpc: Save a few lines of code

2021-04-23 Thread Christophe JAILLET
'arch/powerpc/platforms/powermac/feature.c' triggers many checkpatch.pl warnings. The code looks old and not very active, so fixing them all does not make so much sense and will hide some 'git blame' information. So only apply a few fixes that save a few lines of code. Signed-off-by: Christophe

[PATCH 1/2] powerpc: Fix a memory leak in error handling paths

2021-04-23 Thread Christophe JAILLET
If we exit the for_each_of_cpu_node loop early, the reference on the current node must be decremented, otherwise there is a leak. Fixes: a94fe366340a ("powerpc: use for_each_of_cpu_node iterator") Signed-off-by: Christophe JAILLET --- Strangely, the commit above added the needed o

[PATCH] ibmvnic: Use 'skb_frag_address()' instead of hand coding it

2021-04-04 Thread Christophe JAILLET
'page_address(skb_frag_page()) + skb_frag_off()' can be replaced by an equivalent 'skb_frag_address()' which is less verbose. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/ibm/ibmvnic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet

[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] 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

[PATCH 2/2] powerpc/83xx: Add some error handling in 'quirk_mpc8360e_qe_enet10()'

2020-02-08 Thread Christophe JAILLET
In some error handling path, we should call "of_node_put(np_par)" or some resource may be leaking in case of error. Fixes: 8159df72d43e ("83xx: add support for the kmeter1 board.") Signed-off-by: Christophe JAILLET --- arch/powerpc/platforms/83xx/km83xx.c | 5 - 1 file c

[PATCH 1/2] powerpc/83xx: Fix some typo in some warning message

2020-02-08 Thread Christophe JAILLET
"couldn;t" should be "couldn't". Signed-off-by: Christophe JAILLET --- arch/powerpc/platforms/83xx/km83xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/83xx/km83xx.c b/arch/powerpc/platforms/83xx/km83xx.c index ada42f

[PATCH] powerpc/xive: Add some error handling code to 'xive_spapr_init()'

2019-08-01 Thread Christophe JAILLET
'xive_irq_bitmap_add()' can return -ENOMEM. In this case, we should free the memory already allocated and return 'false' to the caller. Also add an error path which undoes the 'tima = ioremap(...)' Signed-off-by: Christophe JAILLET --- NOT compile tested (I don't have a cross compiler and won't

[PATCH 2/2] powerpc/xive: Add a check for memory allocation failure

2019-08-01 Thread Christophe JAILLET
The result of this kzalloc is not checked. Add a check and corresponding error handling code. Signed-off-by: Christophe JAILLET --- Note that 'xive_irq_bitmap_add()' failures are not handled in 'xive_spapr_init()' I guess that it is not really an issue. This function is _init, so if a memory

[PATCH 1/2] powerpc/xive: Use GFP_KERNEL instead of GFP_ATOMIC in 'xive_irq_bitmap_add()'

2019-08-01 Thread Christophe JAILLET
There is no need to use GFP_ATOMIC here. GFP_KERNEL should be enough. GFP_KERNEL is also already used for another allocation just a few lines below. Signed-off-by: Christophe JAILLET --- arch/powerpc/sysdev/xive/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch

[PATCH 0/2] powerpc/xive: 2 small tweaks in 'xive_irq_bitmap_add()'

2019-08-01 Thread Christophe JAILLET
The first patch uses GFP_KERNEL instead of GFP_ATOMIC. The 2nd adds a check for memory allocation failure. Christophe JAILLET (2): powerpc/xive: Use GFP_KERNEL instead of GFP_ATOMIC in 'xive_irq_bitmap_add()' powerpc/xive: Add a check for memory allocation failure arch/powerpc/sysdev

Re: [PATCH] EDAC, mv64x60: Remove some code duplication

2018-01-15 Thread Christophe JAILLET
Le 15/01/2018 à 23:31, Michael Ellerman a écrit : Chris Packham <chris.pack...@alliedtelesis.co.nz> writes: On 14/01/18 06:17, Christophe JAILLET wrote: Le 13/01/2018 à 15:22, Borislav Petkov a écrit : + Chris Packham who's been fixing some stuff in here too. On Sat, Jan 13, 2018 at

[PATCH 2/2] soc/fsl/qe: Slighly simplify code

2017-08-20 Thread Christophe JAILLET
Return 0 instead of 'ret' (which is 0 at this point) to make the code more explicit. Also avoid a useless initialization of 'ret'. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/soc/fsl/qe/qe_tdm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH 1/2] soc/fsl/qe: Fix a potential NULL pointer dereference in an error handling path

2017-08-20 Thread Christophe JAILLET
sl/qe: Add QE TDM lib") Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- This patch is only a guess that sounds logical to me. I propose to remove this 'devm_iounmap' mainly because of its name (if it is managed, why should be manually handle it here ?) --- drivers/soc

[PATCH 2/2] net: fs_enet: Simplify code

2017-02-10 Thread Christophe JAILLET
There is no need to use an intermediate variable to handle an error code in this case. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- I think that the remaining use of 'err' a few lines above could also be dropped. However, it could change the return value (i.e. propa

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

2017-02-10 Thread Christophe JAILLET
'of_node_put(fpi->phy_node)' should also be called if we branch to 'out_deregister_fixed_link' error handling path. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2] powerpc/pseries: Fix missing of_node_put

2017-02-10 Thread Christophe JAILLET
If 'dlpar_configure_connector()' fails, 'parent_dn' should be released. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- v2: Reorder code in order to simplify the proposed patch --- arch/powerpc/platforms/pseries/mobility.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH] powerpc/pseries: Fix missing of_node_put

2017-02-06 Thread Christophe JAILLET
If 'dlpar_configure_connector()' fails, 'parent_dn' should be released as already done in the normal case. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- arch/powerpc/platforms/pseries/mobility.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff

[PATCH] cxl: Fix error handling

2016-10-30 Thread Christophe JAILLET
'cxl_dev_context_init()' returns an error pointer in case of error, not NULL. So test it with IS_ERR. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- un-compiled because I don't have the required cross build environment. --- drivers/misc/cxl/pci.c | 2 +- drivers/mi

[PATCH] cxl: Fix error handling

2016-10-30 Thread Christophe JAILLET
'cxl_dev_context_init()' returns an error pointer in case of error, not NULL. So test it with IS_ERR. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- un-compiled because I don't have the required cross build environment. --- drivers/misc/cxl/api.c | 2 +- 1 file chan

[PATCH] cxl: Fix memory allocation failure test

2016-10-30 Thread Christophe JAILLET
'cxl_context_alloc()' does not return an error pointer. It is just a shortcut for a call to 'kzalloc' with 'sizeof(struct cxl_context)' as the size parameter. So its return value should be compared with NULL. While fixing it, simplify a bit the code. Signed-off-by: Christophe JAILLET

[PATCH] wan/fsl_ucc_hdlc: Fix size used in dma_free_coherent()

2016-10-07 Thread Christophe JAILLET
'%s'" % (y0, y1) //// Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- Untested --- drivers/net/wan/fsl_ucc_hdlc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c index 5fbf8

Inconsistent use of size argument in kzalloc and memcpy in 'drivers/net/ethernet/toshiba/ps3_gelic_wireless.c'

2016-04-11 Thread Christophe JAILLET
Hi, while looking at potential clean-up, I ended on the following code which looks spurious to me. We allocate 'be16_to_cpu(scan_info->size)' bytes, but then copy 'scan_info->size'. This is not consistent. I don't know which one is the correct one. CJ ---

[PATCH v3] powerpc/prom: Avoid reference to potentially freed memory

2015-10-20 Thread Christophe JAILLET
of_get_next_parent to simplify code. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- v2: Fix missing '{' v3: Use of_get_next_parent to simply code *** COMPILE-TESTED ONLY *** --- arch/powerpc/kernel/prom.c | 13 + 1 file changed, 5 insertions(+), 8 del

[PATCH v2] powerpc/prom: Avoid reference to potentially freed memory

2015-10-16 Thread Christophe JAILLET
. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- v2: Fix missing '{' *** COMPILE-TESTED ONLY *** --- arch/powerpc/kernel/prom.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index b

Re: [PATCH v2] powerpc/mpc5xxx: Avoid dereferencing potentially freed memory

2015-10-16 Thread Christophe JAILLET
Le 16/10/2015 11:49, Michael Ellerman a écrit : On Fri, 2015-10-16 at 08:20 +0200, Christophe JAILLET wrote: Le 15/10/2015 08:36, Michael Ellerman a écrit : On Thu, 2015-10-15 at 07:56 +0200, Christophe JAILLET wrote: Use 'of_property_read_u32()' instead of 'of_get_property()'+pointer

Re: [PATCH] powerpc/prom: Avoid reference to potentially freed memory

2015-10-16 Thread Christophe JAILLET
Le 16/10/2015 12:02, Michael Ellerman a écrit : As the kbuild robot detected you have left an extra "}" here. I don't mind too much if you send patches that aren't compile tested, but you might save yourself some time by compiling them. Sorry about it, and thanks for your patience. IMHO, this

Re: [PATCH v2] powerpc/mpc5xxx: Avoid dereferencing potentially freed memory

2015-10-16 Thread Christophe JAILLET
Le 15/10/2015 08:36, Michael Ellerman a écrit : On Thu, 2015-10-15 at 07:56 +0200, Christophe JAILLET wrote: Use 'of_property_read_u32()' instead of 'of_get_property()'+pointer dereference in order to avoid access to potentially freed memory. Use 'of_get_next_parent()' to simplify the while

[PATCH] powerpc/prom: Avoid reference to potentially freed memory

2015-10-16 Thread Christophe JAILLET
. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- *** UNTESTED *** --- arch/powerpc/kernel/prom.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index bef76c5..dc4f6a4 100644 --- a/arch/p

[PATCH v2] powerpc/mpc5xxx: Avoid dereferencing potentially freed memory

2015-10-14 Thread Christophe JAILLET
Use 'of_property_read_u32()' instead of 'of_get_property()'+pointer dereference in order to avoid access to potentially freed memory. Use 'of_get_next_parent()' to simplify the while() loop and avoid the need of a temp variable. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo

[PATCH] powerpc/numa: Use of_get_next_parent to simplify code

2015-10-11 Thread Christophe JAILLET
of_get_next_parent can be used to simplify the while() loop and avoid the need of a temp variable. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- arch/powerpc/mm/numa.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/powerpc/mm/numa.c

[PATCH] powerpc/mpc5xxx: Use of_get_next_parent to simplify code

2015-10-11 Thread Christophe JAILLET
of_get_next_parent can be used to simplify the while() loop and avoid the need of a temp variable. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- arch/powerpc/sysdev/mpc5xxx_clocks.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/p

Re: [PATCH] powerpc/mpc5xxx: Use of_get_next_parent to simplify code

2015-10-11 Thread Christophe JAILLET
Le 11/10/2015 22:44, Julia Lawall a écrit : of_get_next_parent can be used to simplify the while() loop and avoid the need of a temp variable. Can you do something with the loop in __of_translate_address, in drivers/of/address.c? Is there not an iterator for this? julia Hi Julia, There

[PATCH 1/2] powerpc/nvram: Add missing kfree in error path

2015-07-17 Thread Christophe JAILLET
If 'nvram_write_header' fails, then 'new_part' should be freed, otherwise, there is a memory leak. Signed-off-by: Christophe JAILLET christophe.jail...@wanadoo.fr --- This patch is *untested* because I have no way to trigger the error. --- arch/powerpc/kernel/nvram_64.c | 1 + 1 file changed, 1

[PATCH 2/2] powerpc/nvram: Fix function name in some errors messages.

2015-07-17 Thread Christophe JAILLET
'nvram_create_os_partition' should be 'nvram_create_partition'. Use __func__ to have it right, as done elsewhere in this file. Signed-off-by: Christophe JAILLET christophe.jail...@wanadoo.fr --- arch/powerpc/kernel/nvram_64.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions