* [PATCH 1/1] scsi: use kzalloc for allocating one thing
@ 2015-06-18 4:36 Maninder Singh
2015-06-18 5:52 ` Hannes Reinecke
0 siblings, 1 reply; 2+ messages in thread
From: Maninder Singh @ 2015-06-18 4:36 UTC (permalink / raw)
To: JBottomley, hare, hch, michaelc, martin.petersen, linux-scsi,
linux-kernel
Cc: pankaj.m, Maninder Singh
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;
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] scsi: use kzalloc for allocating one thing
2015-06-18 4:36 [PATCH 1/1] scsi: use kzalloc for allocating one thing Maninder Singh
@ 2015-06-18 5:52 ` Hannes Reinecke
0 siblings, 0 replies; 2+ messages in thread
From: Hannes Reinecke @ 2015-06-18 5:52 UTC (permalink / raw)
To: Maninder Singh, JBottomley, hch, michaelc, martin.petersen,
linux-scsi, linux-kernel
Cc: pankaj.m
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-18 5:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-18 4:36 [PATCH 1/1] scsi: use kzalloc for allocating one thing Maninder Singh
2015-06-18 5:52 ` Hannes Reinecke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox