aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/netlogic
AgeCommit message (Collapse)Author
2020-02-09staging: netlogic: Use the correct style for SPDX License IdentifierNishad Kamdar
This patch corrects the SPDX License Identifier style in header files related to Netlogic network devices. It assigns explicit block comment to the SPDX License Identifier. Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> Link: https://lore.kernel.org/r/20200201142804.GA12814@nishad Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-24Staging: Netlogic: Fix spelling mistakeEvan Chime
Change "standred" on line 3 to "standard" Signed-off-by: Evan Chime <chime.evan.dri.devel@gmail.com> Link: https://lore.kernel.org/r/20191018175759.GA8294@ik-ubuntu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-24Staging: Netlogic: Fix grammatical errorEvan Chime
Change "in to" in "Changing comments in to linux standred format" on line 3 to "into" Signed-off-by: Evan Chime <chime.evan.dri.devel@gmail.com> Link: https://lore.kernel.org/r/20191018175725.GA8274@ik-ubuntu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-24staging: netlogic: use devm_platform_ioremap_resource() to simplify codeYueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20191016090136.20620-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01staging: netlogic: Change GFP_ATOMIC to GFP_KERNELHariprasad Kelam
Below is data path of xlr_config_spill xlr_net_probe -->xlr_config_fifo_spill_area --->xlr_config_spill We can use GFP_KERNEL as this function is getting called from xlr_net_probe and there are no locks. Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: add missing SPDX lines to Makefile filesGreg Kroah-Hartman
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-Hartman
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 Pandya
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 Safonov
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 Cai
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 Dighole
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 Dighole
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 Dighole
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 Vedartham
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 Duyck
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 Riveros
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 Bello
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.com
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 Klauser
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 hemminger
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 Muraru
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 Reynes
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 Goyal
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 Kofron
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 Lawall
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 Bankar
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 Shamili
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 Chawla
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 Ravichandran
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 Chawla
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 Liebana
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 Liebana
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 Liebana
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 Liebana
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 Liebana
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 Liebana
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 Liebana
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 Liebana
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 Liebana
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 Liebana
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 Liebana
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 Lunn
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 Lunn
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 Lunn
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 Akalin
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 Bansal
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 Perches
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 Barke
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.)
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 ceylan
Misspelled comment corrected Signed-off-by: tolga ceylan <tolga.ceylan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>