aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/netlogic (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-04-03staging: add missing SPDX lines to Makefile filesGreg Kroah-Hartman1-0/+1
There are a few remaining drivers/staging/*/Makefile files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: add missing SPDX lines to Kconfig filesGreg Kroah-Hartman1-0/+1
There are a few remaining drivers/staging/*/Kconfig files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-21staging: netlogic: Remove unnecessary error printHimadri Pandya1-3/+1
Kmalloc normally produces a backtrace when there is not enough memory. So it is unnecessary to print an error message that provides only this information. Hence, remove pr_error() from memory allocation check. Issue found using Coccinelle. Signed-off-by: Himadri Pandya <himadri18.07@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-21staging: netlogic: replace skb_put/pull pair with skb_reserveIvan Safonov1-2/+1
The sequence skb_put(skb); skb_pull(skb); leads to the same result as skb_reserve(skb); but second is a little shorter and clearer. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18staging: netlogic: Remove unnecessary 'out of memory' messageWentao Cai1-3/+1
Remove unnecessary 'out of memory' message to silence checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Wentao Cai <etsai042@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26staging: netlogic: Remove boilerplate license textBhagyashri Dighole4-117/+2
Removes the boilerplate license text. Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26staging: netlogic: Add SPDX-License-Identifier tag at the topBhagyashri Dighole4-2/+6
Adds the SPDX GPL-2.0 or BSD-2-clause license identifier, which solves the checkpatch.pl warnings: "WARNING: Missing or malformed SPDX-License-Identifier tag in line 1". Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26staging: netlogic: Modify coding style alignmentsBhagyashri Dighole1-8/+12
Fix coding style alignment issues detected by checkpatch.pl Match alignments with parenthesis. Limit lines to 80 characters. Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-22staging: netlogic: replace ---help--- with help in KconfigBharath Vedartham1-1/+1
This patch fixes the checkpatch.pl warning: WARNING: prefer 'help' over '---help---' for new help texts Signed-off-by: Bharath Vedartham <linux.bhar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-09net: Add generic ndo_select_queue functionsAlexander Duyck1-8/+1
This patch adds a generic version of the ndo_select_queue functions for either returning 0 or selecting a queue based on the processor ID. This is generally meant to just reduce the number of functions we have to change in the future when we have to deal with ndo_select_queue changes. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-02-22staging: net: netlogic: Remove unneeded castChristopher Diaz Riveros1-2/+1
Fix Coccinelle alert: drivers/staging//netlogic/xlr_net.c:996:12-30: WARNING: casting value returned by memory allocation function to (struct xlr_adapter *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: net: netlogic: Fix alignment issueFrank A. Cancio Bello1-44/+38
Fix alignment to match open parenthesis and comply in that way with the preferred coding style for the linux kernel. Credits to 'checkpatch'. The 'checkpatch' message was: 'CHECK: Alignment should match open parenthesis' Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-13net: phy: Make phy_ethtool_ksettings_get return voidyuval.shaia@oracle.com1-1/+4
Make return value void since function never return meaningfull value Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-18net: Remove usage of net_device last_rx memberTobias Klauser1-1/+0
The network stack no longer uses the last_rx member of struct net_device since the bonding driver switched to use its own private last_rx in commit 9f242738376d ("bonding: use last_arp_rx in slave_last_rx()"). However, some drivers still (ab)use the field for their own purposes and some driver just update it without actually using it. Previously, there was an accompanying comment for the last_rx member added in commit 4dc89133f49b ("net: add a comment on netdev->last_rx") which asked drivers not to update is, unless really needed. However, this commend was removed in commit f8ff080dacec ("bonding: remove useless updating of slave->dev->last_rx"), so some drivers added later on still did update last_rx. Remove all usage of last_rx and switch three drivers (sky2, atp and smc91c92_cs) which actually read and write it to use their own private copy in netdev_priv. Compile-tested with allyesconfig and allmodconfig on x86 and arm. Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Jay Vosburgh <j.vosburgh@gmail.com> Cc: Veaceslav Falico <vfalico@gmail.com> Cc: Andy Gospodarek <andy@greyhouse.net> Cc: Mirko Lindner <mlindner@marvell.com> Cc: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Jay Vosburgh <jay.vosburgh@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-08net: make ndo_get_stats64 a void functionstephen hemminger1-9/+1
The network device operation for reading statistics is only called in one place, and it ignores the return value. Having a structure return value is potentially confusing because some future driver could incorrectly assume that the return value was used. Fix all drivers with ndo_get_stats64 to have a void function. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-10-16Staging: netlogic: Compress return logic into one lineMihaela Muraru1-4/+2
Simplify function returns by merging assignment and return into one command line. Found with Coccinelle @@ expression e, ret; @@ -ret = +return e; -return ret; Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16staging: net: netlogic: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes1-6/+8
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-16Staging: netlogic: Remove unused functionBhumika Goyal1-10/+0
The function xlr_wakeup_queue is not used anywhere in the kernel. Therefore, remove it. The static unused functions were detected using Coccinelle but the change was done by hand. Script used: @initialize:python@ @@ def display(name,p): print(name,p[0].file) @r1@ identifier func; type T; position p; @@ static T func@p(...) { ... } @r@ identifier r1.func; @@ func @script:python depends on !r@ func << r1.func; p << r1.p; @@ display(func,p) Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-13staging: netlogic: Make net_device_ops constMike Kofron1-1/+1
This patch fixes the checkpatch.pl warning: WARNING: struct net_device_ops should normally be const Signed-off-by: Mike Kofron <mpkofron@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-01staging: netlogic: constify ethtool_ops structuresJulia Lawall1-1/+1
Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct ethtool_ops i@p = { ... }; @ok1@ identifier r.i; struct net_device e; position p; @@ e.ethtool_ops = &i@p; @ok2@ identifier r.i; expression e; position p; @@ netdev_set_default_ethtool_ops(e, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ethtool_ops i = { ... }; // </smpl> Suggested-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28Staging: netlogic: Remove & from function name.Sandhya Bankar1-1/+1
Remove & from function name,when function name passed as an argument to another function. Function name is used as pointer without &. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: netlogic: Replacing pr_err with dev_err after the call to devm_kzallocG Pooja Shamili1-5/+9
The function devm_kzalloc has a first argument of type struct device *. This is the type of argument required by printing functions such as dev_info, dev_err, etc. Thus, functions like pr_info should not normally be used after a call to devm_kzalloc. Thus, all pr_err occurances are replaced with dev_err function calls Signed-off-by: G Pooja Shamili <poojashamili@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: netlogic: Replace pr_* with netdev_*Amitoj Kaur Chawla1-3/+3
Replace generic pr_info and pr_err with netdev_info and netdev_err respectively for net devices. Found using Coccinelle. The semantic patch used to find this is as follows: //<smpl> @@ expression e; identifier f,i; position p; @@ f(...,struct net_device *i,...) { ... ( - pr_debug@p (e) + netdev_dbg(i, e) | - pr_err@p (e) + netdev_err(i, e) | - pr_info@p (e) + netdev_info(i, e) ) ... } @@ expression e; identifier f,i; position p; @@ f(...) { ... struct net_device *n; ... ( - pr_debug@p (e) + netdev_dbg(n, e) | - pr_err@p (e) + netdev_err(n, e) | - pr_info@p (e) + netdev_info(n, e) ) ... } @a@ identifier s,x; @@ struct s { ... struct net_device *x; ... }; @b depends on a@ expression e; identifier f,i,a.s,a.x; position p; @@ f ( ..., struct s *i, ...) { ... ( - pr_debug@p (e) + netdev_dbg(i->x, e) | - pr_err@p (e) + netdev_err(i->x, e) | - pr_info@p (e) + netdev_info(i->x, e) ) ... } @c depends on a@ expression e; identifier f,i,a.s,a.x; position p; @@ f (...) { ... struct s *i = ...; ... ( - pr_debug@p (e) + netdev_dbg(i->x, e) | - pr_err@p (e) + netdev_err(i->x, e) | - pr_info@p (e) + netdev_info(i->x, e) ) ... } //</smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: netlogic: Drop unneeded void pointer castJanani Ravichandran1-1/+1
Void pointers need not be cast to other pointer types. Semantic patch used: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: netlogic: Simplify use of devm_ioremap_resourceAmitoj Kaur Chawla1-7/+0
Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. The Coccinelle semantic patch that makes this change is as follows: // <smpl> @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ - res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res - if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res + res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res); // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20staging: netlogic: Return zero pointer after failed kmallocLaura Garcia Liebana1-1/+3
Return a ZERO_SIZE_PTR in the xlr_config_spill function if the kmalloc returns an invalid value. This change prevents a possible segmentation fault as the invalid pointer is fed into PTR_ALIGN macro. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20staging: netlogic: Fix indent for conditional statementLaura Garcia Liebana1-1/+1
Insert code indent for conditional statements. Checkpatch detected this issue. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20staging: netlogic: Insert spaces around operatorLaura Garcia Liebana1-2/+2
Spaces preferred around that '/' (ctx:VxV). Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20staging: netlogic: Fix comparison to NULLLaura Garcia Liebana1-2/+2
Avoid the use of comparison to NULL, use !<variable> instead. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20staging: netlogic: Fix CamelCase for constantsLaura Garcia Liebana2-504/+504
Avoid the use of CamelCase for constants. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20staging: netlogic: Fix multiple assignmentsLaura Garcia Liebana1-1/+2
Avoid the use of multiple assignments in a single line. Checkpatch found this issue. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20staging: netlogic: Remove blank spaces after a castLaura Garcia Liebana1-5/+5
Remove uneeded blank spaces after a cast. Checkpatch found these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20staging: netlogic: Fix several parentheses alignmentsLaura Garcia Liebana2-79/+82
Align arguments with the open parenthesis. Checkpatch found these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14staging: netlogic: Fix parenthesis alignmentLaura Garcia Liebana1-2/+2
Align arguments with the open parenthesis. Checkpatch found this issue. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14staging: netlogic: Remove multiple blank linesLaura Garcia Liebana1-1/+0
Avoid the use of multiple blank lines. Checkpatch found this issue. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14staging: netlogic: Fix multiple irq assignments in a single lineLaura Garcia Liebana1-1/+2
Avoid the use of multiple assignments in a single line. Checkpatch found this issue. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-10staging: netlogic: Fix build error due to missed API changeAndrew Lunn1-16/+13
Fix a number of build errors due to moving the phy_map and centralizing interrupt allocation. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-01-07phy: Centralise print about attached phyAndrew Lunn1-2/+1
Many Ethernet drivers contain the same netdev_info() print statement about the attached phy. Move it into the phy device code. Additionally add a varargs function which can be used to append additional information. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-01-07phy: add phydev_name() wrapperAndrew Lunn1-3/+3
Add a phydev_name() function, to help with moving some structure members from phy_device. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-24staging: netlogic: Do not use multiple blank lines.Burcin Akalin1-1/+0
Remove multiple blank lines. Problem found using checkpatch.pl "CHECK: Please don't use multiple blank lines" Signed-off-by: Burcin Akalin <brcnakalin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16staging: netlogic: xlr_net.h: fixed coding style warningsSakshi Bansal1-1/+2
Fixed block comments usage of * on subsequent lines Signed-off-by: Sakshi Bansal <sakshi.april5@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14staging: netlogic: Remove unnecessary externsJoe Perches1-1/+1
Using 'extern' is not necessary for function prototypes. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-05Staging: netlogic: Replace comma with a semicolonShraddha Barke1-1/+1
Replace comma between expression statements by a semicolon. The semantic patch used is as follows: @@ expression e1,e2; @@ e1 - , + ; e2; Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20staging: netlogic: allocate right size in devm_kzallocRavindran, Madhusudhanan (M.)1-1/+1
sizeof when applied to a pointer typed expression gives the size of the pointer. The semantic patch that makes this change is available in scripts/coccinelle/misc/noderef.cocci. Signed-off-by: Madhusudhanan Ravindran <mravindr@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17Staging: NetLogic: Coding style correctiontolga ceylan1-1/+1
Misspelled comment corrected Signed-off-by: tolga ceylan <tolga.ceylan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: netlogic: drop owner assignment from platform_driversWolfram Sang1-1/+0
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-09-08staging: netlogic: fix checkpatch.pl "LINE_SPACING" issusesSeeChen Ng1-4/+1
Follow the checkpatch.pl "LINE_SPACING" indication: 1. Insert a blank line after function declaration. 2. Remove multiple blank lines. Signed-off-by: SeeChen Ng <seechen81@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-02staging: netlogic: Fix checkpatch.pl warningRamon Fried1-3/+1
This patch fixes the following checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message #116: FILE: ./xlr_net.c:116: + if (!skb) { + pr_err("SKB allocation failed\n"); Signed-off-by: Ramon Fried <ramon.fried@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30Staging: netlogic: xlr_net.c Fixed code-style warningsChaitanya Hazarey1-0/+1
Fixed the following warning generated by checkpatch.pl: WARNING: Missing a blank line after declarations Signed-off-by: Chaitanya Hazarey <c@24.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30Staging: Netlogic: Move all the netdev under single parent deviceGanesan Ramalingam5-232/+283
XLR has one network controller and XLS has two network controllers, each controller has 4 gmac devices. This patch initializes each controller as a parent device and the four gmac devices of a controller are connected to the parent controller as a child Signed-off-by: Ganesan Ramalingam <ganesanr@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>