Re: [PATCH] new UDPCP Communication Protocol

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jesper Juhl
Date: Sunday, January 2, 2011 - 12:55 pm

On Sun, 2 Jan 2011, stefani@seibold.net wrote:


[...]

I personally don't think this makes much sense.
Version numbers for individual modules tend to not get updated as the code 
changes over the years, which make them rather meaningless.
Since this module depends on functionallity of the kernel which it is 
compiled with, the actual (meaningful) version of this code is that of the 
kernel tree being compiled that includes this code. Which again makes this 
specific version define meaningless.

So, why not save a few lines of code and get rid of this rather pointless 
thing?

[...]

Why not

static struct udpcp_dest *find_dest(struct sock *sk, __be32 addr, __be16 port)
{
     struct udpcp_dest *dest =  __find_dest(sk, addr, port);

?


[...]

Don't you mean "packet" rather than "packed" here?


[...]

I believe you mean "Return true if the passed ..."


[...]

CodingStyle would want this as

     if (!inet->recverr) {
             skb_queue_purge(&dest->xmit);
     } else {

If one branch needs {} then both should get them.


[...]

Same comment as above.
There are more occurences of this, I'm not going to point them all out.


[...]

The line above uses spaces for indentation. It should use one tab.


[...]

Might as well save a few lines and make this

static unsigned int udpcp_tx_queue_len(struct sock *sk, struct udpcp_dest *dest)
{
     struct sk_buff *skb;
     unsigned int n = 0;


[...]

Here as well
        unsigned int n = 0;



-- 
Jesper Juhl <jj@chaosbits.net>            http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] new UDPCP Communication Protocol, Jesper Juhl, (Sun Jan 2, 12:55 pm)
Re: [PATCH] new UDPCP Communication Protocol, Stefani Seibold, (Sun Jan 2, 2:46 pm)
Re: [PATCH] new UDPCP Communication Protocol, Jesper Juhl, (Sun Jan 2, 3:04 pm)
Re: [PATCH] new UDPCP Communication Protocol, Stefani Seibold, (Sun Jan 2, 3:21 pm)