mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: Thunder from the hill <thunder@ngforever.de>
Cc: linux-kernel@vger.kernel.org, James.Bottomley@steeleye.com
Subject: Re: Further madness in fs/partitions/check.c?
Date: Sat, 13 Jul 2002 09:49:37 -0500	[thread overview]
Message-ID: <200207131449.g6DEnbk02977@localhost.localdomain> (raw)

> struct device contains a void * driver_data. It should certainly point
> to  a couple of bytes where the driver data was saved.

> In line 288, we have this:

> current_driverfs_dev->driver_data = (void *)__mkdev(hd->major,
> minor+part);

> What kind of pointer should we get here? ;-)

> Can the author please explain what was intented here?

This is transient code to save the device in the driver_data.  It is later 
picked back out at line 229.  It conforms to the old programmer principle that 
if you can always guarantee your data takes up less space than a pointer (on 
all archs), then you might as well just cast the data into the pointer instead 
of wasting a malloc for it.

The driverfs code is still in flux.  However, partition handling (if it 
belongs anywhere at all) will probably be in the unwritten class handlers and 
greatly tidied up.

The idea behind this code is to get a quick and dirty view of what partitions 
might be seen as in driverfs and thus to stimulate debate about how they 
should be done.

James



             reply	other threads:[~2002-07-13 14:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-13 14:49 James Bottomley [this message]
2002-07-13 15:19 ` Thunder from the hill
  -- strict thread matches above, loose matches on Subject: below --
2002-07-13  3:31 Thunder from the hill

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=200207131449.g6DEnbk02977@localhost.localdomain \
    --to=james.bottomley@steeleye.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thunder@ngforever.de \
    /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®