{"id":816165,"url":"http://patchwork.ozlabs.org/api/1.2/patches/816165/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/patch/20170920115813.63745-10-ubraun@linux.vnet.ibm.com/","project":{"id":7,"url":"http://patchwork.ozlabs.org/api/1.2/projects/7/?format=json","name":"Linux network development","link_name":"netdev","list_id":"netdev.vger.kernel.org","list_email":"netdev@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170920115813.63745-10-ubraun@linux.vnet.ibm.com>","list_archive_url":null,"date":"2017-09-20T11:58:12","name":"[net-next,09/10] net/smc: parameter cleanup in smc_cdc_get_free_slot()","commit_ref":null,"pull_url":null,"state":"changes-requested","archived":true,"hash":"b3cffc1de0980fdcfd437b3ecb46cf0d2458e95b","submitter":{"id":2266,"url":"http://patchwork.ozlabs.org/api/1.2/people/2266/?format=json","name":"Ursula Braun","email":"ubraun@linux.vnet.ibm.com"},"delegate":{"id":34,"url":"http://patchwork.ozlabs.org/api/1.2/users/34/?format=json","username":"davem","first_name":"David","last_name":"Miller","email":"davem@davemloft.net"},"mbox":"http://patchwork.ozlabs.org/project/netdev/patch/20170920115813.63745-10-ubraun@linux.vnet.ibm.com/mbox/","series":[{"id":4092,"url":"http://patchwork.ozlabs.org/api/1.2/series/4092/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/list/?series=4092","date":"2017-09-20T11:58:04","name":"net/smc: updates 2017-09-20","version":1,"mbox":"http://patchwork.ozlabs.org/series/4092/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/816165/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/816165/checks/","tags":{},"related":[],"headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xxyvM07y2z9t2Q\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 20 Sep 2017 21:58:55 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751970AbdITL6l (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 20 Sep 2017 07:58:41 -0400","from mx0b-001b2d01.pphosted.com ([148.163.158.5]:59774 \"EHLO\n\tmx0a-001b2d01.pphosted.com\" rhost-flags-OK-OK-OK-FAIL)\n\tby vger.kernel.org with ESMTP id S1751955AbdITL6g (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 20 Sep 2017 07:58:36 -0400","from pps.filterd (m0098419.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv8KBsgWl114039\n\tfor <netdev@vger.kernel.org>; Wed, 20 Sep 2017 07:58:36 -0400","from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 2d3qnjs596-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <netdev@vger.kernel.org>; Wed, 20 Sep 2017 07:58:35 -0400","from localhost\n\tby e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <netdev@vger.kernel.org> from <ubraun@linux.vnet.ibm.com>;\n\tWed, 20 Sep 2017 12:58:34 +0100","from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197)\n\tby e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP\n\tGateway: Authorized Use Only! Violators will be prosecuted; \n\tWed, 20 Sep 2017 12:58:31 +0100","from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com\n\t[9.149.105.59])\n\tby b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v8KBwVTu4129020; Wed, 20 Sep 2017 11:58:31 GMT","from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 629E2A404D;\n\tWed, 20 Sep 2017 12:54:32 +0100 (BST)","from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 17AA7A4040;\n\tWed, 20 Sep 2017 12:54:32 +0100 (BST)","from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9])\n\tby d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS;\n\tWed, 20 Sep 2017 12:54:32 +0100 (BST)"],"From":"Ursula Braun <ubraun@linux.vnet.ibm.com>","To":"davem@davemloft.net","Cc":"netdev@vger.kernel.org, linux-rdma@vger.kernel.org,\n\tlinux-s390@vger.kernel.org, jwi@linux.vnet.ibm.com,\n\tschwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,\n\traspl@linux.vnet.ibm.com, ubraun@linux.vnet.ibm.com","Subject":"[PATCH net-next 09/10] net/smc: parameter cleanup in\n\tsmc_cdc_get_free_slot()","Date":"Wed, 20 Sep 2017 13:58:12 +0200","X-Mailer":"git-send-email 2.13.5","In-Reply-To":"<20170920115813.63745-1-ubraun@linux.vnet.ibm.com>","References":"<20170920115813.63745-1-ubraun@linux.vnet.ibm.com>","X-TM-AS-GCONF":"00","x-cbid":"17092011-0040-0000-0000-000003FBA389","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17092011-0041-0000-0000-0000209CD9AD","Message-Id":"<20170920115813.63745-10-ubraun@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-20_03:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=3\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1709200163","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"},"content":"Use the smc_connection as first parameter with smc_cdc_get_free_slot().\nThis is just a small code cleanup, no functional change.\n\nSigned-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>\n---\n net/smc/smc_cdc.c | 7 ++++---\n net/smc/smc_cdc.h | 3 ++-\n net/smc/smc_tx.c  | 6 ++----\n 3 files changed, 8 insertions(+), 8 deletions(-)","diff":"diff --git a/net/smc/smc_cdc.c b/net/smc/smc_cdc.c\nindex a7294edbc221..5ef97e5a5f78 100644\n--- a/net/smc/smc_cdc.c\n+++ b/net/smc/smc_cdc.c\n@@ -62,10 +62,12 @@ static void smc_cdc_tx_handler(struct smc_wr_tx_pend_priv *pnd_snd,\n \tbh_unlock_sock(&smc->sk);\n }\n \n-int smc_cdc_get_free_slot(struct smc_link *link,\n+int smc_cdc_get_free_slot(struct smc_connection *conn,\n \t\t\t  struct smc_wr_buf **wr_buf,\n \t\t\t  struct smc_cdc_tx_pend **pend)\n {\n+\tstruct smc_link *link = &conn->lgr->lnk[SMC_SINGLE_LINK];\n+\n \treturn smc_wr_tx_get_free_slot(link, smc_cdc_tx_handler, wr_buf,\n \t\t\t\t       (struct smc_wr_tx_pend_priv **)pend);\n }\n@@ -118,8 +120,7 @@ int smc_cdc_get_slot_and_msg_send(struct smc_connection *conn)\n \tstruct smc_wr_buf *wr_buf;\n \tint rc;\n \n-\trc = smc_cdc_get_free_slot(&conn->lgr->lnk[SMC_SINGLE_LINK], &wr_buf,\n-\t\t\t\t   &pend);\n+\trc = smc_cdc_get_free_slot(conn, &wr_buf, &pend);\n \tif (rc)\n \t\treturn rc;\n \ndiff --git a/net/smc/smc_cdc.h b/net/smc/smc_cdc.h\nindex 8e1d76f26007..56f883d1159c 100644\n--- a/net/smc/smc_cdc.h\n+++ b/net/smc/smc_cdc.h\n@@ -206,7 +206,8 @@ static inline void smc_cdc_msg_to_host(struct smc_host_cdc_msg *local,\n \n struct smc_cdc_tx_pend;\n \n-int smc_cdc_get_free_slot(struct smc_link *link, struct smc_wr_buf **wr_buf,\n+int smc_cdc_get_free_slot(struct smc_connection *conn,\n+\t\t\t  struct smc_wr_buf **wr_buf,\n \t\t\t  struct smc_cdc_tx_pend **pend);\n void smc_cdc_tx_dismiss_slots(struct smc_connection *conn);\n int smc_cdc_msg_send(struct smc_connection *conn, struct smc_wr_buf *wr_buf,\ndiff --git a/net/smc/smc_tx.c b/net/smc/smc_tx.c\nindex 3866573288dd..ec49bc3c3283 100644\n--- a/net/smc/smc_tx.c\n+++ b/net/smc/smc_tx.c\n@@ -396,8 +396,7 @@ int smc_tx_sndbuf_nonempty(struct smc_connection *conn)\n \tint rc;\n \n \tspin_lock_bh(&conn->send_lock);\n-\trc = smc_cdc_get_free_slot(&conn->lgr->lnk[SMC_SINGLE_LINK], &wr_buf,\n-\t\t\t\t   &pend);\n+\trc = smc_cdc_get_free_slot(conn, &wr_buf, &pend);\n \tif (rc < 0) {\n \t\tif (rc == -EBUSY) {\n \t\t\tstruct smc_sock *smc =\n@@ -466,8 +465,7 @@ void smc_tx_consumer_update(struct smc_connection *conn)\n \t    ((to_confirm > conn->rmbe_update_limit) &&\n \t     ((to_confirm > (conn->rmbe_size / 2)) ||\n \t      conn->local_rx_ctrl.prod_flags.write_blocked))) {\n-\t\trc = smc_cdc_get_free_slot(&conn->lgr->lnk[SMC_SINGLE_LINK],\n-\t\t\t\t\t   &wr_buf, &pend);\n+\t\trc = smc_cdc_get_free_slot(conn, &wr_buf, &pend);\n \t\tif (!rc)\n \t\t\trc = smc_cdc_msg_send(conn, wr_buf, pend);\n \t\tif (rc < 0) {\n","prefixes":["net-next","09/10"]}