Patchwork net: Cleanup of af_unix

login
register
mail settings
Submitter Eric Dumazet
Date Nov. 17, 2008, 7:20 p.m.
Message ID <4921C3FD.106@cosmosbay.com>
Download mbox | patch
Permalink /patch/9201/
State Accepted
Delegated to: David Miller
Headers show

Comments

Eric Dumazet - Nov. 17, 2008, 7:20 p.m.
Joe Perches a écrit :
> On Mon, 2008-11-17 at 07:46 +0100, Eric Dumazet wrote:
>> [PATCH] net: Cleanup of af_unix
>>
>> This is a pure cleanup of net/unix/af_unix.c to meet current code style standards
>>
>> Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
>> --- 
>>  net/unix/af_unix.c |  117 ++++++++++++++++++++-----------------------
>>  1 files changed, 55 insertions(+), 62 deletions(-)
>> plain text document attachment (af_unix_cleanup.patch)
>> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
>> index 4a39771..58db2a2 100644
>> --- a/net/unix/af_unix.c
>> +++ b/net/unix/af_unix.c
>> @@ -354,7 +353,7 @@ static void unix_sock_destructor(struct sock *sk)
>>  	WARN_ON(!sk_unhashed(sk));
>>  	WARN_ON(sk->sk_socket);
>>  	if (!sock_flag(sk, SOCK_DEAD)) {
>> -		printk("Attempt to release alive unix socket: %p\n", sk);
>> +		printk(KERN_DEBUG "Attempt to release alive unix socket: %p\n", sk);
>>  		return;
>>  	}
>>  
> 
> Well, perhaps not quite pure.
> The KERN_ level selection is debatable.
> This could or perhaps should be KERN_INFO.

Thanks Joe

[PATCH] net: af_unix should use KERN_INFO instead of KERN_DEBUG

As spotted by Joe Perches, we should use KERN_INFO in unix_sock_destructor()

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
David Miller - Nov. 19, 2008, 11:48 p.m.
From: Eric Dumazet <dada1@cosmosbay.com>
Date: Mon, 17 Nov 2008 20:20:29 +0100

> [PATCH] net: af_unix should use KERN_INFO instead of KERN_DEBUG
> 
> As spotted by Joe Perches, we should use KERN_INFO in unix_sock_destructor()
> 
> Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index f2cf3f5..da3e804 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -353,7 +353,7 @@  static void unix_sock_destructor(struct sock *sk)
 	WARN_ON(!sk_unhashed(sk));
 	WARN_ON(sk->sk_socket);
 	if (!sock_flag(sk, SOCK_DEAD)) {
-		printk(KERN_DEBUG "Attempt to release alive unix socket: %p\n", sk);
+		printk(KERN_INFO "Attempt to release alive unix socket: %p\n", sk);
 		return;
 	}