[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8736jfs0la.fsf@linux.ibm.com>
Date: Tue, 09 Jul 2019 10:13:05 -0500
From: Nathan Lynch <nathanl@...ux.ibm.com>
To: Fuqian Huang <huangfq.daxian@...il.com>
Cc: linux-kernel@...r.kernel.org, Paul Mackerras <paulus@...ba.org>,
linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v2 03/35] powerpc: Use kmemdup rather than duplicating its implementation
Fuqian Huang <huangfq.daxian@...il.com> writes:
> kmemdup is introduced to duplicate a region of memory in a neat way.
> Rather than kmalloc/kzalloc + memcpy, which the programmer needs to
> write the size twice (sometimes lead to mistakes), kmemdup improves
> readability, leads to smaller code and also reduce the chances of mistakes.
> Suggestion to use kmemdup rather than using kmalloc/kzalloc + memcpy.
>
> Signed-off-by: Fuqian Huang <huangfq.daxian@...il.com>
> ---
> Changes in v2:
> - Fix a typo in commit message (memset -> memcpy)
Thanks, but this and the unchecked kmalloc result (and incorrect gfp
flags) have already been addressed in commit
348ea30f51fc63ce3c7fd7dba6043e8e3ee0ef34 ("powerpc/pseries: avoid
blocking in irq when queuing hotplug events"):
https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next&id=348ea30f51fc63ce3c7fd7dba6043e8e3ee0ef34
Powered by blists - more mailing lists