linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: wein@de.ibm.com, stefan.haberland@de.ibm.com,
	schwidefsky@de.ibm.com, linux390@de.ibm.com,
	maier@linux.vnet.ibm.com, linux-s390@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] s390: Remove unneeded variables
Date: Wed, 5 Aug 2015 09:05:18 +0200	[thread overview]
Message-ID: <20150805070518.GB4163@osiris> (raw)
In-Reply-To: <1438701107-30727-1-git-send-email-peter.senna@gmail.com>

On Tue, Aug 04, 2015 at 05:11:47PM +0200, Peter Senna Tschudin wrote:
> This patch remove unneeded variables used to store return values.
> 
> These issues were detected with the Coccinelle script:
> scripts/coccinelle/misc/returnvar.cocci
> 
> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
> ---
>  static struct css_device_id eadm_subchannel_ids[] = {
> diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
> index 2e65b98..a79d698 100644
> --- a/drivers/s390/net/qeth_l2_main.c
> +++ b/drivers/s390/net/qeth_l2_main.c
> @@ -392,8 +392,6 @@ static int qeth_l2_vlan_rx_kill_vid(struct net_device *dev,
> 
>  static int qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
>  {
> -	int rc = 0;
> -
>  	QETH_DBF_TEXT(SETUP , 2, "stopcard");
>  	QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
> 
> @@ -427,7 +425,8 @@ static int qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
>  		qeth_clear_cmd_buffers(&card->read);
>  		qeth_clear_cmd_buffers(&card->write);
>  	}
> -	return rc;
> +
> +	return 0;
>  }
> 
>  static int qeth_l2_process_inbound_buffer(struct qeth_card *card,
> diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
> index 70eb2f6..ee5e2ac 100644
> --- a/drivers/s390/net/qeth_l3_main.c
> +++ b/drivers/s390/net/qeth_l3_main.c
> @@ -2160,8 +2160,6 @@ static struct qeth_card *qeth_l3_get_card_from_dev(struct net_device *dev)
> 
>  static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode)
>  {
> -	int rc = 0;
> -
>  	QETH_DBF_TEXT(SETUP, 2, "stopcard");
>  	QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
> 
> @@ -2196,7 +2194,8 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode)
>  		qeth_clear_cmd_buffers(&card->read);
>  		qeth_clear_cmd_buffers(&card->write);
>  	}
> -	return rc;
> +
> +	return 0;

Applied. However I changed your patch a bit and made the *_stop_card()
functions return void instead, since the calling functions didn't care
anyway.

Thanks!

      reply	other threads:[~2015-08-05  7:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-04 15:11 [PATCH 2/2] s390: Remove unneeded variables Peter Senna Tschudin
2015-08-05  7:05 ` Heiko Carstens [this message]

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=20150805070518.GB4163@osiris \
    --to=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux390@de.ibm.com \
    --cc=maier@linux.vnet.ibm.com \
    --cc=peter.senna@gmail.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=stefan.haberland@de.ibm.com \
    --cc=wein@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).