Use 'seq_printf(m, "...%*phN...")' instead of duplicating its
implementation.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
Christophe JAILLET 2017-12-09 07:29:26 +01:00 коммит произвёл Martin Schwidefsky
Родитель 7bceec4e58
Коммит c7848e14f4
1 изменённых файлов: 2 добавлений и 5 удалений

Просмотреть файл

@ -5231,7 +5231,7 @@ static int dasd_hosts_print(struct dasd_device *device, struct seq_file *m)
struct dasd_ckd_path_group_entry *entry; struct dasd_ckd_path_group_entry *entry;
struct dasd_ckd_host_information *info; struct dasd_ckd_host_information *info;
char sysplex[9] = ""; char sysplex[9] = "";
int rc, i, j; int rc, i;
access = kzalloc(sizeof(*access), GFP_NOIO); access = kzalloc(sizeof(*access), GFP_NOIO);
if (!access) { if (!access) {
@ -5251,10 +5251,7 @@ static int dasd_hosts_print(struct dasd_device *device, struct seq_file *m)
entry = (struct dasd_ckd_path_group_entry *) entry = (struct dasd_ckd_path_group_entry *)
(info->entry + i * info->entry_size); (info->entry + i * info->entry_size);
/* PGID */ /* PGID */
seq_puts(m, "pgid "); seq_printf(m, "pgid %*phN\n", 11, entry->pgid);
for (j = 0; j < 11; j++)
seq_printf(m, "%02x", entry->pgid[j]);
seq_putc(m, '\n');
/* FLAGS */ /* FLAGS */
seq_printf(m, "status_flags %02x\n", entry->status_flags); seq_printf(m, "status_flags %02x\n", entry->status_flags);
/* SYSPLEX NAME */ /* SYSPLEX NAME */