netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: frank.blaschka@de.ibm.com
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
	Ursula Braun <ursula.braun@de.ibm.com>
Subject: [patch 6/9] [PATCH] ctcm: get rid of compile warning
Date: Tue, 10 May 2011 13:50:19 +0200	[thread overview]
Message-ID: <20110510115047.654763902@de.ibm.com> (raw)
In-Reply-To: 20110510115013.363974020@de.ibm.com

[-- Attachment #1: 605-ctcm-compile-warning.diff --]
[-- Type: text/plain, Size: 2987 bytes --]

From: Ursula Braun <ursula.braun@de.ibm.com>

-Wunused-but-set-variable generates compile warnings. The affected
variables are removed.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---


 drivers/s390/net/ctcm_main.c |    2 --
 drivers/s390/net/ctcm_mpc.c  |   13 ++++---------
 2 files changed, 4 insertions(+), 11 deletions(-)
diff -urpN linux-2.6/drivers/s390/net/ctcm_main.c linux-2.6-patched/drivers/s390/net/ctcm_main.c
--- linux-2.6/drivers/s390/net/ctcm_main.c	2011-05-10 09:14:06.000000000 +0200
+++ linux-2.6-patched/drivers/s390/net/ctcm_main.c	2011-05-10 09:14:26.000000000 +0200
@@ -672,7 +672,6 @@ static int ctcmpc_transmit_skb(struct ch
 	int ccw_idx;
 	unsigned long hi;
 	unsigned long saveflags = 0;	/* avoids compiler warning */
-	__u16 block_len;
 
 	CTCM_PR_DEBUG("Enter %s: %s, cp=%i ch=0x%p id=%s state=%s\n",
 			__func__, dev->name, smp_processor_id(), ch,
@@ -719,7 +718,6 @@ static int ctcmpc_transmit_skb(struct ch
 	 */
 	atomic_inc(&skb->users);
 
-	block_len = skb->len + TH_HEADER_LENGTH + PDU_HEADER_LENGTH;
 	/*
 	 * IDAL support in CTCM is broken, so we have to
 	 * care about skb's above 2G ourselves.
diff -urpN linux-2.6/drivers/s390/net/ctcm_mpc.c linux-2.6-patched/drivers/s390/net/ctcm_mpc.c
--- linux-2.6/drivers/s390/net/ctcm_mpc.c	2011-03-15 02:20:32.000000000 +0100
+++ linux-2.6-patched/drivers/s390/net/ctcm_mpc.c	2011-05-10 09:14:26.000000000 +0200
@@ -653,7 +653,6 @@ static void ctcmpc_send_sweep_resp(struc
 	struct net_device *dev = rch->netdev;
 	struct ctcm_priv *priv = dev->ml_priv;
 	struct mpc_group *grp = priv->mpcg;
-	int rc = 0;
 	struct th_sweep *header;
 	struct sk_buff *sweep_skb;
 	struct channel *ch  = priv->channel[CTCM_WRITE];
@@ -665,16 +664,14 @@ static void ctcmpc_send_sweep_resp(struc
 		CTCM_DBF_TEXT_(MPC_ERROR, CTC_DBF_ERROR,
 			"%s(%s): sweep_skb allocation ERROR\n",
 			CTCM_FUNTAIL, rch->id);
-		rc = -ENOMEM;
-				goto done;
+		goto done;
 	}
 
 	header = kmalloc(sizeof(struct th_sweep), gfp_type());
 
 	if (!header) {
 		dev_kfree_skb_any(sweep_skb);
-		rc = -ENOMEM;
-				goto done;
+		goto done;
 	}
 
 	header->th.th_seg	= 0x00 ;
@@ -1370,8 +1367,7 @@ static void mpc_action_go_inop(fsm_insta
 	struct net_device  *dev = arg;
 	struct ctcm_priv    *priv;
 	struct mpc_group *grp;
-	int rc = 0;
-	struct channel *wch, *rch;
+	struct channel *wch;
 
 	BUG_ON(dev == NULL);
 	CTCM_PR_DEBUG("Enter %s: %s\n",	__func__, dev->name);
@@ -1396,7 +1392,6 @@ static void mpc_action_go_inop(fsm_insta
 		fsm_deltimer(&priv->restart_timer);
 
 	wch = priv->channel[CTCM_WRITE];
-	rch = priv->channel[CTCM_READ];
 
 	switch (grp->saved_state) {
 	case MPCG_STATE_RESET:
@@ -1435,7 +1430,7 @@ static void mpc_action_go_inop(fsm_insta
 
 	if (grp->send_qllc_disc == 1) {
 		grp->send_qllc_disc = 0;
-		rc = mpc_send_qllc_discontact(dev);
+		mpc_send_qllc_discontact(dev);
 	}
 
 	/* DO NOT issue DEV_EVENT_STOP directly out of this code */


  parent reply	other threads:[~2011-05-10 11:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-10 11:50 [patch 0/9] s390: network feature patches for net-next frank.blaschka
2011-05-10 11:50 ` [patch 1/9] [PATCH] qeth: convert to hw_features part 2 frank.blaschka
2011-05-10 13:19   ` Michał Mirosław
2011-05-10 14:09     ` Frank Blaschka
2011-05-10 14:33       ` Michał Mirosław
2011-05-10 11:50 ` [patch 2/9] [PATCH] qeth: add OSA concurrent hardware trap frank.blaschka
2011-05-10 11:50 ` [patch 3/9] [PATCH] qeth: add owner to ccw driver frank.blaschka
2011-05-10 11:50 ` [patch 4/9] [PATCH] claw: remove unused return code handling frank.blaschka
2011-05-10 11:50 ` [patch 5/9] [PATCH] lcs: get rid of compile warning frank.blaschka
2011-05-10 11:50 ` frank.blaschka [this message]
2011-05-10 11:50 ` [patch 7/9] [PATCH] iucv: " frank.blaschka
2011-05-10 11:50 ` [patch 8/9] [PATCH] af_iucv: " frank.blaschka
2011-05-10 11:50 ` [patch 9/9] [PATCH] convert old cpumask API into new one frank.blaschka
  -- strict thread matches above, loose matches on Subject: below --
2011-05-12  5:43 [patch 0/9] [resend] s390: network feature patches for net-next frank.blaschka
2011-05-12  5:43 ` [patch 6/9] [PATCH] ctcm: get rid of compile warning frank.blaschka
2011-05-13  4:45 [patch 0/9] [resend v2] s390: network feature patches for net-next frank.blaschka
2011-05-13  4:45 ` [patch 6/9] [PATCH] ctcm: get rid of compile warning frank.blaschka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110510115047.654763902@de.ibm.com \
    --to=frank.blaschka@de.ibm.com \
    --cc=davem@davemloft.net \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ursula.braun@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).