From c7848e14f45df6fed6227c7436c49f44bd29a957 Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Sat, 9 Dec 2017 07:29:26 +0100 Subject: s390/dasd: Simplify code Use 'seq_printf(m, "...%*phN...")' instead of duplicating its implementation. Signed-off-by: Christophe JAILLET Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky --- drivers/s390/block/dasd_eckd.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index a2edf2a7ace9..29397a9dba68 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c @@ -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_host_information *info; char sysplex[9] = ""; - int rc, i, j; + int rc, i; access = kzalloc(sizeof(*access), GFP_NOIO); 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 *) (info->entry + i * info->entry_size); /* PGID */ - seq_puts(m, "pgid "); - for (j = 0; j < 11; j++) - seq_printf(m, "%02x", entry->pgid[j]); - seq_putc(m, '\n'); + seq_printf(m, "pgid %*phN\n", 11, entry->pgid); /* FLAGS */ seq_printf(m, "status_flags %02x\n", entry->status_flags); /* SYSPLEX NAME */ -- cgit From d62f7abcf38eef67581c3afb164dd826064ab90d Mon Sep 17 00:00:00 2001 From: Jan Höppner Date: Thu, 30 Nov 2017 19:18:21 +0100 Subject: s390/dasd: Remove dead return code checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In dasd_term_IO() ccw_device_clear() is called and the return code is checked afterwards. Though, the return codes -EIO and -EBUSY will never be returned and can therefore be removed from the check. In dasd_start_IO() the return code of either ccw_device_tm_start() or ccw_device_start() is checked. However, neither of them returns -ETIMEDOUT. Remove that check as well. Signed-off-by: Jan Höppner Acked-by: Stefan Haberland Signed-off-by: Martin Schwidefsky --- drivers/s390/block/dasd.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'drivers') diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index d4e8dff673cc..a7c15f0085e2 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -1393,10 +1393,6 @@ int dasd_term_IO(struct dasd_ccw_req *cqr) DBF_DEV_EVENT(DBF_ERR, device, "%s", "device gone, retry"); break; - case -EIO: - DBF_DEV_EVENT(DBF_ERR, device, "%s", - "I/O error, retry"); - break; case -EINVAL: /* * device not valid so no I/O could be running @@ -1412,10 +1408,6 @@ int dasd_term_IO(struct dasd_ccw_req *cqr) /* fake rc to success */ rc = 0; break; - case -EBUSY: - DBF_DEV_EVENT(DBF_ERR, device, "%s", - "device busy, retry later"); - break; default: /* internal error 10 - unknown rc*/ snprintf(errorstring, ERRORLENGTH, "10 %d", rc); @@ -1489,10 +1481,6 @@ int dasd_start_IO(struct dasd_ccw_req *cqr) DBF_DEV_EVENT(DBF_WARNING, device, "%s", "start_IO: device busy, retry later"); break; - case -ETIMEDOUT: - DBF_DEV_EVENT(DBF_WARNING, device, "%s", - "start_IO: request timeout, retry later"); - break; case -EACCES: /* -EACCES indicates that the request used only a subset of the * available paths and all these paths are gone. If the lpm of -- cgit From 401a0b8c20a77e9235222648c61f023161ec1477 Mon Sep 17 00:00:00 2001 From: Vasily Gorbik Date: Wed, 10 Jan 2018 12:09:49 +0100 Subject: s390/sclp: fix .data section specification "__section(data)" has to be "__section(.data)". __section(data) produces extra "data" section in addition to ".data" section. Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky --- drivers/s390/char/sclp_early_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/s390/char/sclp_early_core.c b/drivers/s390/char/sclp_early_core.c index edeb2597b0b8..17b0c67f3e8d 100644 --- a/drivers/s390/char/sclp_early_core.c +++ b/drivers/s390/char/sclp_early_core.c @@ -12,8 +12,8 @@ #include "sclp.h" #include "sclp_rw.h" -char sclp_early_sccb[PAGE_SIZE] __aligned(PAGE_SIZE) __section(data); -int sclp_init_state __section(data) = sclp_init_state_uninitialized; +char sclp_early_sccb[PAGE_SIZE] __aligned(PAGE_SIZE) __section(.data); +int sclp_init_state __section(.data) = sclp_init_state_uninitialized; void sclp_early_wait_irq(void) { -- cgit