Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1185046

Re: [PATCH] hwmon: coretemp: use list instead of fixed size array for temp data

From Jean Delvare <jdelvare@suse.de>
Newsgroups linux.kernel
Subject Re: [PATCH] hwmon: coretemp: use list instead of fixed size array for temp data
Date 2015-07-15 23:10 +0200
Message-ID <pMC6d-2IR-7@gated-at.bofh.it> (permalink)
References <pMxpU-4mo-37@gated-at.bofh.it>
Organization SUSE Linux

Show all headers | View raw


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/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH] hwmon: coretemp: use list instead of fixed size array  for temp data Jean Delvare <jdelvare@suse.de> - 2015-07-15 23:10 +0200
  Re: [PATCH] hwmon: coretemp: use list instead of fixed size array  for temp data Jean Delvare <jdelvare@suse.de> - 2015-07-17 23:30 +0200
  Re: [PATCH] hwmon: coretemp: use list instead of fixed size array  for temp data Jean Delvare <jdelvare@suse.de> - 2015-07-17 23:40 +0200

csiph-web