mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ARC: Remove a redundant memset()
@ 2022-03-22 19:49 Christophe JAILLET
  2022-04-18 19:21 ` Vineet Gupta
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2022-03-22 19:49 UTC (permalink / raw)
  To: Vineet Gupta
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-snps-arc

disasm_instr() already call memset(0) on its 2nd argument, so there is no
need to clear it explicitly before calling this function.

Remove the redundant memset().

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 arch/arc/kernel/disasm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arc/kernel/disasm.c b/arch/arc/kernel/disasm.c
index 03f8b1be0c3a..e9f16d9e113f 100644
--- a/arch/arc/kernel/disasm.c
+++ b/arch/arc/kernel/disasm.c
@@ -503,7 +503,6 @@ int __kprobes disasm_next_pc(unsigned long pc, struct pt_regs *regs,
 {
 	struct disasm_state instr;
 
-	memset(&instr, 0, sizeof(struct disasm_state));
 	disasm_instr(pc, &instr, 0, regs, cregs);
 
 	*next_pc = pc + instr.instr_len;
-- 
2.32.0


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

* Re: [PATCH] ARC: Remove a redundant memset()
  2022-03-22 19:49 [PATCH] ARC: Remove a redundant memset() Christophe JAILLET
@ 2022-04-18 19:21 ` Vineet Gupta
  0 siblings, 0 replies; 2+ messages in thread
From: Vineet Gupta @ 2022-04-18 19:21 UTC (permalink / raw)
  To: Christophe JAILLET, Vineet Gupta
  Cc: linux-kernel, kernel-janitors, linux-snps-arc



On 3/22/22 12:49, Christophe JAILLET wrote:
> disasm_instr() already call memset(0) on its 2nd argument, so there is no
> need to clear it explicitly before calling this function.
>
> Remove the redundant memset().
>
> Signed-off-by: Christophe JAILLET<christophe.jaillet@wanadoo.fr>


Applied.

Thx,
-Vineet

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

end of thread, other threads:[~2022-04-18 19:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-22 19:49 [PATCH] ARC: Remove a redundant memset() Christophe JAILLET
2022-04-18 19:21 ` Vineet Gupta

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

all inboxes | Powered by JetHome®