Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755566AbdDEPKi (ORCPT ); Wed, 5 Apr 2017 11:10:38 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:29829 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754253AbdDEPKR (ORCPT ); Wed, 5 Apr 2017 11:10:17 -0400 X-IronPort-AV: E=Sophos;i="5.35,258,1483977600"; d="scan'208";a="110764188" From: Bart Van Assche To: "hal.rosenstock@gmail.com" , "elfring@users.sourceforge.net" , "linux-rdma@vger.kernel.org" , "infinipath@intel.com" , "dledford@redhat.com" , "sean.hefty@intel.com" CC: "linux-kernel@vger.kernel.org" , "kernel-janitors@vger.kernel.org" Subject: Re: [PATCH 5/5] IB/qib: Adjust two size determinations in qib_init_pportdata() Thread-Topic: [PATCH 5/5] IB/qib: Adjust two size determinations in qib_init_pportdata() Thread-Index: AQHSrhUdypiIg9PQE0S0sQfcg7ebZqG24UiA Date: Wed, 5 Apr 2017 15:10:14 +0000 Message-ID: <1491405013.2787.3.camel@sandisk.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=sandisk.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [63.163.107.100] x-microsoft-exchange-diagnostics: 1;CY1PR0401MB1534;7:S4xV29iGpwua0cVpONy+1yIyR4TE1mfmJNMy8we5r2Q4FpxlDYzNJjvWmsR//WimSwuDwtQk8mV5JfRlmc/x9mLzla6xx/9Wn44dj55YGCmkai1ErphDzmyWwMJ8PmAfVJepUmHlAhohJN2SIHIclh39uAKBF1cbhcCzIoBkTkhPRL/gHo9eAAiYD1i+WnuRo+V9yHDgjpYmVwvrH3gw5WMHSjeyC742bHx6MVFYWyWKehskhY4i/kiJmNZ5yIe8JY4TVo01Y88psUJuoxQ8E0ZYOOSpVm0OEmZntFOuEYRHdjMP4zSJZ4NKSrf3QbSxgN6du4s1TH+9fLrdFhysjg==;20:a2ouT2XvgJDuBI81QYfJUgb/VKmeTP2aRty/BL+x6eUdkh7R3mNJq3AOpjva0TvJTY63GeUlQRzO+BKfMEY6f0u14DDYNSOImelRDFhb0P4KKXwseBIwVqJzWD3gy2kT42Z4iNIynNpUHcXXyZ96hCLjGJUmCfcgf85vBjpaIQM= x-ms-office365-filtering-correlation-id: faeb06ad-aeec-4db7-c61a-08d47c35dcd5 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081);SRVR:CY1PR0401MB1534; wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(20161123562025)(6072148);SRVR:CY1PR0401MB1534;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0401MB1534; x-forefront-prvs: 0268246AE7 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(39850400002)(39410400002)(39400400002)(39450400003)(39840400002)(377424004)(24454002)(2900100001)(25786009)(7736002)(3280700002)(81166006)(3846002)(6116002)(3660700001)(102836003)(103116003)(122556002)(8676002)(99286003)(54906002)(36756003)(77096006)(6436002)(6486002)(6506006)(6512007)(305945005)(66066001)(8936002)(76176999)(50986999)(54356999)(5660300001)(39060400002)(53936002)(229853002)(189998001)(4326008)(2201001)(6246003)(38730400002)(2950100002)(2906002)(86362001)(33646002)(2501003);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0401MB1534;H:CY1PR0401MB1536.namprd04.prod.outlook.com;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-ID: <659B944AA8F79448A4379644FCE0ADAE@namprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Apr 2017 15:10:14.5650 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0401MB1534 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v35FBJlF018188 Content-Length: 511 Lines: 14 On Wed, 2017-04-05 at 15:55 +0200, SF Markus Elfring wrote: > - size = sizeof(struct ib_cc_congestion_setting_attr); > - ppd->congestion_entries_shadow = kzalloc(size, GFP_KERNEL); > + ppd->congestion_entries_shadow = kzalloc(sizeof(*ppd > + ->congestion_entries_shadow), > + GFP_KERNEL); The way how the above line has been split looks really weird. Please move the entire kzalloc() call to the next line such that "*ppd" and "->congestion_entries_shadow" appear on the same line. Thanks, Bart.