提交 dfedf6da 编写于 作者: T Tian Tao 提交者: Shile Zhang

ACPI: PPTT: Consistently use unsigned int as parameter type

to #25688970

commit 643956e61ced913a2bbdcf2c95f3d03026b39d1c upstream

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: NTian Tao <tiantao6@huawei.com>
Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
[ rjw: Subject/changelog ]
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Nluanshi <zhangliguang@linux.alibaba.com>
Acked-by: Nzou cao <zoucao@linux.alibaba.com>
Acked-by: NCaspar Zhang <caspar@linux.alibaba.com>
上级 428adfc0
...@@ -98,11 +98,11 @@ static inline bool acpi_pptt_match_type(int table_type, int type) ...@@ -98,11 +98,11 @@ static inline bool acpi_pptt_match_type(int table_type, int type)
* *
* Return: The cache structure and the level we terminated with. * Return: The cache structure and the level we terminated with.
*/ */
static int acpi_pptt_walk_cache(struct acpi_table_header *table_hdr, static unsigned int acpi_pptt_walk_cache(struct acpi_table_header *table_hdr,
int local_level, unsigned int local_level,
struct acpi_subtable_header *res, struct acpi_subtable_header *res,
struct acpi_pptt_cache **found, struct acpi_pptt_cache **found,
int level, int type) unsigned int level, int type)
{ {
struct acpi_pptt_cache *cache; struct acpi_pptt_cache *cache;
...@@ -119,7 +119,7 @@ static int acpi_pptt_walk_cache(struct acpi_table_header *table_hdr, ...@@ -119,7 +119,7 @@ static int acpi_pptt_walk_cache(struct acpi_table_header *table_hdr,
if (*found != NULL && cache != *found) if (*found != NULL && cache != *found)
pr_warn("Found duplicate cache level/type unable to determine uniqueness\n"); pr_warn("Found duplicate cache level/type unable to determine uniqueness\n");
pr_debug("Found cache @ level %d\n", level); pr_debug("Found cache @ level %u\n", level);
*found = cache; *found = cache;
/* /*
* continue looking at this node's resource list * continue looking at this node's resource list
...@@ -132,16 +132,17 @@ static int acpi_pptt_walk_cache(struct acpi_table_header *table_hdr, ...@@ -132,16 +132,17 @@ static int acpi_pptt_walk_cache(struct acpi_table_header *table_hdr,
return local_level; return local_level;
} }
static struct acpi_pptt_cache *acpi_find_cache_level(struct acpi_table_header *table_hdr, static struct acpi_pptt_cache *
acpi_find_cache_level(struct acpi_table_header *table_hdr,
struct acpi_pptt_processor *cpu_node, struct acpi_pptt_processor *cpu_node,
int *starting_level, int level, unsigned int *starting_level, unsigned int level,
int type) int type)
{ {
struct acpi_subtable_header *res; struct acpi_subtable_header *res;
int number_of_levels = *starting_level; unsigned int number_of_levels = *starting_level;
int resource = 0; int resource = 0;
struct acpi_pptt_cache *ret = NULL; struct acpi_pptt_cache *ret = NULL;
int local_level; unsigned int local_level;
/* walk down from processor node */ /* walk down from processor node */
while ((res = acpi_get_pptt_resource(table_hdr, cpu_node, resource))) { while ((res = acpi_get_pptt_resource(table_hdr, cpu_node, resource))) {
...@@ -321,12 +322,12 @@ static struct acpi_pptt_cache *acpi_find_cache_node(struct acpi_table_header *ta ...@@ -321,12 +322,12 @@ static struct acpi_pptt_cache *acpi_find_cache_node(struct acpi_table_header *ta
unsigned int level, unsigned int level,
struct acpi_pptt_processor **node) struct acpi_pptt_processor **node)
{ {
int total_levels = 0; unsigned int total_levels = 0;
struct acpi_pptt_cache *found = NULL; struct acpi_pptt_cache *found = NULL;
struct acpi_pptt_processor *cpu_node; struct acpi_pptt_processor *cpu_node;
u8 acpi_type = acpi_cache_type(type); u8 acpi_type = acpi_cache_type(type);
pr_debug("Looking for CPU %d's level %d cache type %d\n", pr_debug("Looking for CPU %d's level %u cache type %d\n",
acpi_cpu_id, level, acpi_type); acpi_cpu_id, level, acpi_type);
cpu_node = acpi_find_processor_node(table_hdr, acpi_cpu_id); cpu_node = acpi_find_processor_node(table_hdr, acpi_cpu_id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册