mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 23:39:18 +00:00
acpi: Use pr_warn instead of pr_warning
As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-8-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Len Brown <lenb@kernel.org> Cc: James Morse <james.morse@arm.com> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> [pmladek@suse.com: two more indentation fixes] Signed-off-by: Petr Mladek <pmladek@suse.com>
This commit is contained in:
parent
8d3bcc441e
commit
933ca4e323
@ -170,9 +170,9 @@ rewind:
|
|||||||
if (ip == ctx->ip) {
|
if (ip == ctx->ip) {
|
||||||
if (entry->instruction >= ctx->instructions ||
|
if (entry->instruction >= ctx->instructions ||
|
||||||
!ctx->ins_table[entry->instruction].run) {
|
!ctx->ins_table[entry->instruction].run) {
|
||||||
pr_warning(FW_WARN APEI_PFX
|
pr_warn(FW_WARN APEI_PFX
|
||||||
"Invalid action table, unknown instruction type: %d\n",
|
"Invalid action table, unknown instruction type: %d\n",
|
||||||
entry->instruction);
|
entry->instruction);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
run = ctx->ins_table[entry->instruction].run;
|
run = ctx->ins_table[entry->instruction].run;
|
||||||
@ -211,9 +211,9 @@ static int apei_exec_for_each_entry(struct apei_exec_context *ctx,
|
|||||||
if (end)
|
if (end)
|
||||||
*end = i;
|
*end = i;
|
||||||
if (ins >= ctx->instructions || !ins_table[ins].run) {
|
if (ins >= ctx->instructions || !ins_table[ins].run) {
|
||||||
pr_warning(FW_WARN APEI_PFX
|
pr_warn(FW_WARN APEI_PFX
|
||||||
"Invalid action table, unknown instruction type: %d\n",
|
"Invalid action table, unknown instruction type: %d\n",
|
||||||
ins);
|
ins);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
rc = func(ctx, entry, data);
|
rc = func(ctx, entry, data);
|
||||||
@ -579,18 +579,18 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr,
|
|||||||
space_id = reg->space_id;
|
space_id = reg->space_id;
|
||||||
*paddr = get_unaligned(®->address);
|
*paddr = get_unaligned(®->address);
|
||||||
if (!*paddr) {
|
if (!*paddr) {
|
||||||
pr_warning(FW_BUG APEI_PFX
|
pr_warn(FW_BUG APEI_PFX
|
||||||
"Invalid physical address in GAR [0x%llx/%u/%u/%u/%u]\n",
|
"Invalid physical address in GAR [0x%llx/%u/%u/%u/%u]\n",
|
||||||
*paddr, bit_width, bit_offset, access_size_code,
|
*paddr, bit_width, bit_offset, access_size_code,
|
||||||
space_id);
|
space_id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (access_size_code < 1 || access_size_code > 4) {
|
if (access_size_code < 1 || access_size_code > 4) {
|
||||||
pr_warning(FW_BUG APEI_PFX
|
pr_warn(FW_BUG APEI_PFX
|
||||||
"Invalid access size code in GAR [0x%llx/%u/%u/%u/%u]\n",
|
"Invalid access size code in GAR [0x%llx/%u/%u/%u/%u]\n",
|
||||||
*paddr, bit_width, bit_offset, access_size_code,
|
*paddr, bit_width, bit_offset, access_size_code,
|
||||||
space_id);
|
space_id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
*access_bit_width = 1UL << (access_size_code + 2);
|
*access_bit_width = 1UL << (access_size_code + 2);
|
||||||
@ -604,19 +604,19 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr,
|
|||||||
*access_bit_width = 64;
|
*access_bit_width = 64;
|
||||||
|
|
||||||
if ((bit_width + bit_offset) > *access_bit_width) {
|
if ((bit_width + bit_offset) > *access_bit_width) {
|
||||||
pr_warning(FW_BUG APEI_PFX
|
pr_warn(FW_BUG APEI_PFX
|
||||||
"Invalid bit width + offset in GAR [0x%llx/%u/%u/%u/%u]\n",
|
"Invalid bit width + offset in GAR [0x%llx/%u/%u/%u/%u]\n",
|
||||||
*paddr, bit_width, bit_offset, access_size_code,
|
*paddr, bit_width, bit_offset, access_size_code,
|
||||||
space_id);
|
space_id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY &&
|
if (space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY &&
|
||||||
space_id != ACPI_ADR_SPACE_SYSTEM_IO) {
|
space_id != ACPI_ADR_SPACE_SYSTEM_IO) {
|
||||||
pr_warning(FW_BUG APEI_PFX
|
pr_warn(FW_BUG APEI_PFX
|
||||||
"Invalid address space type in GAR [0x%llx/%u/%u/%u/%u]\n",
|
"Invalid address space type in GAR [0x%llx/%u/%u/%u/%u]\n",
|
||||||
*paddr, bit_width, bit_offset, access_size_code,
|
*paddr, bit_width, bit_offset, access_size_code,
|
||||||
space_id);
|
space_id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ static int einj_get_available_error_type(u32 *type)
|
|||||||
static int einj_timedout(u64 *t)
|
static int einj_timedout(u64 *t)
|
||||||
{
|
{
|
||||||
if ((s64)*t < SPIN_UNIT) {
|
if ((s64)*t < SPIN_UNIT) {
|
||||||
pr_warning(FW_WARN "Firmware does not respond in time\n");
|
pr_warn(FW_WARN "Firmware does not respond in time\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
*t -= SPIN_UNIT;
|
*t -= SPIN_UNIT;
|
||||||
@ -312,7 +312,7 @@ static int __einj_error_trigger(u64 trigger_paddr, u32 type,
|
|||||||
}
|
}
|
||||||
rc = einj_check_trigger_header(trigger_tab);
|
rc = einj_check_trigger_header(trigger_tab);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
pr_warning(FW_BUG "Invalid trigger error action table.\n");
|
pr_warn(FW_BUG "Invalid trigger error action table.\n");
|
||||||
goto out_rel_header;
|
goto out_rel_header;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,9 +118,8 @@ retry:
|
|||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto out;
|
goto out;
|
||||||
if (len > ERST_DBG_RECORD_LEN_MAX) {
|
if (len > ERST_DBG_RECORD_LEN_MAX) {
|
||||||
pr_warning(ERST_DBG_PFX
|
pr_warn(ERST_DBG_PFX
|
||||||
"Record (ID: 0x%llx) length is too long: %zd\n",
|
"Record (ID: 0x%llx) length is too long: %zd\n", id, len);
|
||||||
id, len);
|
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -222,10 +222,10 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic)
|
|||||||
goto err_unmap_read_ack_addr;
|
goto err_unmap_read_ack_addr;
|
||||||
error_block_length = generic->error_block_length;
|
error_block_length = generic->error_block_length;
|
||||||
if (error_block_length > GHES_ESTATUS_MAX_SIZE) {
|
if (error_block_length > GHES_ESTATUS_MAX_SIZE) {
|
||||||
pr_warning(FW_WARN GHES_PFX
|
pr_warn(FW_WARN GHES_PFX
|
||||||
"Error status block length is too long: %u for "
|
"Error status block length is too long: %u for "
|
||||||
"generic hardware error source: %d.\n",
|
"generic hardware error source: %d.\n",
|
||||||
error_block_length, generic->header.source_id);
|
error_block_length, generic->header.source_id);
|
||||||
error_block_length = GHES_ESTATUS_MAX_SIZE;
|
error_block_length = GHES_ESTATUS_MAX_SIZE;
|
||||||
}
|
}
|
||||||
ghes->estatus = kmalloc(error_block_length, GFP_KERNEL);
|
ghes->estatus = kmalloc(error_block_length, GFP_KERNEL);
|
||||||
@ -735,8 +735,8 @@ static void ghes_add_timer(struct ghes *ghes)
|
|||||||
unsigned long expire;
|
unsigned long expire;
|
||||||
|
|
||||||
if (!g->notify.poll_interval) {
|
if (!g->notify.poll_interval) {
|
||||||
pr_warning(FW_WARN GHES_PFX "Poll interval is 0 for generic hardware error source: %d, disabled.\n",
|
pr_warn(FW_WARN GHES_PFX "Poll interval is 0 for generic hardware error source: %d, disabled.\n",
|
||||||
g->header.source_id);
|
g->header.source_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
expire = jiffies + msecs_to_jiffies(g->notify.poll_interval);
|
expire = jiffies + msecs_to_jiffies(g->notify.poll_interval);
|
||||||
@ -1142,21 +1142,20 @@ static int ghes_probe(struct platform_device *ghes_dev)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ACPI_HEST_NOTIFY_LOCAL:
|
case ACPI_HEST_NOTIFY_LOCAL:
|
||||||
pr_warning(GHES_PFX "Generic hardware error source: %d notified via local interrupt is not supported!\n",
|
pr_warn(GHES_PFX "Generic hardware error source: %d notified via local interrupt is not supported!\n",
|
||||||
generic->header.source_id);
|
generic->header.source_id);
|
||||||
goto err;
|
goto err;
|
||||||
default:
|
default:
|
||||||
pr_warning(FW_WARN GHES_PFX "Unknown notification type: %u for generic hardware error source: %d\n",
|
pr_warn(FW_WARN GHES_PFX "Unknown notification type: %u for generic hardware error source: %d\n",
|
||||||
generic->notify.type, generic->header.source_id);
|
generic->notify.type, generic->header.source_id);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
if (generic->error_block_length <
|
if (generic->error_block_length <
|
||||||
sizeof(struct acpi_hest_generic_status)) {
|
sizeof(struct acpi_hest_generic_status)) {
|
||||||
pr_warning(FW_BUG GHES_PFX "Invalid error block length: %u for generic hardware error source: %d\n",
|
pr_warn(FW_BUG GHES_PFX "Invalid error block length: %u for generic hardware error source: %d\n",
|
||||||
generic->error_block_length,
|
generic->error_block_length, generic->header.source_id);
|
||||||
generic->header.source_id);
|
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
ghes = ghes_new(generic);
|
ghes = ghes_new(generic);
|
||||||
|
@ -92,15 +92,15 @@ int apei_hest_parse(apei_hest_func_t func, void *data)
|
|||||||
for (i = 0; i < hest_tab->error_source_count; i++) {
|
for (i = 0; i < hest_tab->error_source_count; i++) {
|
||||||
len = hest_esrc_len(hest_hdr);
|
len = hest_esrc_len(hest_hdr);
|
||||||
if (!len) {
|
if (!len) {
|
||||||
pr_warning(FW_WARN HEST_PFX
|
pr_warn(FW_WARN HEST_PFX
|
||||||
"Unknown or unused hardware error source "
|
"Unknown or unused hardware error source "
|
||||||
"type: %d for hardware error source: %d.\n",
|
"type: %d for hardware error source: %d.\n",
|
||||||
hest_hdr->type, hest_hdr->source_id);
|
hest_hdr->type, hest_hdr->source_id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
if ((void *)hest_hdr + len >
|
if ((void *)hest_hdr + len >
|
||||||
(void *)hest_tab + hest_tab->header.length) {
|
(void *)hest_tab + hest_tab->header.length) {
|
||||||
pr_warning(FW_BUG HEST_PFX
|
pr_warn(FW_BUG HEST_PFX
|
||||||
"Table contents overflow for hardware error source: %d.\n",
|
"Table contents overflow for hardware error source: %d.\n",
|
||||||
hest_hdr->source_id);
|
hest_hdr->source_id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@ -164,8 +164,8 @@ static int __init hest_parse_ghes(struct acpi_hest_header *hest_hdr, void *data)
|
|||||||
ghes_dev = ghes_arr->ghes_devs[i];
|
ghes_dev = ghes_arr->ghes_devs[i];
|
||||||
hdr = *(struct acpi_hest_header **)ghes_dev->dev.platform_data;
|
hdr = *(struct acpi_hest_header **)ghes_dev->dev.platform_data;
|
||||||
if (hdr->source_id == hest_hdr->source_id) {
|
if (hdr->source_id == hest_hdr->source_id) {
|
||||||
pr_warning(FW_WARN HEST_PFX "Duplicated hardware error source ID: %d.\n",
|
pr_warn(FW_WARN HEST_PFX "Duplicated hardware error source ID: %d.\n",
|
||||||
hdr->source_id);
|
hdr->source_id);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1176,7 +1176,7 @@ static const struct file_operations acpi_battery_alarm_fops = {
|
|||||||
|
|
||||||
static int acpi_battery_add_fs(struct acpi_device *device)
|
static int acpi_battery_add_fs(struct acpi_device *device)
|
||||||
{
|
{
|
||||||
pr_warning(PREFIX "Deprecated procfs I/F for battery is loaded, please retry with CONFIG_ACPI_PROCFS_POWER cleared\n");
|
pr_warn(PREFIX "Deprecated procfs I/F for battery is loaded, please retry with CONFIG_ACPI_PROCFS_POWER cleared\n");
|
||||||
if (!acpi_device_dir(device)) {
|
if (!acpi_device_dir(device)) {
|
||||||
acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
|
acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
|
||||||
acpi_battery_dir);
|
acpi_battery_dir);
|
||||||
|
@ -413,8 +413,8 @@ static void acpi_dev_get_irqresource(struct resource *res, u32 gsi,
|
|||||||
u8 pol = p ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH;
|
u8 pol = p ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH;
|
||||||
|
|
||||||
if (triggering != trig || polarity != pol) {
|
if (triggering != trig || polarity != pol) {
|
||||||
pr_warning("ACPI: IRQ %d override to %s, %s\n", gsi,
|
pr_warn("ACPI: IRQ %d override to %s, %s\n", gsi,
|
||||||
t ? "level" : "edge", p ? "low" : "high");
|
t ? "level" : "edge", p ? "low" : "high");
|
||||||
triggering = trig;
|
triggering = trig;
|
||||||
polarity = pol;
|
polarity = pol;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user