All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Mao Wenan <maowenan@huawei.com>
Cc: Larry.Finger@lwfinger.net, florian.c.schilhabel@googlemail.com,
	straube.linux@gmail.com, kernel-janitors@vger.kernel.org,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8712: assign initial value to a static variable in r8712_efuse_pg_packet_wri
Date: Thu, 28 Feb 2019 08:04:54 +0000	[thread overview]
Message-ID: <20190228080454.GA8210@kroah.com> (raw)
In-Reply-To: <20190227033322.127177-1-maowenan@huawei.com>

On Wed, Feb 27, 2019 at 11:33:22AM +0800, Mao Wenan wrote:
> repeat_times is a static variable, but each time when it enters
> r8712_efuse_pg_packet_write(), it is set to zero,
> this value is not consistent with last calling, so next behavior
> is not our expect.
> 
> Signed-off-by: Mao Wenan <maowenan@huawei.com>
> ---
>  drivers/staging/rtl8712/rtl8712_efuse.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8712/rtl8712_efuse.c b/drivers/staging/rtl8712/rtl8712_efuse.c
> index 8bc45ffd3029..3e8421255170 100644
> --- a/drivers/staging/rtl8712/rtl8712_efuse.c
> +++ b/drivers/staging/rtl8712/rtl8712_efuse.c
> @@ -358,7 +358,7 @@ u8 r8712_efuse_pg_packet_write(struct _adapter *padapter, const u8 offset,
>  	u8 pg_header = 0;
>  	u16 efuse_addr = 0, curr_size = 0;
>  	u8 efuse_data, target_word_cnts = 0;
> -	static int repeat_times;
> +	static int repeat_times = 0;
>  	int sub_repeat;
>  	u8 bResult = true;
>  
> @@ -368,7 +368,6 @@ u8 r8712_efuse_pg_packet_write(struct _adapter *padapter, const u8 offset,
>  		return false;
>  	pg_header = MAKE_EFUSE_HEADER(offset, word_en);
>  	target_word_cnts = calculate_word_cnts(word_en);
> -	repeat_times = 0;
>  	efuse_addr = 0;
>  	while (efuse_addr < efuse_available_max_size) {
>  		curr_size = r8712_efuse_get_current_size(padapter);

This patch does not apply to my tree at all.

And are you sure this is correct?

greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <greg@kroah.com>
To: Mao Wenan <maowenan@huawei.com>
Cc: Larry.Finger@lwfinger.net, florian.c.schilhabel@googlemail.com,
	straube.linux@gmail.com, kernel-janitors@vger.kernel.org,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8712: assign initial value to a static variable in r8712_efuse_pg_packet_write()
Date: Thu, 28 Feb 2019 09:04:54 +0100	[thread overview]
Message-ID: <20190228080454.GA8210@kroah.com> (raw)
In-Reply-To: <20190227033322.127177-1-maowenan@huawei.com>

On Wed, Feb 27, 2019 at 11:33:22AM +0800, Mao Wenan wrote:
> repeat_times is a static variable, but each time when it enters
> r8712_efuse_pg_packet_write(), it is set to zero,
> this value is not consistent with last calling, so next behavior
> is not our expect.
> 
> Signed-off-by: Mao Wenan <maowenan@huawei.com>
> ---
>  drivers/staging/rtl8712/rtl8712_efuse.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8712/rtl8712_efuse.c b/drivers/staging/rtl8712/rtl8712_efuse.c
> index 8bc45ffd3029..3e8421255170 100644
> --- a/drivers/staging/rtl8712/rtl8712_efuse.c
> +++ b/drivers/staging/rtl8712/rtl8712_efuse.c
> @@ -358,7 +358,7 @@ u8 r8712_efuse_pg_packet_write(struct _adapter *padapter, const u8 offset,
>  	u8 pg_header = 0;
>  	u16 efuse_addr = 0, curr_size = 0;
>  	u8 efuse_data, target_word_cnts = 0;
> -	static int repeat_times;
> +	static int repeat_times = 0;
>  	int sub_repeat;
>  	u8 bResult = true;
>  
> @@ -368,7 +368,6 @@ u8 r8712_efuse_pg_packet_write(struct _adapter *padapter, const u8 offset,
>  		return false;
>  	pg_header = MAKE_EFUSE_HEADER(offset, word_en);
>  	target_word_cnts = calculate_word_cnts(word_en);
> -	repeat_times = 0;
>  	efuse_addr = 0;
>  	while (efuse_addr < efuse_available_max_size) {
>  		curr_size = r8712_efuse_get_current_size(padapter);

This patch does not apply to my tree at all.

And are you sure this is correct?

greg k-h

  reply	other threads:[~2019-02-28  8:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-27  3:33 [PATCH] staging: rtl8712: assign initial value to a static variable in r8712_efuse_pg_packet_write() Mao Wenan
2019-02-27  3:33 ` Mao Wenan
2019-02-28  8:04 ` Greg KH [this message]
2019-02-28  8:04   ` Greg KH
2019-02-28  9:26   ` [PATCH] staging: rtl8712: assign initial value to a static variable in r8712_efuse_pg_packet_wri maowenan
2019-02-28  9:26     ` [PATCH] staging: rtl8712: assign initial value to a static variable in r8712_efuse_pg_packet_write() maowenan

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=20190228080454.GA8210@kroah.com \
    --to=greg@kroah.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=florian.c.schilhabel@googlemail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maowenan@huawei.com \
    --cc=straube.linux@gmail.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.