Re: [PATCH] Staging: bcm: Bcmnet: fixed checkpatch script issues

From: Belisko Marek
Date: Wed Mar 09 2011 - 15:56:03 EST


On Wed, Mar 9, 2011 at 9:50 PM, Vinay Sawal <vinaysawal@xxxxxxxxx> wrote:
> Fixed all issues reported by checkpatch script on this file.
>
> Signed-off-by: Vinay Sawal <vinaysawal@xxxxxxxxx>
> ---
> Âdrivers/staging/bcm/Bcmnet.c | Â 51 +++++++++++++++++++++++++++++------------
> Â1 files changed, 36 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/staging/bcm/Bcmnet.c b/drivers/staging/bcm/Bcmnet.c
> index a6ce239..4e38a76 100644
> --- a/drivers/staging/bcm/Bcmnet.c
> +++ b/drivers/staging/bcm/Bcmnet.c
> @@ -1,3 +1,23 @@
> +/*
> + Â Âbcm/Bcmnet.c
> + Â ÂBcm network driver
> +
> + Â ÂThis program is free software; you can redistribute it and/or modify
> + Â Âit under the terms of the GNU General Public License as published by
> + Â Âthe Free Software Foundation; either version 2 of the License, or
> + Â Â(at your option) any later version.
> +
> + Â ÂThis program is distributed in the hope that it will be useful,
> + Â Âbut WITHOUT ANY WARRANTY; without even the implied warranty of
> + Â ÂMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ÂSee the
> + Â ÂGNU General Public License for more details.
> +
> + Â ÂYou should have received a copy of the GNU General Public License
> + Â Âalong with this program; if not, write to the Free Software
> + Â ÂFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
> +
> +*/
NOt sure if I miss somethoing but why you add header
if you fix only checkpatch.pl fixes? I don't know that
checkpatch.pl complain about missing header file?
> +
> Â#include "headers.h"
>
> Âstruct net_device *gblpnetdev;
> @@ -8,7 +28,7 @@ static INT bcm_open(struct net_device *dev)
>
> Â Â Â Âif (Adapter->fw_download_done == FALSE) {
> Â Â Â Â Â Â Â Âpr_notice(PFX "%s: link up failed (download in progress)\n",
> - Â Â Â Â Â Â Â Â Â Â Â Â dev->name);
> + Â Â Â Â Â Â Â Â Â Â Â Â dev->name);
> Â Â Â Â Â Â Â Âreturn -EBUSY;
> Â Â Â Â}
>
> @@ -50,7 +70,7 @@ static u16 bcm_select_queue(struct net_device *dev, struct sk_buff *skb)
> Â* Description - This is the main transmit function for our virtual
> Â* Â Â Â Â Â Â Âinterface(eth0). It handles the ARP packets. It
> Â* Â Â Â Â Â Â Âclones this packet and then Queue it to a suitable
> -* Â Â Â Â Â Â ÂQueue. Then calls the transmit_packet().
> +* Â Â Â Â Â Â ÂQueue. Then calls the transmit_packet().
> Â*
> Â* Parameter  -     skb - Pointer to the socket buffer structure
> Â* Â Â Â Â Â Â Â dev - Pointer to the virtual net device structure
> @@ -110,13 +130,13 @@ static netdev_tx_t bcm_transmit(struct sk_buff *skb, struct net_device *dev)
> ÂRegister other driver entry points with the kernel
> Â*/
> Âstatic const struct net_device_ops bcmNetDevOps = {
> -  Â.ndo_open     Â= bcm_open,
> -  Â.ndo_stop     Â= bcm_close,
> -  Â.ndo_start_xmit  Â= bcm_transmit,
> -  Â.ndo_change_mtu  Â= eth_change_mtu,
> - Â Â.ndo_set_mac_address = eth_mac_addr,
> - Â Â.ndo_validate_addr = eth_validate_addr,
> - Â Â.ndo_select_queue Â= bcm_select_queue,
> +    .ndo_open        = bcm_open,
> +    .ndo_stop        = bcm_close,
> +    .ndo_start_xmit     = bcm_transmit,
> +    .ndo_change_mtu     = eth_change_mtu,
> +    .ndo_set_mac_address  Â= eth_mac_addr,
> +    .ndo_validate_addr   Â= eth_validate_addr,
> +    .ndo_select_queue    = bcm_select_queue,
> Â};
>
> Âstatic struct device_type wimax_type = {
> @@ -138,7 +158,8 @@ static int bcm_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
> Â Â Â Âreturn 0;
> Â}
>
> -static void bcm_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
> +static void bcm_get_drvinfo(struct net_device *dev,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â struct ethtool_drvinfo *info)
> Â{
> Â Â Â ÂPMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev);
> Â Â Â ÂPS_INTERFACE_ADAPTER psIntfAdapter = Adapter->pvInterfaceAdapter;
> @@ -160,14 +181,14 @@ static u32 bcm_get_link(struct net_device *dev)
> Â Â Â Âreturn Adapter->LinkUpStatus;
> Â}
>
> -static u32 bcm_get_msglevel (struct net_device *dev)
> +static u32 bcm_get_msglevel(struct net_device *dev)
> Â{
> Â Â Â ÂPMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev);
>
> Â Â Â Âreturn Adapter->msg_enable;
> Â}
>
> -static void bcm_set_msglevel (struct net_device *dev, u32 level)
> +static void bcm_set_msglevel(struct net_device *dev, u32 level)
> Â{
> Â Â Â ÂPMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev);
>
> @@ -177,7 +198,7 @@ static void bcm_set_msglevel (struct net_device *dev, u32 level)
> Âstatic const struct ethtool_ops bcm_ethtool_ops = {
>    Â.get_settings  = bcm_get_settings,
>    Â.get_drvinfo  Â= bcm_get_drvinfo,
> -    .get_link    = bcm_get_link,
> +    .get_link    = bcm_get_link,
>    Â.get_msglevel  = bcm_get_msglevel,
>    Â.set_msglevel  = bcm_set_msglevel,
> Â};
> @@ -206,7 +227,7 @@ int register_networkdev(PMINI_ADAPTER Adapter)
> Â Â Â Âif (result != STATUS_SUCCESS) {
> Â Â Â Â Â Â Â Âdev_err(&udev->dev,
> Â Â Â Â Â Â Â Â Â Â Â ÂPFX "Error in Reading the mac Address: %d", result);
> - Â Â Â Â Â Â Â return -EIO;
> + Â Â Â Â Â Â Â return -EIO;
> Â Â Â Â}
>
> Â Â Â Âresult = register_netdev(net);
> @@ -233,6 +254,6 @@ void unregister_networkdev(PMINI_ADAPTER Adapter)
> Â Â Â Âif (netif_msg_probe(Adapter))
> Â Â Â Â Â Â Â Âdev_info(&udev->dev, PFX "%s: unregister usb-%s%s\n",
> Â Â Â Â Â Â Â Â Â Â Â Â net->name, xdev->bus->bus_name, xdev->devpath);
> -
> +
> Â Â Â Âunregister_netdev(Adapter->dev);
> Â}
> --
> 1.6.2.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
> Please read the FAQ at Âhttp://www.tux.org/lkml/
>

thanks,

marek

--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/