Re: [PATCH] firmware: qcom_scm: Fix coccinelle warning

From: Mukesh Ojha

Date: Thu Feb 05 2026 - 03:23:56 EST


On Mon, Feb 02, 2026 at 12:51:31PM +0100, Konrad Dybcio wrote:
> On 2/2/26 12:32 PM, Mukesh Ojha wrote:
> > Fix coccinelle warning of allocation and memory copying to allocated
> > memory by replacing with kmemdup.
> >
> > cocci warnings: (new ones prefixed by >>)
> >>> drivers/firmware/qcom/qcom_scm.c:916:11-18: WARNING opportunity for kmemdup
> >
> > Reported-by: kernel test robot <lkp@xxxxxxxxx>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202601142144.HvSlBSI9-lkp@xxxxxxxxx/
> > Signed-off-by: Mukesh Ojha <mukesh.ojha@xxxxxxxxxxxxxxxx>
> > ---
>
> Preferably the subject would say something like 'don't opencode kmemdup',
> but that's minor

Thanks, Just checking if the tool name like coccinelle, smatch, sparse
who may find some issue is not preferrable to get mentioned in commit at all ?

>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
>
> Konrad

--
-Mukesh Ojha