Skip to contentSkip to conversation

powerpc/spufs: fix the type of ret in spufs_arch_write_note

PATCH Applied Christoph Hellwig 2 participants 2 messages Jun 10, 2020 – Jul 24, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/spufs: fix the type of ret in spufs_arch_write_note

Both the ->dump method and snprintf return an int. So switch to an int and properly handle errors from ->dump.

Fixes 5456ffdee666 ("powerpc/spufs: simplify spufs core dumping")
---
 arch/powerpc/platforms/cell/spufs/coredump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/cell/spufs/coredump.c +1 -1
index 3b75e8f60609cb..014d1c045bc3cf 100644
@@ -105,7 +105,7 @@ static int spufs_arch_write_note(struct spu_context *ctx, int i,
 	size_t sz = spufs_coredump_read[i].size;
 	char fullname[80];
 	struct elf_note en;
-	size_t ret;
+	int ret;
 
 	sprintf(fullname, "SPU/%d/%s", dfd, spufs_coredump_read[i].name);
 	en.n_namesz = strlen(fullname) + 1;
Signature · 1 line
2.26.2