Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753740AbbGOVHj (ORCPT ); Wed, 15 Jul 2015 17:07:39 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49303 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753428AbbGOVHi (ORCPT ); Wed, 15 Jul 2015 17:07:38 -0400 Date: Wed, 15 Jul 2015 23:07:34 +0200 From: Jean Delvare To: Lukasz Odzioba Cc: fenghua.yu@intel.com, linux@roeck-us.net, lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] hwmon: coretemp: use list instead of fixed size array for temp data Message-ID: <20150715230734.76347af2@endymion.delvare> In-Reply-To: <1436976253-4810-1-git-send-email-lukasz.odzioba@intel.com> References: <1436976253-4810-1-git-send-email-lukasz.odzioba@intel.com> Organization: SUSE Linux X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.23; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 930 Lines: 23 On Wed, 15 Jul 2015 18:04:13 +0200, Lukasz Odzioba wrote: > Removes the limits of supported CPU cores and max core ID. I see the benefit of removing the arbitrary limit, but why use a list instead of a dynamically allocated array? This is turning a O(1) algorithm into a O(n) algorithm. I know n isn't too large in this case but I still consider it bad practice if it can be avoided. Do you expect core IDs to become arbitrarily large? Significantly larger than the core count? You need a better patch description for sure. Saying what the patch does isn't sufficient, you need to explain why this is needed and why this is the right way to do it. -- Jean Delvare SUSE L3 Support -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/