[lkml]   [2003]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] Trivial Comment Change (Please Verify) (2.5.59)
Please remember that I'm a newbie.  As such, even though I'm only
changing a comment, an expert should review the change before it goes

I was looking up the definition of kdev_t, and I saw it defined two
entirely different ways (only once for compilation purposes, so no
compile time problems).

In the same file, <include/linux/kdev_t.h>, patched below and I only
patched the comments and did not touch the code, it was defined as (in
the comments):

(1) typedef struct { unsigned short major, minor; } kdev_t;

Which would be a long (two shorts), then actually defined later in the
code as:

(2) typedef struct {
unsigned short value;
} kdev_t;

As you can guess, Redefining the comment to be two "chars" instead of
two shorts keeps the meaningful description in the comments (there is a
major # component and a minor # component), but redefining them to be
chars (bytes) rather than shorts reflects more accurately the storage
space allotted by the actual structure (one short, not two).

I figure it's best, when possible, to have the comments match up with
reality. If someone (like myself just now) is referencing the comments
for guidance with respect to what the data structures look like, they
would have soon discoverred that the data structures looked nothing like
what the comment was describing.

I'd appreciate if someone could get this or a similar patch in, and no,
I don't need to be specially credited for making a comment change :-).

Patch follows.

--- kdev_t.h.orig 2003-01-17 21:25:18.000000000 -0500
+++ kdev_t.h 2003-01-17 21:33:57.000000000 -0500
@@ -31,7 +31,7 @@

However, for the time being we let kdev_t be almost the same as dev_t:

-typedef struct { unsigned short major, minor; } kdev_t;
+typedef struct { unsigned char major, minor; } kdev_t;

Admissible operations on an object of type kdev_t:
- passing it along

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:32    [W:0.022 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site