lkml.org 
[lkml]   [2023]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 01/11] static_call: Improve key type abstraction
On Tue, Mar 21, 2023 at 09:00:07PM -0700, Josh Poimboeuf wrote:
> diff --git a/kernel/static_call_inline.c b/kernel/static_call_inline.c
> index 639397b5491c..41f6bda6773a 100644
> --- a/kernel/static_call_inline.c
> +++ b/kernel/static_call_inline.c
> @@ -112,15 +112,21 @@ static inline void static_call_sort_entries(struct static_call_site *start,
>
> static inline bool static_call_key_has_mods(struct static_call_key *key)
> {
> - return !(key->type & 1);
> + return !!(key->type & 1);
> }
>
> -static inline struct static_call_mod *static_call_key_next(struct static_call_key *key)
> +static inline struct static_call_mod *static_call_key_mods(struct static_call_key *key)
> {
> if (!static_call_key_has_mods(key))
> return NULL;
>
> - return key->mods;
> + return (struct static_call_mod *)(key->type & ~1);
> +}
> +

Oops, these parts belonged in the next patch.

--
Josh

\
 
 \ /
  Last update: 2023-03-27 01:11    [W:0.758 / U:0.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site