linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: pm8001: remove casting kcalloc
@ 2020-11-20  8:36 Xu Wang
  2020-11-20  8:57 ` Jinpu Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Xu Wang @ 2020-11-20  8:36 UTC (permalink / raw)
  To: jinpu.wang, jejb, martin.petersen, linux-scsi; +Cc: linux-kernel

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(-)

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


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

* Re: [PATCH] scsi: pm8001: remove casting kcalloc
  2020-11-20  8:36 [PATCH] scsi: pm8001: remove casting kcalloc Xu Wang
@ 2020-11-20  8:57 ` Jinpu Wang
  2020-11-24  3:17 ` Martin K. Petersen
  2020-12-01  5:04 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Jinpu Wang @ 2020-11-20  8:57 UTC (permalink / raw)
  To: Xu Wang
  Cc: James E.J. Bottomley, Martin K. Petersen, Linux SCSI Mailinglist,
	linux-kernel

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
>

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

* Re: [PATCH] scsi: pm8001: remove casting kcalloc
  2020-11-20  8:36 [PATCH] scsi: pm8001: remove casting kcalloc Xu Wang
  2020-11-20  8:57 ` Jinpu Wang
@ 2020-11-24  3:17 ` Martin K. Petersen
  2020-12-01  5:04 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2020-11-24  3:17 UTC (permalink / raw)
  To: Xu Wang; +Cc: jinpu.wang, jejb, martin.petersen, linux-scsi, linux-kernel


Xu,

> Remove casting the values returned by kcalloc.

Applied to 5.11/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH] scsi: pm8001: remove casting kcalloc
  2020-11-20  8:36 [PATCH] scsi: pm8001: remove casting kcalloc Xu Wang
  2020-11-20  8:57 ` Jinpu Wang
  2020-11-24  3:17 ` Martin K. Petersen
@ 2020-12-01  5:04 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2020-12-01  5:04 UTC (permalink / raw)
  To: linux-scsi, jejb, jinpu.wang, Xu Wang; +Cc: Martin K . Petersen, linux-kernel

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

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

end of thread, other threads:[~2020-12-01  5:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-20  8:36 [PATCH] scsi: pm8001: remove casting kcalloc Xu Wang
2020-11-20  8:57 ` Jinpu Wang
2020-11-24  3:17 ` Martin K. Petersen
2020-12-01  5:04 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).