soc: qcom: minidump: update error message log level
Current implementation uses pr_info to print error messages. Update driver prints log level with pr_err instead of pr_info, and also update with proper error number for minidump table update failure return. Change-Id: I27667715c71b361b9ee0f7856c94242d3ca21014 Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
This commit is contained in:
parent
d2e8712af2
commit
e1e90feb55
3 changed files with 12 additions and 12 deletions
|
@ -498,12 +498,12 @@ static size_t store_dload_mode(struct kobject *kobj, struct attribute *attr,
|
|||
dload_type = SCM_DLOAD_FULLDUMP;
|
||||
} else if (sysfs_streq(buf, "mini")) {
|
||||
if (!msm_minidump_enabled()) {
|
||||
pr_info("Minidump is not enabled\n");
|
||||
pr_err("Minidump is not enabled\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
dload_type = SCM_DLOAD_MINIDUMP;
|
||||
} else {
|
||||
pr_info("Invalid value. Use 'full' or 'mini'\n");
|
||||
pr_err("Invalid value. Use 'full' or 'mini'\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ int msm_dump_data_add_minidump(struct msm_dump_entry *entry)
|
|||
|
||||
data = (struct msm_dump_data *)(phys_to_virt(entry->addr));
|
||||
if (!strcmp(data->name, "")) {
|
||||
pr_info("Entry name is NULL, Use ID %d for minidump\n",
|
||||
pr_debug("Entry name is NULL, Use ID %d for minidump\n",
|
||||
entry->id);
|
||||
snprintf(md_entry.name, sizeof(md_entry.name), "KMDT0x%X",
|
||||
entry->id);
|
||||
|
@ -133,7 +133,7 @@ int msm_dump_data_register(enum msm_dump_table_ids id,
|
|||
dmac_flush_range(table, (void *)table + sizeof(struct msm_dump_table));
|
||||
|
||||
if (msm_dump_data_add_minidump(entry))
|
||||
pr_info("Failed to add entry in Minidump table\n");
|
||||
pr_err("Failed to add entry in Minidump table\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ static int md_update_smem_table(const struct md_region *entry)
|
|||
struct md_smem_region *mdr;
|
||||
|
||||
if (!minidump_enabled) {
|
||||
pr_info("Table in smem is not setup\n");
|
||||
pr_err("Table in smem is not setup\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -196,19 +196,19 @@ int msm_minidump_add_region(const struct md_region *entry)
|
|||
|
||||
if (((strlen(entry->name) > MAX_NAME_LENGTH) ||
|
||||
md_check_name(entry->name)) && !entry->virt_addr) {
|
||||
pr_info("Invalid entry details\n");
|
||||
pr_err("Invalid entry details\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!IS_ALIGNED(entry->size, 4)) {
|
||||
pr_info("size should be 4 byte aligned\n");
|
||||
pr_err("size should be 4 byte aligned\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
spin_lock(&mdt_lock);
|
||||
entries = minidump_table.num_regions;
|
||||
if (entries >= MAX_NUM_ENTRIES) {
|
||||
pr_info("Maximum entries reached.\n");
|
||||
pr_err("Maximum entries reached.\n");
|
||||
spin_unlock(&mdt_lock);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
@ -325,13 +325,13 @@ static int __init msm_minidump_init(void)
|
|||
smem_table = smem_get_entry(SMEM_MINIDUMP_TABLE_ID, &size, 0,
|
||||
SMEM_ANY_HOST_FLAG);
|
||||
if (IS_ERR_OR_NULL(smem_table)) {
|
||||
pr_info("SMEM is not initialized.\n");
|
||||
pr_err("SMEM is not initialized.\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if ((smem_table->next_avail_offset + MAX_MEM_LENGTH) >
|
||||
smem_table->smem_length) {
|
||||
pr_info("SMEM memory not available.\n");
|
||||
pr_err("SMEM memory not available.\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
@ -353,10 +353,10 @@ static int __init msm_minidump_init(void)
|
|||
for (i = 0; i < pendings; i++) {
|
||||
mdr = &minidump_table.entry[i];
|
||||
if (md_update_smem_table(mdr)) {
|
||||
pr_info("Unable to add entry %s to smem table\n",
|
||||
pr_err("Unable to add entry %s to smem table\n",
|
||||
mdr->name);
|
||||
spin_unlock(&mdt_lock);
|
||||
return -ENODEV;
|
||||
return -ENOENT;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue