Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1167596
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Hannes Reinecke <hare@suse.de> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/1] scsi: use kzalloc for allocating one thing |
| Date | Thu, 18 Jun 2015 08:00:02 +0200 |
| Message-ID | <pCB1M-7VD-3@gated-at.bofh.it> (permalink) |
| References | <pCzMl-6iO-5@gated-at.bofh.it> |
| X-Original-To | Maninder Singh <maninder1.s@samsung.com>, JBottomley@odin.com, hch@lst.de, michaelc@cs.wisc.edu, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252 |
| Content-Transfer-Encoding | 8bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 39 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | pankaj.m@samsung.com |
| X-Original-Date | Thu, 18 Jun 2015 07:52:31 +0200 |
| X-Original-Message-ID | <55825C9F.4060104@suse.de> |
| X-Original-References | <1434602194-14484-1-git-send-email-maninder1.s@samsung.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1167596 |
Show key headers only | View raw
On 06/18/2015 06:36 AM, Maninder Singh wrote:
> Use kzalloc rather than kcalloc(1,...) for allocating one thing
>
> Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
> Reviewed-by: Vaneet Narang <v.narang@samsung.com>
> ---
> drivers/scsi/mvsas/mv_init.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
> index d40d734..65e47eb 100644
> --- a/drivers/scsi/mvsas/mv_init.c
> +++ b/drivers/scsi/mvsas/mv_init.c
> @@ -558,7 +558,7 @@ static int mvs_pci_init(struct pci_dev *pdev, const struct pci_device_id *ent)
>
> chip = &mvs_chips[ent->driver_data];
> SHOST_TO_SAS_HA(shost) =
> - kcalloc(1, sizeof(struct sas_ha_struct), GFP_KERNEL);
> + kzalloc(sizeof(struct sas_ha_struct), GFP_KERNEL);
> if (!SHOST_TO_SAS_HA(shost)) {
> kfree(shost);
> rc = -ENOMEM;
>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/1] scsi: use kzalloc for allocating one thing Maninder Singh <maninder1.s@samsung.com> - 2015-06-18 06:40 +0200 Re: [PATCH 1/1] scsi: use kzalloc for allocating one thing Hannes Reinecke <hare@suse.de> - 2015-06-18 08:00 +0200
csiph-web