All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ajay Singh <ajay.kathat@microchip.com>
Cc: linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org,
	venkateswara.kaja@microchip.com, gregkh@linuxfoundation.org,
	ganesh.krishna@microchip.com, adham.abozaeid@microchip.com,
	aditya.shankar@microchip.com
Subject: Re: [PATCH 09/11] staging: wilc1000: remove line over 80 char in cfg_connect_result()
Date: Wed, 21 Mar 2018 10:49:13 +0300	[thread overview]
Message-ID: <20180321074913.ldk2lcie4hsmnic4@mwanda> (raw)
In-Reply-To: <1521564944-3565-10-git-send-email-ajay.kathat@microchip.com>

On Tue, Mar 20, 2018 at 10:25:42PM +0530, Ajay Singh wrote:
> diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> index 1b6fe64..af1b8aa 100644
> --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> @@ -460,6 +460,17 @@ static void cfg_scan_result(enum scan_event scan_event,
>  	}
>  }
>  
> +static inline bool wilc_wfi_cfg_scan_time_expired(int i)

"i" is the wrong parameter to pass.  The name is not useful.  Probably
the right parameter is either &last_scanned_shadow[i] or
last_scanned_shadow[i].time_scan_cached.

> +{
> +	unsigned long now = jiffies;
> +
> +	if (time_after(now, last_scanned_shadow[i].time_scan_cached +
> +		       (unsigned long)(nl80211_SCAN_RESULT_EXPIRE - (1 * HZ))))
> +		return true;
> +	else
> +		return false;

Also I think it you apply this patch and then run checkpatch.pl --strict
against the file it will complain that it should be:

	if (time_after(now, last_scanned_shadow[i].time_scan_cached +
		       (unsigned long)(nl80211_SCAN_RESULT_EXPIRE - (1 * HZ))))
		return true;
	return false;

> +}
> +
>  int wilc_connecting;
>  
>  static void cfg_connect_result(enum conn_event conn_disconn_evt,
> @@ -505,17 +516,14 @@ static void cfg_connect_result(enum conn_event conn_disconn_evt,
>  			bool scan_refresh = false;
>  			u32 i;
>  
> -			memcpy(priv->associated_bss, conn_info->bssid, ETH_ALEN);
> +			memcpy(priv->associated_bss, conn_info->bssid,
> +			       ETH_ALEN);
>  

It basically always helps me if the "new function" changes are in a
patch by themselves.  These lines are a pure white space changes and I
have a script that reviews those for me instantly, but when it's mixed
with this patch I have to do it by hand.

regards,
dan carpenter

  reply	other threads:[~2018-03-21  7:49 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-20 16:55 [PATCH 00/11] staging: wilc1000: fix for checkpatch and handled malloc memory properly Ajay Singh
2018-03-20 16:55 ` [PATCH 01/11] staging: wilc1000: refactor scan() to free kmalloc memory on failure cases Ajay Singh
2018-03-20 19:46   ` Dan Carpenter
2018-03-21  5:05     ` Ajay Singh
2018-03-20 16:55 ` [PATCH 02/11] staging: wilc1000: removed unused global variables for gtk and ptk information Ajay Singh
2018-03-20 16:55 ` [PATCH 03/11] staging: wilc1000: remove line over 80 char warnings in set_wiphy_params() Ajay Singh
2018-03-20 16:55 ` [PATCH 04/11] staging: wilc1000: refactor WILC_WFI_p2p_rx() to avoid line over 80 char Ajay Singh
2018-03-21  7:13   ` Dan Carpenter
2018-03-21 13:55   ` Claudiu Beznea
2018-03-20 16:55 ` [PATCH 05/11] staging: wilc1000: rename WILC_WFI_p2p_rx & s32Freq to avoid camelCase Ajay Singh
2018-03-20 16:55 ` [PATCH 06/11] staging: wilc1000: refactor mgmt_tx to fix line over 80 chars Ajay Singh
2018-03-21  7:40   ` Dan Carpenter
2018-03-21 13:59   ` Claudiu Beznea
2018-03-20 16:55 ` [PATCH 07/11] staging: wilc1000: rename hAgingTimer to avoid camelCase issue Ajay Singh
2018-03-20 16:55 ` [PATCH 08/11] staging: wilc1000: fix line over 80 char issue in clear_shadow_scan() Ajay Singh
2018-03-20 16:55 ` [PATCH 09/11] staging: wilc1000: remove line over 80 char in cfg_connect_result() Ajay Singh
2018-03-21  7:49   ` Dan Carpenter [this message]
2018-03-20 16:55 ` [PATCH 10/11] staging: wilc1000: remove unused 'struct add_key_params' Ajay Singh
2018-03-20 16:55 ` [PATCH 11/11] staging: wilc1000: remove line over 80 char warning in few functions Ajay Singh
2018-03-21  7:51 ` [PATCH 00/11] staging: wilc1000: fix for checkpatch and handled malloc memory properly Dan Carpenter
2018-03-21  9:20   ` Ajay Singh
2018-03-21 14:04     ` Claudiu Beznea
2018-03-27  7:22       ` Ajay Singh
2018-03-27  8:55         ` Claudiu Beznea
2018-03-27 13:16           ` Ajay Singh
2018-03-28 11:31         ` Greg KH
2018-04-04  5:15           ` Ajay Singh
2018-04-23 13:43             ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180321074913.ldk2lcie4hsmnic4@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=adham.abozaeid@microchip.com \
    --cc=aditya.shankar@microchip.com \
    --cc=ajay.kathat@microchip.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=ganesh.krishna@microchip.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=venkateswara.kaja@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.