Lines Matching defs:patch
15 #define klp_for_each_state(patch, state) \
16 for (state = patch->states; state && state->id; state++)
20 * the given patch
21 * @patch: livepatch that modifies the given system state
24 * Checks whether the given patch modifies the given system state.
26 * The function can be called either from pre/post (un)patch
31 struct klp_state *klp_get_state(struct klp_patch *patch, unsigned long id)
35 klp_for_each_state(patch, state) {
58 * It is typically called only from pre/post (un)patch
66 struct klp_patch *patch;
72 klp_for_each_patch(patch) {
73 if (patch == klp_transition_patch)
76 state = klp_get_state(patch, id);
86 /* Check if the patch is able to deal with the existing system state. */
87 static bool klp_is_state_compatible(struct klp_patch *patch,
92 state = klp_get_state(patch, old_state->id);
96 return !patch->replace;
106 bool klp_is_patch_compatible(struct klp_patch *patch)
113 if (!klp_is_state_compatible(patch, old_state))