Re: [PATCH] trace.c: mark file-local function static

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

 



On Mon, Dec 20, 2010 at 2:53 PM, Drew Northup <drew.northup@xxxxxxxxx> wrote:
>
> On Mon, 2010-12-20 at 13:17 -0200, Thiago Farina wrote:
>> On Mon, Dec 20, 2010 at 10:00 AM, Drew Northup <drew.northup@xxxxxxxxx> wrote:
>> >
>> > On Thu, 2010-12-16 at 21:43 -0200, Thiago Farina wrote:
>> >> On Thu, Dec 16, 2010 at 8:38 PM, Vasyl' <vvavrychuk@xxxxxxxxx> wrote:
>> >> > Signed-off-by: Vasyl' Vavrychuk <vvavrychuk@xxxxxxxxx>
>> >> > ---
>> >> > Âtrace.c | Â Â2 +-
>> >> > Â1 files changed, 1 insertions(+), 1 deletions(-)
>> >> >
>> >> > diff --git a/trace.c b/trace.c
>> >> > index 1e560cb..62586fa 100644
>> >> > --- a/trace.c
>> >> > +++ b/trace.c
>> >> > @@ -25,7 +25,7 @@
>> >> > Â#include "cache.h"
>> >> > Â#include "quote.h"
>> >> >
>> >> > -void do_nothing(size_t unused)
>> >> > +static void do_nothing(size_t unused)
>> >> > Â{
>> >> > Â}
>> >> >
>> >> If it means something, this looks sane to me.
>> >>
>> >> Acked-by: Thiago Farina <tfransosi@xxxxxxxxx>
>> >
>> > It may be sane, but why should we trust that it is without a commit
>> > message?
>>
>> Why such trivial thing needs further explanation?
>
> Because even trivial fixes may break non-trivial things.
> In addition, without justification we'd just as soon have somebody come
> back with another patch six months down the road that changes it back to
> the original code. Now that wouldn't make a whole lot of sense, now
> would it?

I don't think so, it's making the function private, because the
function is used only in that file and as such if you see a function
marked as static you know that and doesn't need further explanation in
my pov (but it seems you don't think like that).

> Alas the best way to avoid such a situation is to explain why a change
> was made to begin with.
>

So, you are welcome to contribute and suggest such description for
this trivial (that may break non-trivial things) patch. So we can
please you and others in the future.


Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" 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 Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]