Greg,
On Fri, Aug 30, 2024 at 12:11:53AM GMT, Vitaly Chikunov wrote:
Greg, Sasha,
On Tue, Aug 27, 2024 at 04:38:30PM GMT, Greg Kroah-Hartman wrote:
6.1-stable review patch. If anyone has any objections, please let me know.
We got v6.1.107 build error on ppc64le due to this commit, with:
CC drivers/video/fbdev/offb.o
drivers/video/fbdev/offb.c: In function 'offb_init_palette_hacks': drivers/video/fbdev/offb.c:358:24: error: cleanup argument not a function 358 | struct device_node *pciparent __free(device_node) = of_get_parent(dp); | ^~~~~~~~~~~ make[4]: *** [scripts/Makefile.build:250: drivers/video/fbdev/offb.o] Error 1
Where CONFIG_FB_OF is enabled. Perhaps, due to this commit not being picked:
9448e55d032d ("of: Add cleanup.h based auto release via __free(device_node) markings")
I just tested, and cherry-picking this commit over 6.1.107 fixes the build on ppc64le with CONFIG_FB_OF=y.
Thanks,
Thanks,
From: Abdulrasaq Lawani abdulrasaqolawani@gmail.com
[ Upstream commit ce4a7ae84a58b9f33aae8d6c769b3c94f3d5ce76 ]
Replaced instance of of_node_put with __free(device_node) to simplify code and protect against any memory leaks due to future changes in the control flow.
Suggested-by: Julia Lawall julia.lawall@inria.fr Signed-off-by: Abdulrasaq Lawani abdulrasaqolawani@gmail.com Signed-off-by: Helge Deller deller@gmx.de Signed-off-by: Sasha Levin sashal@kernel.org
drivers/video/fbdev/offb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c index 91001990e351c..6f0a9851b0924 100644 --- a/drivers/video/fbdev/offb.c +++ b/drivers/video/fbdev/offb.c @@ -355,7 +355,7 @@ static void offb_init_palette_hacks(struct fb_info *info, struct device_node *dp par->cmap_type = cmap_gxt2000; } else if (of_node_name_prefix(dp, "vga,Display-")) { /* Look for AVIVO initialized by SLOF */
struct device_node *pciparent = of_get_parent(dp);
const u32 *vid, *did; vid = of_get_property(pciparent, "vendor-id", NULL); did = of_get_property(pciparent, "device-id", NULL);struct device_node *pciparent __free(device_node) = of_get_parent(dp);
@@ -367,7 +367,6 @@ static void offb_init_palette_hacks(struct fb_info *info, struct device_node *dp if (par->cmap_adr) par->cmap_type = cmap_avivo; }
} else if (dp && of_device_is_compatible(dp, "qemu,std-vga")) {of_node_put(pciparent);
#ifdef __BIG_ENDIAN const __be32 io_of_addr[3] = { 0x01000000, 0x0, 0x0 }; -- 2.43.0