[PATCH 2/7] staging: unisys: add simple error-check into visornic receive path

Greg KH gregkh at linuxfoundation.org
Fri Jul 24 20:36:57 UTC 2015


On Fri, Jul 24, 2015 at 12:00:20PM -0400, Benjamin Romer wrote:
> From: Tim Sell <Timothy.Sell at unisys.com>
> 
> Add an error check here for use with dynamic debugging.
> 
> Signed-off-by: Benjamin Romer <benjamin.romer at unisys.com>
> Signed-off-by: Tim Sell <Timothy.Sell at unisys.com>
> ---
>  drivers/staging/unisys/visornic/visornic_main.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
> index aeecb14..6ce3fc2 100644
> --- a/drivers/staging/unisys/visornic/visornic_main.c
> +++ b/drivers/staging/unisys/visornic/visornic_main.c
> @@ -1253,13 +1253,13 @@ visornic_rx(struct uiscmdrsp *cmdrsp)
>  			curr->data_len = 0;
>  			off += currsize;
>  		}
> -#ifdef DEBUG
>  		/* assert skb->len == off */
>  		if (skb->len != off) {
>  			dev_err(&devdata->netdev->dev,
> -				"%s something wrong; skb->len:%d != off:%d\n",
> -				netdev->name, skb->len, off);
> +				"something wrong; skb->len:%d != off:%d\n",
> +				skb->len, off);

The changelog comment doesn't match what you are doing here.

Also, shouldn't this be netdev_err() instead?

thanks,

greg k-h


More information about the devel mailing list