From: Rob Wilkens <robw@optonline.net>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] Trivial Comment Change (Please Verify) (2.5.59)
Date: Fri, 17 Jan 2003 21:49:16 -0500 [thread overview]
Message-ID: <1042858155.3800.16.camel@RobsPC.RobertWilkens.com> (raw)
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
through.
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
reply other threads:[~2003-01-18 2:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1042858155.3800.16.camel@RobsPC.RobertWilkens.com \
--to=robw@optonline.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®