Commit 8437bda0 authored by Hans Wippel's avatar Hans Wippel Committed by David S. Miller

net/smc: do a few smc_core.c cleanups

This patch consists of Christmas tree fixes and removal of an unneeded
function parameter.
Signed-off-by: default avatarHans Wippel <hwippel@linux.ibm.com>
Signed-off-by: default avatarUrsula Braun <ubraun@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d7b0e37c
...@@ -474,10 +474,10 @@ int smc_conn_create(struct smc_sock *smc, ...@@ -474,10 +474,10 @@ int smc_conn_create(struct smc_sock *smc,
struct smc_clc_msg_local *lcl, int srv_first_contact) struct smc_clc_msg_local *lcl, int srv_first_contact)
{ {
struct smc_connection *conn = &smc->conn; struct smc_connection *conn = &smc->conn;
int local_contact = SMC_FIRST_CONTACT;
struct smc_link_group *lgr; struct smc_link_group *lgr;
unsigned short vlan_id; unsigned short vlan_id;
enum smc_lgr_role role; enum smc_lgr_role role;
int local_contact = SMC_FIRST_CONTACT;
int rc = 0; int rc = 0;
role = smc->listen_smc ? SMC_SERV : SMC_CLNT; role = smc->listen_smc ? SMC_SERV : SMC_CLNT;
...@@ -573,9 +573,7 @@ int smc_uncompress_bufsize(u8 compressed) ...@@ -573,9 +573,7 @@ int smc_uncompress_bufsize(u8 compressed)
/* try to reuse a sndbuf or rmb description slot for a certain /* try to reuse a sndbuf or rmb description slot for a certain
* buffer size; if not available, return NULL * buffer size; if not available, return NULL
*/ */
static inline static struct smc_buf_desc *smc_buf_get_slot(int compressed_bufsize,
struct smc_buf_desc *smc_buf_get_slot(struct smc_link_group *lgr,
int compressed_bufsize,
rwlock_t *lock, rwlock_t *lock,
struct list_head *buf_list) struct list_head *buf_list)
{ {
...@@ -662,9 +660,9 @@ static struct smc_buf_desc *smc_new_buf_create(struct smc_link_group *lgr, ...@@ -662,9 +660,9 @@ static struct smc_buf_desc *smc_new_buf_create(struct smc_link_group *lgr,
static int __smc_buf_create(struct smc_sock *smc, bool is_rmb) static int __smc_buf_create(struct smc_sock *smc, bool is_rmb)
{ {
struct smc_buf_desc *buf_desc = ERR_PTR(-ENOMEM);
struct smc_connection *conn = &smc->conn; struct smc_connection *conn = &smc->conn;
struct smc_link_group *lgr = conn->lgr; struct smc_link_group *lgr = conn->lgr;
struct smc_buf_desc *buf_desc = ERR_PTR(-ENOMEM);
struct list_head *buf_list; struct list_head *buf_list;
int bufsize, bufsize_short; int bufsize, bufsize_short;
int sk_buf_size; int sk_buf_size;
...@@ -692,7 +690,7 @@ static int __smc_buf_create(struct smc_sock *smc, bool is_rmb) ...@@ -692,7 +690,7 @@ static int __smc_buf_create(struct smc_sock *smc, bool is_rmb)
continue; continue;
/* check for reusable slot in the link group */ /* check for reusable slot in the link group */
buf_desc = smc_buf_get_slot(lgr, bufsize_short, lock, buf_list); buf_desc = smc_buf_get_slot(bufsize_short, lock, buf_list);
if (buf_desc) { if (buf_desc) {
memset(buf_desc->cpu_addr, 0, bufsize); memset(buf_desc->cpu_addr, 0, bufsize);
break; /* found reusable slot */ break; /* found reusable slot */
......
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