public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/2] kexec-tools: powerpc: Fix function signature of comparefunc()
@ 2025-10-22 11:44 John Paul Adrian Glaubitz
  2025-10-22 11:44 ` [PATCH 2/2] kexec-tools: powerpc: Fix pointer declarations in read_memory_region_limits() John Paul Adrian Glaubitz
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: John Paul Adrian Glaubitz @ 2025-10-22 11:44 UTC (permalink / raw)
  To: kexec; +Cc: Khalid Aziz, John Paul Adrian Glaubitz

Fixes the following build error on 32-bit PowerPC:

kexec/arch/ppc/fs2dt.c: In function 'putnode':
kexec/arch/ppc/fs2dt.c:338:51: error: passing argument 4 of 'scandir' from incompatible pointer type [-Wincompatible-pointer-types]
  338 |         numlist = scandir(pathname, &namelist, 0, comparefunc);
      |                                                   ^~~~~~~~~~~
      |                                                   |
      |                                                   int (*)(const void *, const void *)

Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
---
 kexec/arch/ppc/fs2dt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kexec/arch/ppc/fs2dt.c b/kexec/arch/ppc/fs2dt.c
index fed499b..d03b995 100644
--- a/kexec/arch/ppc/fs2dt.c
+++ b/kexec/arch/ppc/fs2dt.c
@@ -292,7 +292,8 @@ static void putprops(char *fn, struct dirent **nlist, int numlist)
  * Compare function used to sort the device-tree directories
  * This function will be passed to scandir.
  */
-static int comparefunc(const void *dentry1, const void *dentry2)
+static int comparefunc(const struct dirent **dentry1,
+		       const struct dirent **dentry2)
 {
 	char *str1 = (*(struct dirent **)dentry1)->d_name;
 	char *str2 = (*(struct dirent **)dentry2)->d_name;
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-12-03 17:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-22 11:44 [PATCH 1/2] kexec-tools: powerpc: Fix function signature of comparefunc() John Paul Adrian Glaubitz
2025-10-22 11:44 ` [PATCH 2/2] kexec-tools: powerpc: Fix pointer declarations in read_memory_region_limits() John Paul Adrian Glaubitz
2025-10-22 15:15 ` [Spam] [PATCH 1/2] kexec-tools: powerpc: Fix function signature of comparefunc() Khalid Aziz
2025-10-22 15:20   ` John Paul Adrian Glaubitz
2025-10-22 15:32     ` Khalid Aziz
2025-11-11 13:31 ` Simon Horman
2025-11-22 11:11 ` John Paul Adrian Glaubitz
2025-12-03 17:24   ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox