public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] allow the HBA to reserve target and device private areas
Date: Wed, 25 May 2005 08:13:53 +0100	[thread overview]
Message-ID: <20050525071353.GA13141@infradead.org> (raw)
In-Reply-To: <1116971851.5897.52.camel@mulgrave>

On Tue, May 24, 2005 at 04:57:31PM -0500, James Bottomley wrote:
> +/* Private area maintenance. The driver requested allocations come
> + * directly after the transport class allocations (if any).  The idea
> + * is that you *must* call these only once.  The code assumes that the
> + * initial values are the ones the transport specific code requires */
> +static inline void
> +scsi_transport_reserve_target(struct scsi_transport_template * t, int space)
> +{
> +	t->target_private_offset = ALIGN(t->target_size, sizeof(void *));
> +	t->target_size = t->target_private_offset + space;
> +}
> +static inline void
> +scsi_transport_reserve_device(struct scsi_transport_template * t, int space)
> +{
> +	t->device_private_offset = ALIGN(t->device_size, sizeof(void *));
> +	t->device_size = t->device_private_offset + space;
> +}

Do we really need separate functions for this?  It would be so much nicer
to just have target_priv_size and device_priv_size members in the
foo_function_template.  Yes, it would mean having this in all different
transport templates, but in general having this as compile-time initializer
seems a lot nicer.


  reply	other threads:[~2005-05-25  7:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-24 21:57 [PATCH] allow the HBA to reserve target and device private areas James Bottomley
2005-05-25  7:13 ` Christoph Hellwig [this message]
2005-05-25 12:17   ` James Bottomley

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=20050525071353.GA13141@infradead.org \
    --to=hch@infradead.org \
    --cc=James.Bottomley@SteelEye.com \
    --cc=linux-scsi@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