From 67cbfa95adb7e099383e1a7d40ce97f15c74b47f Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Sun, 5 May 2024 21:22:14 +0100 Subject: [PATCH 1/3] ARM: omap1: Remove unused struct 'dma_link_info' I think the last use of this was removed somewhere around the two: Commit 755cbfd8cf89 ("ARM: OMAP2+: Drop sdma interrupt handling for mach-omap2") and Commit 16630718ee46 ("ARM: omap1: move plat/dma.c to mach/omap-dma.c") Signed-off-by: Dr. David Alan Gilbert Acked-by: Aaro Koskinen Link: https://lore.kernel.org/r/20240505202214.623612-1-linux@treblig.org Signed-off-by: Kevin Hilman --- arch/arm/mach-omap1/omap-dma.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/arch/arm/mach-omap1/omap-dma.c b/arch/arm/mach-omap1/omap-dma.c index 9ee472f8ead1..f091f78631d0 100644 --- a/arch/arm/mach-omap1/omap-dma.c +++ b/arch/arm/mach-omap1/omap-dma.c @@ -59,19 +59,6 @@ static struct omap_dma_dev_attr *d; static int enable_1510_mode; static u32 errata; -struct dma_link_info { - int *linked_dmach_q; - int no_of_lchs_linked; - - int q_count; - int q_tail; - int q_head; - - int chain_state; - int chain_mode; - -}; - static int dma_lch_count; static int dma_chan_count; static int omap_dma_reserve_channels; From fcd5b7401dc4b25880e46769975c85091a3c2946 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Thu, 6 Jun 2024 19:51:04 +0300 Subject: [PATCH 2/3] ARM: omap2: Switch to use kmemdup_array() Let the kmemdup_array() take care about multiplication and possible overflows. Signed-off-by: Andy Shevchenko Reviewed-by: Aaro Koskinen Link: https://lore.kernel.org/r/20240606165104.3031737-1-andriy.shevchenko@linux.intel.com Signed-off-by: Kevin Hilman --- arch/arm/mach-omap2/omap_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index fca7869c8075..800980057373 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c @@ -315,7 +315,7 @@ static struct omap_device *omap_device_alloc(struct platform_device *pdev, od->hwmods_cnt = oh_cnt; - hwmods = kmemdup(ohs, sizeof(struct omap_hwmod *) * oh_cnt, GFP_KERNEL); + hwmods = kmemdup_array(ohs, oh_cnt, sizeof(*hwmods), GFP_KERNEL); if (!hwmods) goto oda_exit2; From 1934b0c82e980df4c9503315bed4e178905cc1d8 Mon Sep 17 00:00:00 2001 From: Gaosheng Cui Date: Tue, 13 Aug 2024 15:11:25 +0800 Subject: [PATCH 3/3] ARM: OMAP1: Remove unused declarations in arch/arm/mach-omap1/pm.h The omap1510_idle_loop_suspend/_sz() and omap1610_idle_loop_suspend/_sz() has been removed since commit feb72f3b313e ("ARM: OMAP1: Remove omap_sram_idle()"), so remove them. Signed-off-by: Gaosheng Cui Link: https://lore.kernel.org/r/20240813071125.1044697-1-cuigaosheng1@huawei.com Signed-off-by: Kevin Hilman --- arch/arm/mach-omap1/pm.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/arm/mach-omap1/pm.h b/arch/arm/mach-omap1/pm.h index d4373a5c4697..b2763fb097ea 100644 --- a/arch/arm/mach-omap1/pm.h +++ b/arch/arm/mach-omap1/pm.h @@ -114,13 +114,9 @@ extern void omap1_pm_suspend(void); extern void omap1510_cpu_suspend(unsigned long, unsigned long); extern void omap1610_cpu_suspend(unsigned long, unsigned long); -extern void omap1510_idle_loop_suspend(void); -extern void omap1610_idle_loop_suspend(void); extern unsigned int omap1510_cpu_suspend_sz; extern unsigned int omap1610_cpu_suspend_sz; -extern unsigned int omap1510_idle_loop_suspend_sz; -extern unsigned int omap1610_idle_loop_suspend_sz; #ifdef CONFIG_OMAP_SERIAL_WAKE extern void omap_serial_wake_trigger(int enable);