Re: [PATCH 2/7]: Wrap computation of RFC3390-initial rate into separate function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25/01/07, Gerrit Renker <gerrit@xxxxxxxxxxxxxx> wrote:
Quoting Ian McDonald:
|  On 24/01/07, Gerrit Renker <gerrit@xxxxxxxxxxxxxx> wrote:
|  > [CCID 3]: Wrap computation of RFC3390-initial rate into separate function
|  > +static inline u64 rfc3390_initial_rate(struct sock *sk)
|
|  Apart from in header files which already exist you shouldn't be
|  putting new inline functions in as per a number of discussions on
|  lkml. The reason for this is that gcc now decides itself when to
|  inline code and when not to.
|
I would fully agree with you if the function contained some more statements.
But this one is really meagre, i.e. it would make no difference when placing
it as statement.

I have read through some of the discussions on inlining and am referring to
http://lwn.net/Articles/166172/
There, Linus Torvalds and Andrew Morton suggest to decide on a case-by-case
analysis. I believe it is good practice to tell the compiler the intention
(and thus have started to use `const' for similar reasons).

Would you be ok with moving that function into ccid3.h instead?

Don't worry about it. It's no big deal. Leave it as is.

Ian
--
Web: http://wand.net.nz/~iam4
Blog: http://iansblog.jandi.co.nz
WAND Network Research Group
-
To unsubscribe from this list: send the line "unsubscribe dccp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [IETF DCCP]     [Linux Networking]     [Git]     [Security]     [Linux Assembly]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux