Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1553879
| Path | csiph.com!feeder.erje.net!2.eu.feeder.erje.net!news.etla.org!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] net: ethernet: ti: cpsw: remove dual check from common res usage function |
| Date | Sun, 08 Jan 2017 15:00:01 +0100 |
| Message-ID | <sXmaR-76f-17@gated-at.bofh.it> (permalink) |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=NKO7YVskgAqFiI1BRRm1luVeHWm4GAJ7Ksh4UxCJizE=; b=PNKCm1L2ejrivE8Hs8Nsu9wAHKT2CqaXw8Rr7S4oL2wwzkcTYYMZokXjWagAtst7HK kkbOEtdswYNRiic0STy5CI0vo2C8uMX6cZJSr4p7bRzVH8XaXx/8JawmizrlVw7ydI/y NUyEGRejAWTsjPLxa7yCWxG9HrIzff/tMKWxM= |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=NKO7YVskgAqFiI1BRRm1luVeHWm4GAJ7Ksh4UxCJizE=; b=kv0MtuaixwfK4SHw1NqzMV7wRD7bQcB1Unsbk8bPTFFm0DRp8ORv0ZQhgKWZCQTqrr k8DRWRzvxmJn1itwGQsrN50D/FmmxSwzhR887en/3cF5jeT/1x/0Vg03vQOWLn5arpG3 KevB/w3nW7Uhm7YFirl84XRZP0ZUfpIXuyb68sWxMfytJHL/6Eo7b0F7yLBxtpyGVEWe XD3p0tx0/vykYbX4tiy0wbIs0dla4YLpHNU/32SVS5XsM5ljCJnzzuwfz5PYa1qEVIw8 XwTCk9jN2qPbt4GLixFndSF85fF79PJgcZ/GbfpJT9Re3Gxiw59yY/8pwK9RemZDUIri rz1A== |
| X-Gm-Message-State | AIkVDXKEHrUXuf9+GGKqaHl+LicYd09wpR6yyhJSNDG1h+kAaiy8tbQmR15wd9aMGOxwmrx4 |
| X-Received | by 10.46.87.73 with SMTP id r9mr4077980ljd.22.1483883825445; Sun, 08 Jan 2017 05:57:05 -0800 (PST) |
| X-Mailer | git-send-email 2.7.4 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 31 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-omap@vger.kernel.org, grygorii.strashko@ti.com, linux-kernel@vger.kernel.org, Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> |
| X-Original-Date | Sun, 8 Jan 2017 15:56:27 +0200 |
| X-Original-Message-ID | <1483883787-13503-1-git-send-email-ivan.khoronzhuk@linaro.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1553879 |
Show key headers only | View raw
Common res usage is possible only in case an interface is running. In case of not dual emac here can be only one interface, so while ndo_open and switch mode, only one interface can be opened, thus if open is called no any interface is running ... and no common res are used. So remove check on dual emac, it will simplify code/understanding and will match the name it's called. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> --- Based on linux-next/master drivers/net/ethernet/ti/cpsw.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index b203143..91684f1 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -1235,9 +1235,6 @@ static int cpsw_common_res_usage_state(struct cpsw_common *cpsw) u32 i; u32 usage_count = 0; - if (!cpsw->data.dual_emac) - return 0; - for (i = 0; i < cpsw->data.slaves; i++) if (cpsw->slaves[i].open_stat) usage_count++; -- 2.7.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] net: ethernet: ti: cpsw: remove dual check from common res usage function Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> - 2017-01-08 15:00 +0100 Re: [PATCH] net: ethernet: ti: cpsw: remove dual check from common res usage function Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> - 2017-01-08 17:30 +0100
csiph-web