Alexey Dobriyan 9b130ad5bb treewide: make "nr_cpu_ids" unsigned
First, number of CPUs can't be negative number.

Second, different signnnedness leads to suboptimal code in the following
cases:

1)
	kmalloc(nr_cpu_ids * sizeof(X));

"int" has to be sign extended to size_t.

2)
	while (loff_t *pos < nr_cpu_ids)

MOVSXD is 1 byte longed than the same MOV.

Other cases exist as well. Basically compiler is told that nr_cpu_ids
can't be negative which can't be deduced if it is "int".

Code savings on allyesconfig kernel: -3KB

	add/remove: 0/0 grow/shrink: 25/264 up/down: 261/-3631 (-3370)
	function                                     old     new   delta
	coretemp_cpu_online                          450     512     +62
	rcu_init_one                                1234    1272     +38
	pci_device_probe                             374     399     +25

				...

	pgdat_reclaimable_pages                      628     556     -72
	select_fallback_rq                           446     369     -77
	task_numa_find_cpu                          1923    1807    -116

Link: http://lkml.kernel.org/r/20170819114959.GA30580@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-09-08 18:26:48 -07:00
..
2017-09-07 12:12:43 -07:00
2017-09-07 12:12:43 -07:00
2017-09-07 12:12:43 -07:00
2017-09-07 12:12:43 -07:00
2017-08-25 17:29:29 -04:00
2017-09-07 21:11:05 -07:00
2017-09-07 12:12:43 -07:00
2017-09-07 12:12:43 -07:00
2017-09-07 12:12:43 -07:00
2017-09-07 21:11:05 -07:00
2017-08-25 17:21:11 -04:00
2015-04-17 10:13:56 -07:00
2015-11-25 22:08:55 -05:00
2017-08-24 22:29:06 -04:00
2014-07-17 22:07:37 +02:00
2016-05-10 22:01:07 -04:00
2015-11-09 16:32:14 -08:00
2017-08-29 21:51:44 -04:00
2017-08-25 17:21:10 -04:00
2017-08-08 11:49:51 -04:00
2016-01-27 20:36:10 +08:00
2017-08-16 20:01:32 -04:00
2016-01-27 20:36:10 +08:00
2017-08-25 17:08:08 -04:00
2017-04-26 15:09:04 -06:00
2014-07-17 22:07:35 +02:00
2017-08-25 17:21:11 -04:00
2016-11-28 15:51:31 -05:00
2017-04-13 13:58:20 -04:00
2017-09-07 12:12:43 -07:00
2017-05-16 08:44:15 -03:00
2017-09-07 12:12:43 -07:00
2017-09-07 12:12:43 -07:00
2017-09-07 12:12:43 -07:00
2016-02-23 21:27:02 -05:00
2014-07-17 22:07:39 +02:00
2014-11-12 11:15:57 +01:00
2017-08-08 11:49:51 -04:00
2015-11-18 11:59:09 -05:00
2017-04-26 18:32:29 -04:00