Commit ffd59806 authored by Bart Van Assche's avatar Bart Van Assche Committed by Doug Ledford

RDMA/srpt: Improve coding style conformance

Use tabs instead of spaces for indentation. Make sure that multi-line
expressions have the operator at the end of a line instead of the start.
Avoid a complaint about a missing space in a ternary expression by
changing '(boolean) ? 1: 0' into 'boolean'.

Cc: Sergey Gorenko <sergeygo@mellanox.com>
Cc: Max Gurtovoy <maxg@mellanox.com>
Cc: Laurence Oberman <loberman@redhat.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent ed041919
...@@ -716,8 +716,8 @@ static struct srpt_ioctx **srpt_alloc_ioctx_ring(struct srpt_device *sdev, ...@@ -716,8 +716,8 @@ static struct srpt_ioctx **srpt_alloc_ioctx_ring(struct srpt_device *sdev,
struct srpt_ioctx **ring; struct srpt_ioctx **ring;
int i; int i;
WARN_ON(ioctx_size != sizeof(struct srpt_recv_ioctx) WARN_ON(ioctx_size != sizeof(struct srpt_recv_ioctx) &&
&& ioctx_size != sizeof(struct srpt_send_ioctx)); ioctx_size != sizeof(struct srpt_send_ioctx));
ring = kvmalloc_array(ring_size, sizeof(ring[0]), GFP_KERNEL); ring = kvmalloc_array(ring_size, sizeof(ring[0]), GFP_KERNEL);
if (!ring) if (!ring)
...@@ -3580,7 +3580,7 @@ static ssize_t srpt_tpg_enable_show(struct config_item *item, char *page) ...@@ -3580,7 +3580,7 @@ static ssize_t srpt_tpg_enable_show(struct config_item *item, char *page)
struct se_portal_group *se_tpg = to_tpg(item); struct se_portal_group *se_tpg = to_tpg(item);
struct srpt_port *sport = srpt_tpg_to_sport(se_tpg); struct srpt_port *sport = srpt_tpg_to_sport(se_tpg);
return snprintf(page, PAGE_SIZE, "%d\n", (sport->enabled) ? 1: 0); return snprintf(page, PAGE_SIZE, "%d\n", sport->enabled);
} }
static ssize_t srpt_tpg_enable_store(struct config_item *item, static ssize_t srpt_tpg_enable_store(struct config_item *item,
......
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