From patchwork Mon Dec 17 21:20:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10734319 X-Patchwork-Delegate: dledford@redhat.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C89DC13B5 for ; Mon, 17 Dec 2018 21:21:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC7B62A1C4 for ; Mon, 17 Dec 2018 21:21:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B131E2A1D9; Mon, 17 Dec 2018 21:21:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C3D32A1C4 for ; Mon, 17 Dec 2018 21:21:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732511AbeLQVV0 (ORCPT ); Mon, 17 Dec 2018 16:21:26 -0500 Received: from com-out001.mailprotect.be ([83.217.72.83]:35199 "EHLO com-out001.mailprotect.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728315AbeLQVVZ (ORCPT ); Mon, 17 Dec 2018 16:21:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mailprotect.be; s=mail; h=Content-Transfer-Encoding:MIME-Version:References :In-Reply-To:Message-Id:Date:Subject:Cc:To:From:reply-to:sender:bcc: content-type; bh=n7Pod7j9vD4itb/XofW/cNHPZibAbM4uZ2kM6QbFrPw=; b=Ysu3Q57LCR31 kuut+9qCtAKPUqkI/UPeCwdheNJwvHIuPE7/+JJG0J25hQgJM0L+U8BWObBdTU6Xdr8FJ77lRAVYx tI6qIpuoE50vdXThszfOqcyYYN+ZnFnd+D5uTeVjn28H97LnLpM/YXLVzCWlR5vIIkSh2Dc8qvBkA EdrHdnsN42YOb9bKO6cr3ZiYWDUuCqTFQWO5z6DdkO8/Xv9rsVJWMhfkVx7KHU9Lmz+G/S6DlO/oC yM6BE+/C0e5KuJqUiDv73XtgiPZyD8ofnGyi8duz2a7Mz54GUpejpqfbxV+x/7lcsEUN+90npSpC/ JTDsNF6oMU80aOvvUrYMOw==; Received: from smtp-auth.mailprotect.be ([178.208.39.159]) by com-mpt-out001.mailprotect.be with esmtp (Exim 4.89) (envelope-from ) id 1gZ0KH-0001c0-J8; Mon, 17 Dec 2018 22:21:22 +0100 Received: from desktop-bart.svl.corp.google.com (unknown [104.133.8.89]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-auth.mailprotect.be (Postfix) with ESMTPSA id 1D2CAC0696; Mon, 17 Dec 2018 22:21:18 +0100 (CET) From: Bart Van Assche To: Jason Gunthorpe Cc: Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche , Sergey Gorenko , Max Gurtovoy , Laurence Oberman Subject: [PATCH v2 10/15] RDMA/srpt: Improve coding style conformance Date: Mon, 17 Dec 2018 13:20:41 -0800 Message-Id: <20181217212046.71017-11-bvanassche@acm.org> X-Mailer: git-send-email 2.20.0.405.gbc1bbc6f85-goog In-Reply-To: <20181217212046.71017-1-bvanassche@acm.org> References: <20181217212046.71017-1-bvanassche@acm.org> MIME-Version: 1.0 X-Originating-IP: 178.208.39.159 X-SpamExperts-Domain: mailprotect.be X-SpamExperts-Username: 178.208.39.128/27 Authentication-Results: mailprotect.be; auth=pass smtp.auth=178.208.39.128/27@mailprotect.be X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.03) X-Recommended-Action: accept X-Filter-ID: EX5BVjFpneJeBchSMxfU5onDgOt1ZBaTvBueWIwpsY1602E9L7XzfQH6nu9C/Fh9KJzpNe6xgvOx q3u0UDjvO1tLifGj39bI0bcPyaJsYTbLl/LY5YF9Vo2OhJGJjKCGCCZpQ81ZPiyihk8FOHdtvo4l V1QHumGYL6MoCWQBeDaU32qUPOJX7vhbzYcc5l71m4VKGlZauPS2ZI2/MGgfC8Av92G8VFvri8dZ 651y1LnBHvoYB1tNyzlE795H++xpIGTTJ1+gdXdk1Q+yT5nnaqsSkubKoeJsHgdbUJ7agEzXnQGj WDOitbxNOIjwRljNJZMtxzImHKk4O79ElwsbF8902MBxp+G42GIBqokZAnJ5xBHkCMCjMposz65/ e+f6NiSg6RpPztwkEB6XvRg4fu70pheH5TNN6RiG9N0Jt+0ML5i3g2GFaGQnZ3KowlU8anvoc7s0 eHtsyrH7f4vWs1KcgxQTqdSE3cxlP67ssuZxn2a3k66wqHQRkdHrnUf0XuDVW1RAVP/E7/UYy9T8 rkAMvHmBTTipZKIPq3iOj9tSKKqNUqeXR0rRzsN1a4pGQL1kekvvDc/yYbCCC8p9CUWioSPTx/yi OJKFnIIso8zn0j1QBmC0JIZXgnugZTuCZyCgxZHINA6A5+7T9o6by3MDjiILWse2C7xyo18DbRKd 6+6AB9mEpRX5vy67WwDjehIqUczFWeS6sE8e1b5/UkBg4yvMn5MBAdwJubari/j0NbttK1RyTzg9 21y9+zCxEJ+kDHjc6reKBJd0yzB99IIuthuXhHiWWVvkEIELVdQHmFDqewO9xyOqCYO8P1aHTwaH Q1Qo4eQXu+BLLP1GOzxnZ5UDYNafOy0Jr+QbiT1CJ/k2Jo+Zn4s9cWJWa0GqPkin+M+n/jXu6/99 KOMlrjA0XAoGECHs14pjPDDBgal9xZYz2MK6AE8POx8Vj5IowvN37m5jVBzbJVK+1TbHx6sumKDm q4xJXUDuWerVD+MU005YMQtTGkqF9DfSXeTqAPYZ+qew/k57ykPFspXtKlKxHB/etGG+jKYi/tvO WyEnBy/PpUxgSFRPcWxJF+/bZGcrdi6P9WA8qPaxL9ILtEIqJpgLAx9UBkVVtWWC7u0df68W0InH /+bTMKNm38MHe3iJ5ql2Fx06AJIYSscySZesPRxtLbAe07w72Y8M1+Qa8Q/Annoe3C1wCMjQ1GK/ MS+4ayUpOtEhdxekWDmK9g== X-Report-Abuse-To: spam@com-mpt-mgt001.mailprotect.be Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Bart Van Assche --- drivers/infiniband/ulp/srpt/ib_srpt.c | 10 +++++----- drivers/infiniband/ulp/srpt/ib_srpt.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 02d9b758e58f..6124ff46923a 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -716,8 +716,8 @@ static struct srpt_ioctx **srpt_alloc_ioctx_ring(struct srpt_device *sdev, struct srpt_ioctx **ring; int i; - WARN_ON(ioctx_size != sizeof(struct srpt_recv_ioctx) - && ioctx_size != sizeof(struct srpt_send_ioctx)); + WARN_ON(ioctx_size != sizeof(struct srpt_recv_ioctx) && + ioctx_size != sizeof(struct srpt_send_ioctx)); ring = kvmalloc_array(ring_size, sizeof(ring[0]), GFP_KERNEL); if (!ring) @@ -1025,7 +1025,7 @@ static int srpt_get_desc_tbl(struct srpt_send_ioctx *ioctx, if (((srp_cmd->buf_fmt & 0xf) == SRP_DATA_DESC_DIRECT) || ((srp_cmd->buf_fmt >> 4) == SRP_DATA_DESC_DIRECT)) { - struct srp_direct_buf *db = srpt_get_desc_buf(srp_cmd); + struct srp_direct_buf *db = srpt_get_desc_buf(srp_cmd); *data_len = be32_to_cpu(db->len); 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) struct se_portal_group *se_tpg = to_tpg(item); 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, @@ -3589,7 +3589,7 @@ static ssize_t srpt_tpg_enable_store(struct config_item *item, struct se_portal_group *se_tpg = to_tpg(item); struct srpt_port *sport = srpt_tpg_to_sport(se_tpg); unsigned long tmp; - int ret; + int ret; ret = kstrtoul(page, 0, &tmp); if (ret < 0) { diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.h b/drivers/infiniband/ulp/srpt/ib_srpt.h index ce8b14f83785..c4a0b8519dbb 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.h +++ b/drivers/infiniband/ulp/srpt/ib_srpt.h @@ -179,7 +179,7 @@ struct srpt_recv_ioctx { struct srpt_ioctx ioctx; struct list_head wait_list; }; - + struct srpt_rw_ctx { struct rdma_rw_ctx rw; struct scatterlist *sg;