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:
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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*
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
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)
---
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
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
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
'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
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
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
'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
-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
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
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
-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
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
---
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
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 @@
'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
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
'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
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
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
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
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
"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
'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
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
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
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
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
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(-)
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
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
'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
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
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
'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
'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
'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
'%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
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
---
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
.
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
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
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
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
.
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
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
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
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
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
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
'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
71 matches
Mail list logo