netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julian Wiedmann <jwi@linux.vnet.ibm.com>
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-s390@vger.kernel.org>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Stefan Raspl <raspl@linux.vnet.ibm.com>,
	Ursula Braun <ubraun@linux.vnet.ibm.com>,
	Julian Wiedmann <jwi@linux.vnet.ibm.com>
Subject: [PATCH net-next 06/10] s390/qeth: use and remove some defines
Date: Tue, 11 Apr 2017 16:11:15 +0200	[thread overview]
Message-ID: <20170411141119.82526-7-jwi@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170411141119.82526-1-jwi@linux.vnet.ibm.com>

1. a buffer has 16 is_header flags, because that's its # of elements
2. replace the last occurrence of QETH_HEADER_SIZE, and remove it

Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Acked-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
---
 drivers/s390/net/qeth_core.h    | 3 +--
 drivers/s390/net/qeth_l2_main.c | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index f575c7a566c8..760f752034e4 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -240,7 +240,6 @@ static inline int qeth_is_ipa_enabled(struct qeth_ipa_info *ipa,
 #define QETH_TX_TIMEOUT		100 * HZ
 #define QETH_RCD_TIMEOUT	60 * HZ
 #define QETH_RECLAIM_WORK_TIME	HZ
-#define QETH_HEADER_SIZE	32
 #define QETH_MAX_PORTNO		15
 
 /*IPv6 address autoconfiguration stuff*/
@@ -447,7 +446,7 @@ struct qeth_qdio_out_buffer {
 	atomic_t state;
 	int next_element_to_fill;
 	struct sk_buff_head skb_list;
-	int is_header[16];
+	int is_header[QDIO_MAX_ELEMENTS_PER_BUFFER];
 
 	struct qaob *aob;
 	struct qeth_qdio_out_q *q;
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 11cf4a4b36a6..22f8eb007aa1 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -280,7 +280,7 @@ static void qeth_l2_fill_header(struct qeth_card *card, struct qeth_hdr *hdr,
 	else
 		hdr->hdr.l2.flags[2] |= QETH_LAYER2_FLAG_UNICAST;
 
-	hdr->hdr.l2.pkt_length = skb->len-QETH_HEADER_SIZE;
+	hdr->hdr.l2.pkt_length = skb->len - sizeof(struct qeth_hdr);
 	/* VSWITCH relies on the VLAN
 	 * information to be present in
 	 * the QDIO header */
-- 
2.10.2

  parent reply	other threads:[~2017-04-11 14:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11 14:11 [PATCH net-next 00/10] more s390/net updates Julian Wiedmann
2017-04-11 14:11 ` [PATCH net-next 01/10] s390/qeth: move common ioctl handling to core Julian Wiedmann
2017-04-11 14:11 ` [PATCH net-next 02/10] s390/qeth: move NAPI poll routine " Julian Wiedmann
2017-04-11 14:11 ` [PATCH net-next 03/10] s390/qeth: move gdev shutdown handler " Julian Wiedmann
2017-04-11 14:11 ` [PATCH net-next 04/10] s390/qeth: remove unused parameter Julian Wiedmann
2017-04-11 14:11 ` [PATCH net-next 05/10] s390/qeth: use correct return type for hard_start_xmit() Julian Wiedmann
2017-04-11 14:11 ` Julian Wiedmann [this message]
2017-04-11 14:11 ` [PATCH net-next 07/10] s390/qeth: clean up qeth_set_ecmd_adv_sup() Julian Wiedmann
2017-04-11 14:11 ` [PATCH net-next 08/10] s390/qeth: convert to ETHTOOL_GLINKSETTINGS API Julian Wiedmann
2017-04-11 14:11 ` [PATCH net-next 09/10] s390/qeth: use LINK_MODE_* to report the link characteristics Julian Wiedmann
2017-04-11 14:11 ` [PATCH net-next 10/10] s390/qeth: remove unimplemented gdev routines Julian Wiedmann
2017-04-11 18:51 ` [PATCH net-next 00/10] more s390/net updates David Miller

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=20170411141119.82526-7-jwi@linux.vnet.ibm.com \
    --to=jwi@linux.vnet.ibm.com \
    --cc=davem@davemloft.net \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=raspl@linux.vnet.ibm.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=ubraun@linux.vnet.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).