Skip to content

Commit ffd5980

Browse files
bvanasschedledford
authored andcommitted
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 <[email protected]> Cc: Max Gurtovoy <[email protected]> Cc: Laurence Oberman <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent ed04191 commit ffd5980

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drivers/infiniband/ulp/srpt/ib_srpt.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -716,8 +716,8 @@ static struct srpt_ioctx **srpt_alloc_ioctx_ring(struct srpt_device *sdev,
716716
struct srpt_ioctx **ring;
717717
int i;
718718

719-
WARN_ON(ioctx_size != sizeof(struct srpt_recv_ioctx)
720-
&& ioctx_size != sizeof(struct srpt_send_ioctx));
719+
WARN_ON(ioctx_size != sizeof(struct srpt_recv_ioctx) &&
720+
ioctx_size != sizeof(struct srpt_send_ioctx));
721721

722722
ring = kvmalloc_array(ring_size, sizeof(ring[0]), GFP_KERNEL);
723723
if (!ring)
@@ -1025,7 +1025,7 @@ static int srpt_get_desc_tbl(struct srpt_send_ioctx *ioctx,
10251025

10261026
if (((srp_cmd->buf_fmt & 0xf) == SRP_DATA_DESC_DIRECT) ||
10271027
((srp_cmd->buf_fmt >> 4) == SRP_DATA_DESC_DIRECT)) {
1028-
struct srp_direct_buf *db = srpt_get_desc_buf(srp_cmd);
1028+
struct srp_direct_buf *db = srpt_get_desc_buf(srp_cmd);
10291029

10301030
*data_len = be32_to_cpu(db->len);
10311031
return srpt_alloc_rw_ctxs(ioctx, db, 1, sg, sg_cnt);
@@ -3580,7 +3580,7 @@ static ssize_t srpt_tpg_enable_show(struct config_item *item, char *page)
35803580
struct se_portal_group *se_tpg = to_tpg(item);
35813581
struct srpt_port *sport = srpt_tpg_to_sport(se_tpg);
35823582

3583-
return snprintf(page, PAGE_SIZE, "%d\n", (sport->enabled) ? 1: 0);
3583+
return snprintf(page, PAGE_SIZE, "%d\n", sport->enabled);
35843584
}
35853585

35863586
static ssize_t srpt_tpg_enable_store(struct config_item *item,
@@ -3589,7 +3589,7 @@ static ssize_t srpt_tpg_enable_store(struct config_item *item,
35893589
struct se_portal_group *se_tpg = to_tpg(item);
35903590
struct srpt_port *sport = srpt_tpg_to_sport(se_tpg);
35913591
unsigned long tmp;
3592-
int ret;
3592+
int ret;
35933593

35943594
ret = kstrtoul(page, 0, &tmp);
35953595
if (ret < 0) {

drivers/infiniband/ulp/srpt/ib_srpt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ struct srpt_recv_ioctx {
179179
struct srpt_ioctx ioctx;
180180
struct list_head wait_list;
181181
};
182-
182+
183183
struct srpt_rw_ctx {
184184
struct rdma_rw_ctx rw;
185185
struct scatterlist *sg;

0 commit comments

Comments
 (0)