From: Andrew Lunn <andrew@lunn.ch>
To: David Miller <davem@davemloft.net>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
netdev <netdev@vger.kernel.org>,
Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
Andrew Lunn <andrew@lunn.ch>
Subject: [PATCH net-next 3/7] net: dsa: Remove allocation of driver private memory
Date: Mon, 11 Apr 2016 21:50:05 +0200 [thread overview]
Message-ID: <1460404209-32083-4-git-send-email-andrew@lunn.ch> (raw)
In-Reply-To: <1460404209-32083-1-git-send-email-andrew@lunn.ch>
The drivers now allocate their own memory for private usage. Remove
the allocation from the core code.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
---
include/net/dsa.h | 1 -
net/dsa/dsa.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/net/dsa.h b/include/net/dsa.h
index 7bc7bd9b5ded..165c2e10615c 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -213,7 +213,6 @@ struct dsa_switch_driver {
struct list_head list;
enum dsa_tag_protocol tag_protocol;
- int priv_size;
/*
* Probing and setup.
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 7ef8a92a9e39..14bf12f637d2 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -402,7 +402,7 @@ dsa_switch_setup(struct dsa_switch_tree *dst, int index,
/*
* Allocate and initialise switch state.
*/
- ds = devm_kzalloc(parent, sizeof(*ds) + drv->priv_size, GFP_KERNEL);
+ ds = devm_kzalloc(parent, sizeof(*ds), GFP_KERNEL);
if (ds == NULL)
return ERR_PTR(-ENOMEM);
--
2.7.0
next prev parent reply other threads:[~2016-04-11 19:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-11 19:50 [PATCH net-next 0/7] DSA refactoring: set 1 Andrew Lunn
2016-04-11 19:50 ` [PATCH net-next 1/7] net: dsa: Pass the dsa device to the switch drivers Andrew Lunn
2016-04-11 19:50 ` [PATCH net-next 2/7] net: dsa: Have the switch driver allocate there own private memory Andrew Lunn
2016-04-11 19:50 ` Andrew Lunn [this message]
2016-04-11 19:50 ` [PATCH net-next 4/7] net: dsa: Keep the mii bus and address in the private structure Andrew Lunn
2016-04-11 19:50 ` [PATCH net-next 5/7] net: dsa: Rename DSA probe function Andrew Lunn
2016-04-11 19:50 ` [PATCH net-next 6/7] dsa: Rename phys_port_mask to user_port_mask Andrew Lunn
2016-04-11 20:03 ` Florian Fainelli
2016-04-11 20:31 ` Andrew Lunn
2016-04-11 19:50 ` [PATCH net-next 7/7] dsa: mv88e6xxx: Use bus in mv88e6xxx_lookup_name() Andrew Lunn
2016-04-12 3:15 ` Vivien Didelot
2016-04-12 3:16 ` [PATCH net-next 0/7] DSA refactoring: set 1 Vivien Didelot
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=1460404209-32083-4-git-send-email-andrew@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.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).