Commit 55c0698a authored by Simon Sandström's avatar Simon Sandström Committed by Greg Kroah-Hartman

staging: ccree: Fix alignment issues in ssi_sysfs.c

Fixes checkpatch.pl alignment warnings.
Signed-off-by: default avatarSimon Sandström <simon@nikanor.nu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5c6ffda0
......@@ -143,8 +143,12 @@ static void display_db(struct stat_item item[MAX_STAT_OP_TYPES][MAX_STAT_PHASES]
avg = (u64)item[i][j].sum;
do_div(avg, item[i][j].count);
SSI_LOG_ERR("%s, %s: min=%d avg=%d max=%d sum=%lld count=%d\n",
stat_name_db[i].op_type_name, stat_name_db[i].stat_phase_name[j],
item[i][j].min, (int)avg, item[i][j].max, (long long)item[i][j].sum, item[i][j].count);
stat_name_db[i].op_type_name,
stat_name_db[i].stat_phase_name[j],
item[i][j].min, (int)avg,
item[i][j].max,
(long long)item[i][j].sum,
item[i][j].count);
}
}
}
......@@ -155,14 +159,16 @@ static void display_db(struct stat_item item[MAX_STAT_OP_TYPES][MAX_STAT_PHASES]
**************************************/
static ssize_t ssi_sys_stats_host_db_clear(struct kobject *kobj,
struct kobj_attribute *attr, const char *buf, size_t count)
struct kobj_attribute *attr,
const char *buf, size_t count)
{
init_db(stat_host_db);
return count;
}
static ssize_t ssi_sys_stats_cc_db_clear(struct kobject *kobj,
struct kobj_attribute *attr, const char *buf, size_t count)
struct kobj_attribute *attr,
const char *buf, size_t count)
{
init_db(stat_cc_db);
return count;
......@@ -230,12 +236,9 @@ static ssize_t ssi_sys_stat_cc_db_show(struct kobject *kobj,
} else {
avg = min_cyc = max_cyc = 0;
}
tmp_len = scnprintf(line, 256,
"%s\t%6u\t%6u\t%6u\t%7u\n",
stat_name_db[i].op_type_name,
min_cyc,
(unsigned int)avg,
max_cyc,
tmp_len = scnprintf(line, 256, "%s\t%6u\t%6u\t%6u\t%7u\n",
stat_name_db[i].op_type_name, min_cyc,
(unsigned int)avg, max_cyc,
stat_cc_db[i][STAT_PHASE_6].count);
if (tmp_len < 0)/* scnprintf shouldn't return negative value according to its implementation*/
......@@ -420,8 +423,8 @@ int ssi_sysfs_init(struct kobject *sys_dev_obj, struct ssi_drvdata *drvdata)
SSI_LOG_ERR("setup sysfs under %s\n", sys_dev_obj->name);
/* Initialize top directory */
retval = sys_init_dir(&sys_top_dir, drvdata, sys_dev_obj,
"cc_info", ssi_sys_top_level_attrs,
retval = sys_init_dir(&sys_top_dir, drvdata, sys_dev_obj, "cc_info",
ssi_sys_top_level_attrs,
ARRAY_SIZE(ssi_sys_top_level_attrs));
return retval;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment