Re: [PATCH 12/21] i386 Deprecate descriptor asm

From: Ingo Molnar
Date: Tue Nov 08 2005 - 02:31:12 EST



* Zachary Amsden <zach@xxxxxxxxxx> wrote:

> +static inline unsigned long get_desc_base(struct desc_struct *desc)
> +{
> + unsigned long base;
> + struct desc_internal_struct *dint = desc_internal(desc);
> + base = (dint->base0) | (dint->base1 << 16) | (dint->base2 << 24);
> + return base;
> +}

these cleanups are very nice too. I only have minor style nits: e.g. the
above is more readable as:

> +static inline unsigned long get_desc_base(struct desc_struct *desc)
> +{
> + struct desc_internal_struct *dint = desc_internal(desc);
> +
> + return dint->base0 | (dint->base1 << 16) | (dint->base2 << 24);
> +}

same for the remaining inline files.

also, these should quite likely be non-inlined functions - leading to
even more compact code. I'd suggest to put them into a new
arch/i386/kernel/segments.c file.

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/