Re: [PATCH v2] scsi: qedf: Use kcalloc() and add check for bdt_info

Jiasheng Jiang
2025-02-02T21:34:10Z

Hi Markus,

On Sun, Feb 2, 2025 at 11:54 AM Markus Elfring <Markus.Elfring@web.de> wrote:
>
> …
> > +++ b/drivers/scsi/qedf/qedf_io.c
> …
> @@ -254,9 +254,7 @@ struct qedf_cmd_mgr *qedf_cmd_mgr_alloc(struct qedf_ctx *qedf)
> }
>
> /* Allocate pool of io_bdts - one for each qedf_ioreq */
> …
> + cmgr->io_bdt_pool = kcalloc(num_ios, sizeof(struct io_bdt *), GFP_KERNEL);
> …
>
> See also:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.13#n941
>
> Regards,
> Markus

Thanks, I have split it into two new patches and fixed the error.

-Jiasheng