Skip to contentSkip to conversation

PATCH: Add comment to make finding the priv_flags definition easier.

PATCH Ben Greear 2 participants 3 messages Aug 6, 2003

Subsystems (2)
lore
Share & tools
lore

Ben Greear

author
#0 lore raw

This helps me, at least, remember where the definitions are at!

include/linux/netdevice.h +3 -1
@@ -296,7 +296,9 @@
 
 	unsigned short		flags;	/* interface flags (a la BSD)	*/
 	unsigned short		gflags;
-        unsigned short          priv_flags; /* Like 'flags' but invisible to userspace. */
+        unsigned short          priv_flags; /* Like 'flags' but invisible to userspace,
+                                             * see: if.h for flag definitions.
+                                             */
         unsigned short          unused_alignment_fixer; /* Because we need priv_flags,
                                                          * and we want to be 32-bit aligned.
                                                          */
Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
#1 lore raw
Quoted 1 line · On Tue, 05 Aug 2003 17:24:39 -0700 Ben Greear <[email protected]> wrote:

This helps me, at least, remember where the definitions are at!

This is silly, adding one for 'priv_flags' and not one for 'flags'.

I really don't have a taste for these "look in file foo for interesting stuff about bar" type comments :-)

author
#2 lore raw
Quoted 11 lines · David S. Miller
Quoted 1 line · On Tue, 05 Aug 2003 17:24:39 -0700 Ben Greear <[email protected]> wrote:

This helps me, at least, remember where the definitions are at!

This is silly, adding one for 'priv_flags' and not one for 'flags'.

I really don't have a taste for these "look in file foo for interesting stuff about bar" type comments :-)

Since they are not enums, it is hard to know where they are properly defined. For someone who is new to the code, I think it helps a great deal to say where the possible values are defined.

I can add a comment for 'flags' as well, but not if no one cares anyway.

Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com