Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752840AbeADLW7 (ORCPT + 1 other); Thu, 4 Jan 2018 06:22:59 -0500 Received: from mail-lf0-f53.google.com ([209.85.215.53]:43325 "EHLO mail-lf0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752159AbeADLW6 (ORCPT ); Thu, 4 Jan 2018 06:22:58 -0500 X-Google-Smtp-Source: ACJfBoucSjj6ECmFvwzNXMBKYGlO1T5DtavVvzgGdal2A222/MCQ1pQl4DyJPJGtn2quoI6lAxf6SMTngiGEcF9FGg0= From: Shivasharan Srikanteshwara References: <1514648877-7234-1-git-send-email-himanshujha199640@gmail.com> In-Reply-To: <1514648877-7234-1-git-send-email-himanshujha199640@gmail.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQIfGhu588Ec9uxJKsVp1HDFET4iO6LK8rIg Date: Thu, 4 Jan 2018 16:52:54 +0530 Message-ID: Subject: RE: [PATCH] scsi: megaraid: Use zeroing memory allocator than allocator/memset To: Himanshu Jha , martin.petersen@oracle.com, jejb@linux.vnet.ibm.com Cc: Kashyap Desai , Sumit Saxena , "PDL,MEGARAIDLINUX" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, mcgrof@kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: > -----Original Message----- > From: Himanshu Jha [mailto:himanshujha199640@gmail.com] > Sent: Saturday, December 30, 2017 9:18 PM > To: martin.petersen@oracle.com; jejb@linux.vnet.ibm.com > Cc: kashyap.desai@broadcom.com; sumit.saxena@broadcom.com; > shivasharan.srikanteshwara@broadcom.com; > megaraidlinux.pdl@broadcom.com; linux-scsi@vger.kernel.org; linux- > kernel@vger.kernel.org; mcgrof@kernel.org; Himanshu Jha > > Subject: [PATCH] scsi: megaraid: Use zeroing memory allocator than > allocator/memset > > Use pci_zalloc_consistent for allocating zeroed memory and remove > unnecessary memset function. > > Done using Coccinelle. > Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci > 0-day tested with no failures. > > Suggested-by: Luis R. Rodriguez > Signed-off-by: Himanshu Jha > --- > drivers/scsi/megaraid/megaraid_sas_base.c | 19 ++++++------------- > drivers/scsi/megaraid/megaraid_sas_fusion.c | 5 ++--- > 2 files changed, 8 insertions(+), 16 deletions(-) > Hi Himanshu, I can see one more allocation done in megasas_get_seq_num() that could make use of these changes. Rest of the changes looks fine. Also, there is a driver update patchset that I am planning to post today. Adding this patch first might require additional rebasing of this patchset. Would you be ok if I send a separate patch for this along with the change mentioned above once my patch series gets committed? That would save me some rebasing effort. :-) Thanks, Shivasharan