Skip to content

Commit 8437bda

Browse files
Hans Wippeldavem330
authored andcommitted
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: Hans Wippel <[email protected]> Signed-off-by: Ursula Braun <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d7b0e37 commit 8437bda

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

net/smc/smc_core.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -474,10 +474,10 @@ int smc_conn_create(struct smc_sock *smc,
474474
struct smc_clc_msg_local *lcl, int srv_first_contact)
475475
{
476476
struct smc_connection *conn = &smc->conn;
477+
int local_contact = SMC_FIRST_CONTACT;
477478
struct smc_link_group *lgr;
478479
unsigned short vlan_id;
479480
enum smc_lgr_role role;
480-
int local_contact = SMC_FIRST_CONTACT;
481481
int rc = 0;
482482

483483
role = smc->listen_smc ? SMC_SERV : SMC_CLNT;
@@ -573,11 +573,9 @@ int smc_uncompress_bufsize(u8 compressed)
573573
/* try to reuse a sndbuf or rmb description slot for a certain
574574
* buffer size; if not available, return NULL
575575
*/
576-
static inline
577-
struct smc_buf_desc *smc_buf_get_slot(struct smc_link_group *lgr,
578-
int compressed_bufsize,
579-
rwlock_t *lock,
580-
struct list_head *buf_list)
576+
static struct smc_buf_desc *smc_buf_get_slot(int compressed_bufsize,
577+
rwlock_t *lock,
578+
struct list_head *buf_list)
581579
{
582580
struct smc_buf_desc *buf_slot;
583581

@@ -662,9 +660,9 @@ static struct smc_buf_desc *smc_new_buf_create(struct smc_link_group *lgr,
662660

663661
static int __smc_buf_create(struct smc_sock *smc, bool is_rmb)
664662
{
663+
struct smc_buf_desc *buf_desc = ERR_PTR(-ENOMEM);
665664
struct smc_connection *conn = &smc->conn;
666665
struct smc_link_group *lgr = conn->lgr;
667-
struct smc_buf_desc *buf_desc = ERR_PTR(-ENOMEM);
668666
struct list_head *buf_list;
669667
int bufsize, bufsize_short;
670668
int sk_buf_size;
@@ -692,7 +690,7 @@ static int __smc_buf_create(struct smc_sock *smc, bool is_rmb)
692690
continue;
693691

694692
/* check for reusable slot in the link group */
695-
buf_desc = smc_buf_get_slot(lgr, bufsize_short, lock, buf_list);
693+
buf_desc = smc_buf_get_slot(bufsize_short, lock, buf_list);
696694
if (buf_desc) {
697695
memset(buf_desc->cpu_addr, 0, bufsize);
698696
break; /* found reusable slot */

0 commit comments

Comments
 (0)