From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753124AbbIKN5D (ORCPT ); Fri, 11 Sep 2015 09:57:03 -0400 Received: from mga14.intel.com ([192.55.52.115]:36345 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752396AbbIKN5A (ORCPT ); Fri, 11 Sep 2015 09:57:00 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,511,1437462000"; d="scan'208";a="642967134" From: Lukasz Odzioba To: fenghua.yu@intel.com Cc: jdelvare@suse.de, linux@roeck-us.net, lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org Subject: hwmon: coretemp: use dynamically allocated array to store per core data Date: Fri, 11 Sep 2015 15:56:49 +0200 Message-Id: <1441979810-22810-1-git-send-email-lukasz.odzioba@intel.com> X-Mailer: git-send-email 1.7.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch is continuation of my previous work. After Guenter Roeck's and Jean Delware's comments I changed list to an array. Initial array size is 4 and it is extended when core id exeeds size of the array, which in practice can mean every time a new core is initialized. I am not sure whether it is reasonable since it implies a lot of krealloc calls with small size increments. Please let me know if you think that more greedy approach would be better here. Comments are welcome.