[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 07/22] x86/mtrr: expose functions for pausing caching



On Wed, Jul 02, 2025 at 04:57:12PM +0200, Jan Beulich wrote:
> > @@ -440,9 +436,10 @@ static DEFINE_SPINLOCK(set_atomicity_lock);
> >   * has been called.
> >   */
> >
> > -static bool prepare_set(void)
> > +struct mtrr_pausing_state mtrr_pause_caching(void)
>
> These becoming non-static without being called from anywhere else isn't going 
> to
> be liked by Misra. Hence the part of static -> extern may need to be deferred
> until the new user(s) appear(s).

Sounds like small part needs to be moved into the next patch.

> Furthermore this returning of a struct by value isn't very nice, and looks to 
> be
> easy to avoid here.
>
> Jan

Are you suggesting to use an output parameter instead?  Out of
curiosity, what's bad in returning trivial structs by value?

Regards



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.