From: Dan Carpenter <dan.carpenter@oracle.com>
To: Leo Kim <leo.kim@atmel.com>
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
Chris.Park@atmel.com, austin.shin@atmel.com,
linux-wireless@vger.kernel.org, Nicolas.FERRE@atmel.com,
tony.cho@atmel.com, adham.abozaeid@atmel.com
Subject: Re: [PATCH 4/6] staging: wilc1000: removes unnecessary wilc_debug print log
Date: Fri, 19 Feb 2016 14:04:33 +0300 [thread overview]
Message-ID: <20160219110433.GQ32153@mwanda> (raw)
In-Reply-To: <1455871032-7625-4-git-send-email-leo.kim@atmel.com>
On Fri, Feb 19, 2016 at 05:37:10PM +0900, Leo Kim wrote:
> This patch removes unnecessary wilc_debug print log.
> The print log was written when if condition fail.
> The condition is chip-id check function.
> Also, replaces this condition with normal function.
>
> Signed-off-by: Leo Kim <leo.kim@atmel.com>
> ---
> drivers/staging/wilc1000/wilc_wlan.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
> index a51c66b..4873106 100644
> --- a/drivers/staging/wilc1000/wilc_wlan.c
> +++ b/drivers/staging/wilc1000/wilc_wlan.c
> @@ -508,9 +508,7 @@ void chip_wakeup(struct wilc *wilc)
>
> do {
> usleep_range(2 * 1000, 2 * 1000);
> - if ((wilc_get_chipid(wilc, true) == 0))
> - wilc_debug(N_ERR, "Couldn't read chip id. Wake up failed\n");
> -
> + wilc_get_chipid(wilc, true);
Why do we need this function when we call it again on the next line?
> } while ((wilc_get_chipid(wilc, true) == 0) && ((++trials % 3) == 0));
^^^^^^^^^^^^^^^
Also what the heck is ((++trials % 3) == 0))??? It looks like we are
supposed to retry 3 times but actually we don't retry at all. :P
regards,
dan carpenter
next prev parent reply other threads:[~2016-02-19 11:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-19 8:37 [PATCH 1/6] staging: wilc1000: removes wilc_dbg() Leo Kim
2016-02-19 8:37 ` [PATCH 2/6] staging: wilc1000: replaces wilc_debug with netdev_err Leo Kim
2016-02-19 8:37 ` [PATCH 3/6] staging: wilc1000: removes unnecessary wilc_debug print log Leo Kim
2016-02-19 8:37 ` [PATCH 4/6] " Leo Kim
2016-02-19 11:04 ` Dan Carpenter [this message]
2016-02-19 8:37 ` [PATCH 5/6] staging: wilc1000: removes unnecessary variable of wilc_mac_cfg_t structure Leo Kim
2016-02-19 8:37 ` [PATCH 6/6] staging: wilc1000: wilc_wlan_cfg_init: changes unused argument Leo Kim
2016-02-20 1:06 ` [PATCH 1/6] staging: wilc1000: removes wilc_dbg() 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=20160219110433.GQ32153@mwanda \
--to=dan.carpenter@oracle.com \
--cc=Chris.Park@atmel.com \
--cc=Nicolas.FERRE@atmel.com \
--cc=adham.abozaeid@atmel.com \
--cc=austin.shin@atmel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=leo.kim@atmel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=tony.cho@atmel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).