[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YCQLEHb8ga4SsngW@smile.fi.intel.com>
Date: Wed, 10 Feb 2021 18:34:24 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Paul Gortmaker <paul.gortmaker@...driver.com>
Cc: linux-kernel@...r.kernel.org, Li Zefan <lizefan@...wei.com>,
Ingo Molnar <mingo@...nel.org>,
Yury Norov <yury.norov@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Josh Triplett <josh@...htriplett.org>,
Peter Zijlstra <peterz@...radead.org>,
"Paul E. McKenney" <paulmck@...nel.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>
Subject: Re: [PATCH 5/8] lib: bitmap: pair nbits value with region struct
On Tue, Feb 09, 2021 at 05:59:04PM -0500, Paul Gortmaker wrote:
> A region is a standalone entity to some degree, but it needs to
> be paired with a bitmap width in order to set context and determine
> if the region even fits into the width of the bitmap.
>
> This will reduce parameter passing and enable using nbits as part
> of future dynamic region parameter parsing.
...
> +struct bitmap_region {
> + struct region *r;
Why do we need it as a pointer?
> + unsigned int nbits;
> +};
...
> struct region r;
> + struct bitmap_region br;
> + br.r = &r;
> + br.nbits = nmaskbits;
I thought about simply
struct bitmap_region br;
br.nbits = nmaskbits;
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists