Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI: PPTT: Consistently use unsigned int as parameter type

The fourth parameter 'level' of function 'acpi_find_cache_level()' is
a signed interger, but its caller 'acpi_find_cache_node()' passes that
parameter an unsigned interger.

Make the paramter type inconsistency go away.

Signed-off-by: Tian Tao <tiantao6@huawei.com>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
[ rjw: Subject/changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Tian Tao and committed by
Rafael J. Wysocki
643956e6 c79f46a2

+15 -14
+15 -14
drivers/acpi/pptt.c
··· 98 98 * 99 99 * Return: The cache structure and the level we terminated with. 100 100 */ 101 - static int acpi_pptt_walk_cache(struct acpi_table_header *table_hdr, 102 - int local_level, 103 - struct acpi_subtable_header *res, 104 - struct acpi_pptt_cache **found, 105 - int level, int type) 101 + static unsigned int acpi_pptt_walk_cache(struct acpi_table_header *table_hdr, 102 + unsigned int local_level, 103 + struct acpi_subtable_header *res, 104 + struct acpi_pptt_cache **found, 105 + unsigned int level, int type) 106 106 { 107 107 struct acpi_pptt_cache *cache; 108 108 ··· 119 119 if (*found != NULL && cache != *found) 120 120 pr_warn("Found duplicate cache level/type unable to determine uniqueness\n"); 121 121 122 - pr_debug("Found cache @ level %d\n", level); 122 + pr_debug("Found cache @ level %u\n", level); 123 123 *found = cache; 124 124 /* 125 125 * continue looking at this node's resource list ··· 132 132 return local_level; 133 133 } 134 134 135 - static struct acpi_pptt_cache *acpi_find_cache_level(struct acpi_table_header *table_hdr, 136 - struct acpi_pptt_processor *cpu_node, 137 - int *starting_level, int level, 138 - int type) 135 + static struct acpi_pptt_cache * 136 + acpi_find_cache_level(struct acpi_table_header *table_hdr, 137 + struct acpi_pptt_processor *cpu_node, 138 + unsigned int *starting_level, unsigned int level, 139 + int type) 139 140 { 140 141 struct acpi_subtable_header *res; 141 - int number_of_levels = *starting_level; 142 + unsigned int number_of_levels = *starting_level; 142 143 int resource = 0; 143 144 struct acpi_pptt_cache *ret = NULL; 144 - int local_level; 145 + unsigned int local_level; 145 146 146 147 /* walk down from processor node */ 147 148 while ((res = acpi_get_pptt_resource(table_hdr, cpu_node, resource))) { ··· 322 321 unsigned int level, 323 322 struct acpi_pptt_processor **node) 324 323 { 325 - int total_levels = 0; 324 + unsigned int total_levels = 0; 326 325 struct acpi_pptt_cache *found = NULL; 327 326 struct acpi_pptt_processor *cpu_node; 328 327 u8 acpi_type = acpi_cache_type(type); 329 328 330 - pr_debug("Looking for CPU %d's level %d cache type %d\n", 329 + pr_debug("Looking for CPU %d's level %u cache type %d\n", 331 330 acpi_cpu_id, level, acpi_type); 332 331 333 332 cpu_node = acpi_find_processor_node(table_hdr, acpi_cpu_id);