From e945943861687d16ae0415207306f75a55bcfd2b Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 9 May 2019 16:26:46 +0000 Subject: [PATCH] iscsi-scst/usr: Improve coding style This patch only affects code formatting and does not change any functionality. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8356 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/usr/ctldev.c | 2 +- iscsi-scst/usr/misc.h | 2 +- iscsi-scst/usr/target.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/iscsi-scst/usr/ctldev.c b/iscsi-scst/usr/ctldev.c index f6a9dbf08..70258cc46 100644 --- a/iscsi-scst/usr/ctldev.c +++ b/iscsi-scst/usr/ctldev.c @@ -338,7 +338,7 @@ int kernel_params_set(u32 tid, u64 sid, int type, u32 partial, if ((err = ioctl(ctrl_fd, ISCSI_PARAM_SET, &info)) < 0) { err = -errno; - log_error("Can't set session params for session 0x%" PRIx64 + log_error("Can't set session params for session 0x%" PRIx64 " (tid %u, type %d, partial %d, err %d): %s\n", sid, tid, type, partial, err, strerror(errno)); } diff --git a/iscsi-scst/usr/misc.h b/iscsi-scst/usr/misc.h index 3b7a2af84..89f9aba36 100644 --- a/iscsi-scst/usr/misc.h +++ b/iscsi-scst/usr/misc.h @@ -50,7 +50,7 @@ static inline int list_length_is_one(const struct __qelem *head) #define container_of(ptr, type, member) ({ \ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ - (type *)( (char *)__mptr - offsetof(type,member) );}) + (type *)((char *)__mptr - offsetof(type, member)); }) #define list_entry(ptr, type, member) \ container_of(ptr, type, member) diff --git a/iscsi-scst/usr/target.c b/iscsi-scst/usr/target.c index 2aa7de3ea..7a2bb818a 100644 --- a/iscsi-scst/usr/target.c +++ b/iscsi-scst/usr/target.c @@ -355,7 +355,8 @@ int target_del(u32 tid, u32 cookie) while (1) { /* We might need to handle session(s) removal event(s) from the kernel */ - while (handle_iscsi_events(nl_fd, false) == 0); + while (handle_iscsi_events(nl_fd, false) == 0) + ; /* Someone else may have already freed the target object by now. */ target = target_find_by_id(tid);