Messages in this thread | ![/](/images/icornerl.gif) | | From | Andries.Brouwer@cwi ... | Date | Sun, 20 Apr 2003 23:58:18 +0200 (MEST) | Subject | Re: [CFT] more kdev_t-ectomy |
| |
> MKDEV(<constant>,<constant>) is a valid thing, as far as I'm concerned.
Yes. I was tempted to change the first argument of blk_register_region into a pair, killing some MKDEV occurrences, but then I noticed that almost all are of the form MKDEV(<constant>,<constant>), and that is not so bad.
Still, the fact that every single call of blk_register_region has a first argument MKDEV(ma,mi) suggests that one might consider leaving these parameters separate.
Andries
[Now that we are talking anyway, let me ask about something. You wrote blk_register_region so that subregions override superregions. At the bottom there is the full region. Was this just a general good idea, or do you have definite applications in mind? I ask this mostly because the hash lookup becomes more complicated in the general case. You may have noticed that I wrote
static inline int major_to_index(int major) { return major % MAX_PROBE_HASH; } static inline int dev_to_index(dev_t dev) { return major_to_index(MAJOR(dev)); }
and that is OK for regions with constant major. For multimajor regions a hash does not work very well, and a tree looks better.] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |