From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755478AbbFCLyw (ORCPT ); Wed, 3 Jun 2015 07:54:52 -0400 Received: from mail-am1on0081.outbound.protection.outlook.com ([157.56.112.81]:56856 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752539AbbFCLyC convert rfc822-to-8bit (ORCPT ); Wed, 3 Jun 2015 07:54:02 -0400 From: Gil Fruchter To: Steven Rostedt CC: "mingo@redhat.com" , "linux-kernel@vger.kernel.org" , Gilad Ben Yossef , "Chris Metcalf" , Noam Camus Subject: RE: [PATCH 1/2] tracing: Prefer kcalloc over kzalloc with multiply Thread-Topic: [PATCH 1/2] tracing: Prefer kcalloc over kzalloc with multiply Thread-Index: AQHQnTfeSKYMo8ZvHUS2FtF65leSMZ2ZQqgAgAFizBA= Date: Wed, 3 Jun 2015 11:53:59 +0000 Message-ID: References: <1433251589-21013-1-git-send-email-gilf@ezchip.com> <1433251589-21013-2-git-send-email-gilf@ezchip.com> <20150602101516.7dd2feb6@gandalf.local.home> In-Reply-To: <20150602101516.7dd2feb6@gandalf.local.home> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=gilf@ezchip.com; x-originating-ip: [212.179.42.66] x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM2PR02MB257; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(520003)(5005006)(3002001);SRVR:AM2PR02MB257;BCL:0;PCL:0;RULEID:;SRVR:AM2PR02MB257; x-forefront-prvs: 05961EBAFC x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(199003)(51704005)(377454003)(54534003)(24454002)(51914003)(189002)(87936001)(74316001)(97736004)(2656002)(105586002)(5001830100001)(4001540100001)(81156007)(106116001)(5001860100001)(46102003)(5002640100001)(86362001)(33656002)(2950100001)(2900100001)(66066001)(92566002)(189998001)(122556002)(40100003)(101416001)(62966003)(68736005)(77156002)(102836002)(106356001)(5001960100002)(107886002)(76576001)(110136002)(19580395003)(64706001)(5001920100001)(19580405001)(76176999)(50986999)(54356999)(4001430100001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM2PR02MB257;H:AM2PR02MB0626.eurprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jun 2015 11:53:59.7796 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0fc16e0a-3cd3-4092-8b2f-0a42cff122c3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR02MB257 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 2, 2015 at 5:15 PM, Steven Rostedt wrote: > On Tue, 2 Jun 2015 16:26:28 +0300 > Gil Fruchter wrote: > >> fix checkpatch warning for using kzalloc with multiply: >> WARNING: Prefer kcalloc over kzalloc with multiply >> + iter->buffer_iter = kzalloc(sizeof(*iter->buffer_iter) >> * num_possible_cpus(), > > I'm not against applying this patch, but "fix checkpatch warning" is never rational for a change. > > This should say something like, "Use kcalloc for allocating an array instead of a simple multiplier with kzalloc, as that is what kcalloc is used for." > > In other words, if checkpatch found something that should be change, have the change log tell us why it should be changed. You can than add a "Found with checkpatch" to give checkpatch the credit. > > -- Steve > Thanks for the input Steve. I will create a v2 with an appropriate explanation for this change. Can I add a Reviewed-by tag by you? Gil