[OPW,kernel,v2] Staging: bcm: line over 80 characters in Bcmnet.c
diff mbox

Message ID 1381175774-4705-1-git-send-email-ebru.akagunduz@gmail.com
State Rejected
Headers show

Commit Message

Ebru Akagündüz Oct. 7, 2013, 7:56 p.m. UTC
Fix checkpatch.pl issues with line over 80 characters in Bcmnet.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
---
 drivers/staging/bcm/Bcmnet.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Josh Triplett Oct. 7, 2013, 8:22 p.m. UTC | #1
On Mon, Oct 07, 2013 at 10:56:14PM +0300, Ebru Akagunduz wrote:
> Fix checkpatch.pl issues with line over 80 characters in Bcmnet.c
> 
> Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>

Please build-test; this puts an assignment before a declaration, which
isn't OK.

> ---
>  drivers/staging/bcm/Bcmnet.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/bcm/Bcmnet.c b/drivers/staging/bcm/Bcmnet.c
> index 4e470d4..cf2d5ce 100644
> --- a/drivers/staging/bcm/Bcmnet.c
> +++ b/drivers/staging/bcm/Bcmnet.c
> @@ -142,7 +142,8 @@ static void bcm_get_drvinfo(struct net_device *dev,
>  			    struct ethtool_drvinfo *info)
>  {
>  	struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev);
> -	struct bcm_interface_adapter *psIntfAdapter = Adapter->pvInterfaceAdapter;
> +	struct bcm_interface_adapter *psIntfAdapter;
> +	psIntfAdapter = Adapter->pvInterfaceAdapter;
>  	struct usb_device *udev = interface_to_usbdev(psIntfAdapter->interface);
>  
>  	strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
> -- 
> 1.8.1.2
> 
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
Greg KH Oct. 7, 2013, 8:23 p.m. UTC | #2
On Mon, Oct 07, 2013 at 10:56:14PM +0300, Ebru Akagunduz wrote:
> Fix checkpatch.pl issues with line over 80 characters in Bcmnet.c
> 
> Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
> ---
>  drivers/staging/bcm/Bcmnet.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/bcm/Bcmnet.c b/drivers/staging/bcm/Bcmnet.c
> index 4e470d4..cf2d5ce 100644
> --- a/drivers/staging/bcm/Bcmnet.c
> +++ b/drivers/staging/bcm/Bcmnet.c
> @@ -142,7 +142,8 @@ static void bcm_get_drvinfo(struct net_device *dev,
>  			    struct ethtool_drvinfo *info)
>  {
>  	struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev);
> -	struct bcm_interface_adapter *psIntfAdapter = Adapter->pvInterfaceAdapter;
> +	struct bcm_interface_adapter *psIntfAdapter;
> +	psIntfAdapter = Adapter->pvInterfaceAdapter;

What happens when you build this change?  You should have got a compiler
warning saying it wasn't ok to do this, right?

I'd just leave it alone, it's not a big deal to fix this type of thing
up.

thanks,

greg k-h

Patch
diff mbox

diff --git a/drivers/staging/bcm/Bcmnet.c b/drivers/staging/bcm/Bcmnet.c
index 4e470d4..cf2d5ce 100644
--- a/drivers/staging/bcm/Bcmnet.c
+++ b/drivers/staging/bcm/Bcmnet.c
@@ -142,7 +142,8 @@  static void bcm_get_drvinfo(struct net_device *dev,
 			    struct ethtool_drvinfo *info)
 {
 	struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev);
-	struct bcm_interface_adapter *psIntfAdapter = Adapter->pvInterfaceAdapter;
+	struct bcm_interface_adapter *psIntfAdapter;
+	psIntfAdapter = Adapter->pvInterfaceAdapter;
 	struct usb_device *udev = interface_to_usbdev(psIntfAdapter->interface);
 
 	strlcpy(info->driver, DRV_NAME, sizeof(info->driver));