All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Brace <don.brace@microsemi.com>
To: "Tobin C. Harding" <me@tobin.cc>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>
Subject: RE: [PATCH 3/3] cciss: Remove kmalloc cast
Date: Wed, 22 Feb 2017 15:16:31 +0000	[thread overview]
Message-ID: <4993A297653ECB4581FA5C3C31323D194F32249D@avsrvexchmbx1.microsemi.net> (raw)
In-Reply-To: <1487743958-4208-4-git-send-email-me@tobin.cc>

> -----Original Message-----
> From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-
> owner@vger.kernel.org] On Behalf Of Tobin C. Harding
> Sent: Wednesday, February 22, 2017 12:13 AM
> To: Don Brace <don.brace@microsemi.com>
> Cc: linux-scsi@vger.kernel.org; kernel-janitors@vger.kernel.org; Tobin C.
> Harding <me@tobin.cc>
> Subject: [PATCH 3/3] cciss: Remove kmalloc cast
> 
> EXTERNAL EMAIL
> 
> 
> Coccinelle emits a warning about casting the return value of
> kmalloc(). Coccinelle suggests removing the cast as do
> kerneljanitors.
> 
> Remove cast from kmalloc() call.
> 
> Signed-off-by: Tobin C. Harding <me@tobin.cc>

Acked-by: Don Brace <don.brace@microsemi.com>
> ---
>  drivers/block/cciss_scsi.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c
> index f5c21f3..01a1f7e 100644
> --- a/drivers/block/cciss_scsi.c
> +++ b/drivers/block/cciss_scsi.c
> @@ -647,8 +647,7 @@ cciss_scsi_setup(ctlr_info_t *h)
>         struct cciss_scsi_adapter_data_t * shba;
> 
>         ccissscsi[h->ctlr].ndevices = 0;
> -       shba = (struct cciss_scsi_adapter_data_t *)
> -               kmalloc(sizeof(*shba), GFP_KERNEL);
> +       shba = kmalloc(sizeof(*shba), GFP_KERNEL);
>         if (shba == NULL)
>                 return;
>         shba->scsi_host = NULL;
> --
> 2.7.4


  reply	other threads:[~2017-02-22 15:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22  5:49 [PATCH 0/3] cciss: Fix coccinelle/checkpatch warnings Tobin C. Harding
2017-02-22  5:49 ` Tobin C. Harding
2017-02-22  5:49 ` [PATCH 1/3] cciss: Fix checkpatch TRAILING_WHITESPACE Tobin C. Harding
2017-02-22  5:49   ` Tobin C. Harding
2017-02-22  5:49 ` [PATCH 2/3] cciss: Fix checkpatch OPEN_BRACE Tobin C. Harding
2017-02-22  5:49   ` Tobin C. Harding
2017-02-22  5:49 ` [PATCH 3/3] cciss: Remove kmalloc cast Tobin C. Harding
2017-02-22  5:49   ` Tobin C. Harding
2017-02-22  6:12 ` [PATCH 0/3] cciss: Fix coccinelle/checkpatch warnings Tobin C. Harding
2017-02-22  6:12   ` Tobin C. Harding
2017-02-22  6:12   ` [PATCH 1/3] cciss: Fix checkpatch TRAILING_WHITESPACE Tobin C. Harding
2017-02-22  6:12     ` Tobin C. Harding
2017-02-22 15:20     ` Don Brace
2017-02-22  6:12   ` [PATCH 2/3] cciss: Fix checkpatch OPEN_BRACE Tobin C. Harding
2017-02-22  6:12     ` Tobin C. Harding
2017-02-22 15:17     ` Don Brace
2017-02-22  6:12   ` [PATCH 3/3] cciss: Remove kmalloc cast Tobin C. Harding
2017-02-22  6:12     ` Tobin C. Harding
2017-02-22 15:16     ` Don Brace [this message]
2017-02-22 15:34   ` [PATCH 0/3] cciss: Fix coccinelle/checkpatch warnings Jens Axboe
2017-02-22 15:34     ` Jens Axboe

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=4993A297653ECB4581FA5C3C31323D194F32249D@avsrvexchmbx1.microsemi.net \
    --to=don.brace@microsemi.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=me@tobin.cc \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.