From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751775AbcFNLab (ORCPT ); Tue, 14 Jun 2016 07:30:31 -0400 Received: from gate.crashing.org ([63.228.1.57]:44467 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750760AbcFNLa3 (ORCPT ); Tue, 14 Jun 2016 07:30:29 -0400 Message-ID: <1465903788.30200.8.camel@kernel.crashing.org> Subject: Re: [PATCH v6 10/11] cpuidle/powernv: Add support for POWER ISA v3 idle states From: Benjamin Herrenschmidt To: Shreyas B Prabhu , Daniel Lezcano Cc: ego@linux.vnet.ibm.com, mikey@neuling.org, linux-pm@vger.kernel.org, "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Rob Herring , maddy@linux.vnet.ibm.com, Lorenzo Pieralisi , linuxppc-dev@lists.ozlabs.org Date: Tue, 14 Jun 2016 21:29:48 +1000 In-Reply-To: <575FE0B0.4030309@linux.vnet.ibm.com> References: <1465404871-5406-1-git-send-email-shreyas@linux.vnet.ibm.com> <1465404871-5406-11-git-send-email-shreyas@linux.vnet.ibm.com> <20160613153446.GF10634@linaro.org> <575FE0B0.4030309@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.3 (3.20.3-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2016-06-14 at 16:17 +0530, Shreyas B Prabhu wrote: > > I ignored adding this check because this is part of initcall and we are > unlikely to run out of memory at this state. But I'll add the check in > next version. Why do you malloc the u64 array and not the string pointer array ? Shouldn't you either have both on stack or both allocated ? Cheers, Ben.