diff mbox series

scsi: pm8001: remove casting kcalloc

Message ID 20201120083648.9319-1-vulab@iscas.ac.cn
State New
Headers show
Series scsi: pm8001: remove casting kcalloc | expand

Commit Message

Xu Wang Nov. 20, 2020, 8:36 a.m. UTC
Remove casting the values returned by kcalloc.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
 drivers/scsi/pm8001/pm8001_init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jinpu Wang Nov. 20, 2020, 8:57 a.m. UTC | #1
On Fri, Nov 20, 2020 at 9:36 AM Xu Wang <vulab@iscas.ac.cn> wrote:
>
> Remove casting the values returned by kcalloc.
>
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Thanks Xu!
> ---
>  drivers/scsi/pm8001/pm8001_init.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
> index 3cf3e58b6979..ac0e598b8ac2 100644
> --- a/drivers/scsi/pm8001/pm8001_init.c
> +++ b/drivers/scsi/pm8001/pm8001_init.c
> @@ -1187,8 +1187,8 @@ pm8001_init_ccb_tag(struct pm8001_hba_info *pm8001_ha, struct Scsi_Host *shost,
>                 goto err_out;
>
>         /* Memory region for ccb_info*/
> -       pm8001_ha->ccb_info = (struct pm8001_ccb_info *)
> -               kcalloc(ccb_count, sizeof(struct pm8001_ccb_info), GFP_KERNEL);
> +       pm8001_ha->ccb_info =
> +               kcalloc(ccb_count, sizeof(struct pm8001_ccb_info), GFP_KERNEL);
>         if (!pm8001_ha->ccb_info) {
>                 PM8001_FAIL_DBG(pm8001_ha, pm8001_printk
>                         ("Unable to allocate memory for ccb\n"));
> --
> 2.17.1
>
Martin K. Petersen Nov. 24, 2020, 3:17 a.m. UTC | #2
Xu,

> Remove casting the values returned by kcalloc.


Applied to 5.11/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering
Martin K. Petersen Dec. 1, 2020, 5:04 a.m. UTC | #3
On Fri, 20 Nov 2020 08:36:48 +0000, Xu Wang wrote:

> Remove casting the values returned by kcalloc.


Applied to 5.11/scsi-queue, thanks!

[1/1] scsi: pm8001: Remove typecast for pointer returned by kcalloc()
      https://git.kernel.org/mkp/scsi/c/27a34943bd89

-- 
Martin K. Petersen	Oracle Linux Engineering
diff mbox series

Patch

diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 3cf3e58b6979..ac0e598b8ac2 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -1187,8 +1187,8 @@  pm8001_init_ccb_tag(struct pm8001_hba_info *pm8001_ha, struct Scsi_Host *shost,
 		goto err_out;
 
 	/* Memory region for ccb_info*/
-	pm8001_ha->ccb_info = (struct pm8001_ccb_info *)
-		kcalloc(ccb_count, sizeof(struct pm8001_ccb_info), GFP_KERNEL);
+	pm8001_ha->ccb_info =
+		kcalloc(ccb_count, sizeof(struct pm8001_ccb_info), GFP_KERNEL);
 	if (!pm8001_ha->ccb_info) {
 		PM8001_FAIL_DBG(pm8001_ha, pm8001_printk
 			("Unable to allocate memory for ccb\n"));