[Stgt-devel] [PATCH 1/1] Remove duplicate pointer.

FUJITA Tomonori fujita.tomonori
Tue Jun 3 08:37:53 CEST 2008


On Sun, 01 Jun 2008 11:33:22 +1000
Mark Harvey <markh794 at gmail.com> wrote:

>  From 72e5a96969937bc68f9153d5c18af306827cf254 Mon Sep 17 00:00:00 2001
> From: Mark Harvey <markh794 at gmail.com>
> Date: Fri, 30 May 2008 17:54:16 +1000
> Subject: Share common 'private' pointer.
> 
> No need for smc & mmc to use different pointer.
> Use common pointer for private use.

Yeah, cleaning them up is nice but I like to do it a bit differently.

How about adding macro like device_type_priv or dtype_priv?

#define device_type_priv(lu) (lu)->xxc_p

Then we can convert smc and mmc to use it.

And how about explanatory names like device_type_data rather than
xxc_p?

I'm also fine with adding something like device_type_datasize to
struct device_type_template to remove the allocation from device type
modules.

Thanks,



More information about the stgt mailing list