All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] ocfs2: fix a redundant re-initialization
@ 2016-05-23  2:30 Eric Ren
  2016-05-23  3:14 ` Joseph Qi
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Ren @ 2016-05-23  2:30 UTC (permalink / raw)
  To: ocfs2-devel

Obviously, memset() has zeroed the whole struct locking_max_version.
So, it's no need to zero its two fields individually.

Signed-off-by: Eric Ren <zren@suse.com>
---
 fs/ocfs2/stackglue.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c
index 5d965e8..855fb44 100644
--- a/fs/ocfs2/stackglue.c
+++ b/fs/ocfs2/stackglue.c
@@ -734,8 +734,6 @@ static void __exit ocfs2_stack_glue_exit(void)
 {
 	memset(&locking_max_version, 0,
 	       sizeof(struct ocfs2_protocol_version));
-	locking_max_version.pv_major = 0;
-	locking_max_version.pv_minor = 0;
 	ocfs2_sysfs_exit();
 	if (ocfs2_table_header)
 		unregister_sysctl_table(ocfs2_table_header);
-- 
2.6.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Ocfs2-devel] [PATCH] ocfs2: fix a redundant re-initialization
  2016-05-23  2:30 [Ocfs2-devel] [PATCH] ocfs2: fix a redundant re-initialization Eric Ren
@ 2016-05-23  3:14 ` Joseph Qi
  2016-05-23  5:33   ` Gang He
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph Qi @ 2016-05-23  3:14 UTC (permalink / raw)
  To: ocfs2-devel

On 2016/5/23 10:30, Eric Ren wrote:
> Obviously, memset() has zeroed the whole struct locking_max_version.
> So, it's no need to zero its two fields individually.
> 
> Signed-off-by: Eric Ren <zren@suse.com>
Looks good, thanks.
Reviewed-by: Joseph Qi <joseph.qi@huawei.com>

> ---
>  fs/ocfs2/stackglue.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c
> index 5d965e8..855fb44 100644
> --- a/fs/ocfs2/stackglue.c
> +++ b/fs/ocfs2/stackglue.c
> @@ -734,8 +734,6 @@ static void __exit ocfs2_stack_glue_exit(void)
>  {
>  	memset(&locking_max_version, 0,
>  	       sizeof(struct ocfs2_protocol_version));
> -	locking_max_version.pv_major = 0;
> -	locking_max_version.pv_minor = 0;
>  	ocfs2_sysfs_exit();
>  	if (ocfs2_table_header)
>  		unregister_sysctl_table(ocfs2_table_header);
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Ocfs2-devel] [PATCH] ocfs2: fix a redundant re-initialization
  2016-05-23  3:14 ` Joseph Qi
@ 2016-05-23  5:33   ` Gang He
  0 siblings, 0 replies; 3+ messages in thread
From: Gang He @ 2016-05-23  5:33 UTC (permalink / raw)
  To: ocfs2-devel




>>> 
> On 2016/5/23 10:30, Eric Ren wrote:
>> Obviously, memset() has zeroed the whole struct locking_max_version.
>> So, it's no need to zero its two fields individually.
>> 
>> Signed-off-by: Eric Ren <zren@suse.com>
> Looks good, thanks.
> Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
Reviewed-by: Gang He <ghe@suse.com>

> 
>> ---
>>  fs/ocfs2/stackglue.c | 2 --
>>  1 file changed, 2 deletions(-)
>> 
>> diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c
>> index 5d965e8..855fb44 100644
>> --- a/fs/ocfs2/stackglue.c
>> +++ b/fs/ocfs2/stackglue.c
>> @@ -734,8 +734,6 @@ static void __exit ocfs2_stack_glue_exit(void)
>>  {
>>  	memset(&locking_max_version, 0,
>>  	       sizeof(struct ocfs2_protocol_version));
>> -	locking_max_version.pv_major = 0;
>> -	locking_max_version.pv_minor = 0;
>>  	ocfs2_sysfs_exit();
>>  	if (ocfs2_table_header)
>>  		unregister_sysctl_table(ocfs2_table_header);
>> 
> 
> 
> 
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com 
> https://oss.oracle.com/mailman/listinfo/ocfs2-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-23  5:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-23  2:30 [Ocfs2-devel] [PATCH] ocfs2: fix a redundant re-initialization Eric Ren
2016-05-23  3:14 ` Joseph Qi
2016-05-23  5:33   ` Gang He

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.