* [PATCH] netevent: remove automatic variable in register_netevent_notifier()
@ 2015-05-28 10:00 Wang Long
2015-05-28 14:07 ` Sergei Shtylyov
0 siblings, 1 reply; 3+ messages in thread
From: Wang Long @ 2015-05-28 10:00 UTC (permalink / raw)
To: davem, netdev; +Cc: long.wanglong, linux-kernel, peifeiyue, wanglong
Remove automatic variable 'err' in register_netevent_notifier() and
return the return value of atomic_notifier_chain_register() directly.
Signed-off-by: Wang Long <long.wanglong@huawei.com>
---
net/core/netevent.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/net/core/netevent.c b/net/core/netevent.c
index f17ccd2..8b3bc4f 100644
--- a/net/core/netevent.c
+++ b/net/core/netevent.c
@@ -31,10 +31,7 @@ static ATOMIC_NOTIFIER_HEAD(netevent_notif_chain);
*/
int register_netevent_notifier(struct notifier_block *nb)
{
- int err;
-
- err = atomic_notifier_chain_register(&netevent_notif_chain, nb);
- return err;
+ return atomic_notifier_chain_register(&netevent_notif_chain, nb);
}
EXPORT_SYMBOL_GPL(register_netevent_notifier);
--
1.8.3.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] netevent: remove automatic variable in register_netevent_notifier()
2015-05-28 10:00 [PATCH] netevent: remove automatic variable in register_netevent_notifier() Wang Long
@ 2015-05-28 14:07 ` Sergei Shtylyov
2015-05-29 0:56 ` long.wanglong
0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2015-05-28 14:07 UTC (permalink / raw)
To: Wang Long, davem, netdev; +Cc: linux-kernel, peifeiyue, wanglong
Hello.
On 5/28/2015 1:00 PM, Wang Long wrote:
> Remove automatic variable 'err' in register_netevent_notifier() and
> return the return value of atomic_notifier_chain_register() directly.
s/return value/result/, in order to avoid tautology.
> Signed-off-by: Wang Long <long.wanglong@huawei.com>
[...]
WBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] netevent: remove automatic variable in register_netevent_notifier()
2015-05-28 14:07 ` Sergei Shtylyov
@ 2015-05-29 0:56 ` long.wanglong
0 siblings, 0 replies; 3+ messages in thread
From: long.wanglong @ 2015-05-29 0:56 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: davem, netdev, linux-kernel, peifeiyue, wanglong
On 2015/5/28 22:07, Sergei Shtylyov wrote:
> Hello.
>
> On 5/28/2015 1:00 PM, Wang Long wrote:
>
>> Remove automatic variable 'err' in register_netevent_notifier() and
>> return the return value of atomic_notifier_chain_register() directly.
>
> s/return value/result/, in order to avoid tautology.
>
>> Signed-off-by: Wang Long <long.wanglong@huawei.com>
> [...]
>
> WBR, Sergei
>
>
>
Thanks, I will fix that.
Best Regards
Wang Long
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-29 0:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-28 10:00 [PATCH] netevent: remove automatic variable in register_netevent_notifier() Wang Long
2015-05-28 14:07 ` Sergei Shtylyov
2015-05-29 0:56 ` long.wanglong
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).