lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 02 Sep 2015 11:42:23 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	jiri@...nulli.us
Cc:	tom@...bertland.com, netdev@...r.kernel.org
Subject: Re: [PATCH] flow_dissector: Use 'const' where possible.

From: Jiri Pirko <jiri@...nulli.us>
Date: Wed, 2 Sep 2015 18:39:34 +0200

> Wed, Sep 02, 2015 at 06:33:34AM CEST, tom@...bertland.com wrote:
>>> @@ -19,14 +19,14 @@
>>>  #include <net/flow_dissector.h>
>>>  #include <scsi/fc/fc_fcoe.h>
>>>
>>> -static bool skb_flow_dissector_uses_key(struct flow_dissector *flow_dissector,
>>> -                                       enum flow_dissector_key_id key_id)
>>> +static bool dissector_uses_key(const struct flow_dissector *flow_dissector,
>>> +                              enum flow_dissector_key_id key_id)
>>>  {
>>>         return flow_dissector->used_keys & (1 << key_id);
>>>  }
>>>
>>> -static void skb_flow_dissector_set_key(struct flow_dissector *flow_dissector,
>>> -                                      enum flow_dissector_key_id key_id)
>>> +static void dissector_set_key(struct flow_dissector *flow_dissector,
>>> +                             enum flow_dissector_key_id key_id)
>>>  {
>>>         flow_dissector->used_keys |= (1 << key_id);
>>>  }
>>> @@ -51,20 +51,20 @@ void skb_flow_dissector_init(struct flow_dissector *flow_dissector,
>>
>>I suppose we should drop skb_ from skb_flow_dissector_init and
>>skb_flow_dissector_target as well.
> 
> I like to have "namespaces" by function prefixes. Code is easier to read
> then...

I completely disagree.

These are static, local functions, the can use whatever names they want
and the shorter the better.

Long function names drive me absolutely insane and make keeping the
argument lists under ~80 columns a royal pain in the ass.

So I will continue to trim function names down to something more
reasonable when they are static and local to a source file.

And I encourage you to do so as well.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ