linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jinpu Wang <jinpu.wang@cloud.ionos.com>
To: Xu Wang <vulab@iscas.ac.cn>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Linux SCSI Mailinglist <linux-scsi@vger.kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: pm8001: remove casting kcalloc
Date: Fri, 20 Nov 2020 09:57:46 +0100	[thread overview]
Message-ID: <CAMGffE=jcCppveLkaChvyk1hGWn4c8HHUouWhR2_DwKXYoradw@mail.gmail.com> (raw)
In-Reply-To: <20201120083648.9319-1-vulab@iscas.ac.cn>

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
>

  reply	other threads:[~2020-11-20  8:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-20  8:36 [PATCH] scsi: pm8001: remove casting kcalloc Xu Wang
2020-11-20  8:57 ` Jinpu Wang [this message]
2020-11-24  3:17 ` Martin K. Petersen
2020-12-01  5:04 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMGffE=jcCppveLkaChvyk1hGWn4c8HHUouWhR2_DwKXYoradw@mail.gmail.com' \
    --to=jinpu.wang@cloud.ionos.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=vulab@iscas.ac.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).