lkml.org 
[lkml]   [2016]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/2] livepatch/module: remove livepatch module notifier
On Fri, Mar 11, 2016 at 03:03:48PM -0500, Jessica Yu wrote:
> +/* Module can be either COMING or GOING */

IMO this comment doesn't really add anything: the below WARN_ON already
says as much. Also the location of the comment right above the function
is confusing: someone not familiar with the code might wonder why the
function is called klp_module_going() if the module can be either coming
or going. So I think the comment can just be removed.

> +void klp_module_going(struct module *mod)
> {
> - int ret;
> - struct module *mod = data;
> struct klp_patch *patch;
> struct klp_object *obj;
>
> - if (action != MODULE_STATE_COMING && action != MODULE_STATE_GOING)
> - return 0;
> + if (WARN_ON(mod->state != MODULE_STATE_GOING &&
> + mod->state != MODULE_STATE_COMING))
> + return;

--
Josh

\
 
 \ /
  Last update: 2016-03-14 21:41    [W:0.084 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site