Merge tag 'staging-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
[cascardo/linux.git] / drivers / staging / octeon / ethernet.c
index 2aa7235..ee32149 100644 (file)
@@ -98,12 +98,6 @@ MODULE_PARM_DESC(pow_send_list, "\n"
        "\t\"eth2,spi3,spi7\" would cause these three devices to transmit\n"
        "\tusing the pow_send_group.");
 
-int max_rx_cpus = -1;
-module_param(max_rx_cpus, int, 0444);
-MODULE_PARM_DESC(max_rx_cpus, "\n"
-       "\t\tThe maximum number of CPUs to use for packet reception.\n"
-       "\t\tUse -1 to use all available CPUs.");
-
 int rx_napi_weight = 32;
 module_param(rx_napi_weight, int, 0444);
 MODULE_PARM_DESC(rx_napi_weight, "The NAPI WEIGHT parameter.");
@@ -305,6 +299,7 @@ static int cvm_oct_common_change_mtu(struct net_device *dev, int new_mtu)
                         * than the MTU and smaller the 64 bytes.
                         */
                        union cvmx_pip_frm_len_chkx frm_len_chk;
+
                        frm_len_chk.u64 = 0;
                        frm_len_chk.s.minlen = 64;
                        frm_len_chk.s.maxlen = max_packet;
@@ -337,6 +332,7 @@ static void cvm_oct_common_set_multicast_list(struct net_device *dev)
            && (cvmx_helper_interface_get_mode(interface) !=
                CVMX_HELPER_INTERFACE_MODE_SPI)) {
                union cvmx_gmxx_rxx_adr_ctl control;
+
                control.u64 = 0;
                control.s.bcst = 1;     /* Allow broadcast MAC addresses */
 
@@ -397,6 +393,7 @@ static int cvm_oct_set_mac_filter(struct net_device *dev)
                int i;
                uint8_t *ptr = dev->dev_addr;
                uint64_t mac = 0;
+
                for (i = 0; i < 6; i++)
                        mac = (mac << 8) | (uint64_t)ptr[i];
 
@@ -449,7 +446,7 @@ int cvm_oct_common_init(struct net_device *dev)
                mac = of_get_mac_address(priv->of_node);
 
        if (mac)
-               memcpy(dev->dev_addr, mac, ETH_ALEN);
+               ether_addr_copy(dev->dev_addr, mac);
        else
                eth_hw_addr_random(dev);
 
@@ -648,6 +645,7 @@ static int cvm_oct_probe(struct platform_device *pdev)
                     port < cvmx_helper_get_ipd_port(interface, num_ports);
                     port++) {
                        union cvmx_pip_prt_tagx pip_prt_tagx;
+
                        pip_prt_tagx.u64 =
                            cvmx_read_csr(CVMX_PIP_PRT_TAGX(port));
                        pip_prt_tagx.s.grp = pow_receive_group;
@@ -671,6 +669,7 @@ static int cvm_oct_probe(struct platform_device *pdev)
 
        if ((pow_send_group != -1)) {
                struct net_device *dev;
+
                pr_info("\tConfiguring device for POW only access\n");
                dev = alloc_etherdev(sizeof(struct octeon_ethernet));
                if (dev) {
@@ -715,7 +714,8 @@ static int cvm_oct_probe(struct platform_device *pdev)
                        struct net_device *dev =
                            alloc_etherdev(sizeof(struct octeon_ethernet));
                        if (!dev) {
-                               pr_err("Failed to allocate ethernet device for port %d\n", port);
+                               pr_err("Failed to allocate ethernet device for port %d\n",
+                                      port);
                                continue;
                        }
 
@@ -780,8 +780,7 @@ static int cvm_oct_probe(struct platform_device *pdev)
                        if (!dev->netdev_ops) {
                                free_netdev(dev);
                        } else if (register_netdev(dev) < 0) {
-                               pr_err("Failed to register ethernet device "
-                                        "for interface %d, port %d\n",
+                               pr_err("Failed to register ethernet device for interface %d, port %d\n",
                                         interface, priv->port);
                                free_netdev(dev);
                        } else {
@@ -833,6 +832,7 @@ static int cvm_oct_remove(struct platform_device *pdev)
                if (cvm_oct_device[port]) {
                        struct net_device *dev = cvm_oct_device[port];
                        struct octeon_ethernet *priv = netdev_priv(dev);
+
                        cancel_delayed_work_sync(&priv->port_periodic_work);
 
                        cvm_oct_tx_shutdown_dev(dev);
@@ -871,7 +871,6 @@ static struct platform_driver cvm_oct_driver = {
        .probe          = cvm_oct_probe,
        .remove         = cvm_oct_remove,
        .driver         = {
-               .owner  = THIS_MODULE,
                .name   = KBUILD_MODNAME,
                .of_match_table = cvm_oct_match,
        },