lkml.org 
[lkml]   [2005]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    Subject[patch 21/21] CKRM: Fix for compiler warnings
    From
    --
    Content-Disposition: inline; filename=compiler-warning-fix


    Signed-Off-By: Vivek Kashyap <kashyapv@us.ibm.com>
    Signed-Off-By: Gerrit Huizenga <gh@us.ibm.com>

    The attached patch fixes warnings seen when event callback table
    is initialized.

    kernel/ckrm/ckrm_sockc.c | 6 ++++--
    kernel/ckrm/ckrm_tc.c | 21 +++++++++++++--------
    2 files changed, 17 insertions(+), 10 deletions(-)

    Index: linux-2.6.12-rc3-ckrm6/kernel/ckrm/ckrm_tc.c
    ===================================================================
    --- linux-2.6.12-rc3-ckrm6.orig/kernel/ckrm/ckrm_tc.c 2005-05-05 10:50:23.000000000 -0700
    +++ linux-2.6.12-rc3-ckrm6/kernel/ckrm/ckrm_tc.c 2005-05-05 10:50:58.000000000 -0700
    @@ -253,14 +253,17 @@ do { \
    ce_release(&ct_taskclass); \
    } while (0)

    -static void cb_taskclass_newtask(struct task_struct *tsk)
    +static void cb_taskclass_newtask(void *tsk1)
    {
    + struct task_struct *tsk = (struct task_struct *)tsk1;
    +
    tsk->taskclass = NULL;
    INIT_LIST_HEAD(&tsk->taskclass_link);
    }

    -static void cb_taskclass_fork(struct task_struct *tsk)
    +static void cb_taskclass_fork(void *tsk1)
    {
    + struct task_struct *tsk = (struct task_struct *)tsk1;
    struct ckrm_task_class *cls = NULL;

    pr_debug("%p:%d:%s\n", tsk, tsk->pid, tsk->comm);
    @@ -281,26 +284,28 @@ static void cb_taskclass_fork(struct tas
    ce_release(&ct_taskclass);
    }

    -static void cb_taskclass_exit(struct task_struct *tsk)
    +static void cb_taskclass_exit(void *tsk1)
    {
    + struct task_struct *tsk = (struct task_struct *)tsk1;
    +
    CE_CLASSIFY_NORET(&ct_taskclass, CKRM_EVENT_EXIT, tsk);
    ckrm_set_taskclass(tsk, (void *)-1, NULL, CKRM_EVENT_EXIT);
    }

    -static void cb_taskclass_exec(const char *filename)
    +static void cb_taskclass_exec(void *filename)
    {
    pr_debug("%p:%d:%s <%s>\n", current, current->pid, current->comm,
    - filename);
    + (const char *)filename);
    CE_CLASSIFY_TASK_PROTECT(CKRM_EVENT_EXEC, current);
    }

    -static void cb_taskclass_uid(void)
    +static void cb_taskclass_uid(void *arg)
    {
    pr_debug("%p:%d:%s\n", current, current->pid, current->comm);
    CE_CLASSIFY_TASK_PROTECT(CKRM_EVENT_UID, current);
    }

    -static void cb_taskclass_gid(void)
    +static void cb_taskclass_gid(void *arg)
    {
    pr_debug("%p:%d:%s\n", current, current->pid, current->comm);
    CE_CLASSIFY_TASK_PROTECT(CKRM_EVENT_GID, current);
    @@ -313,7 +318,7 @@ static struct ckrm_event_spec taskclass_
    {CKRM_EVENT_EXIT, { cb_taskclass_exit, NULL }},
    {CKRM_EVENT_UID, { cb_taskclass_uid, NULL }},
    {CKRM_EVENT_GID, { cb_taskclass_gid, NULL }},
    - {-1, { -1, NULL }}
    + {-1, { NULL, NULL }}
    };

    /*
    Index: linux-2.6.12-rc3-ckrm6/kernel/ckrm/ckrm_sockc.c
    ===================================================================
    --- linux-2.6.12-rc3-ckrm6.orig/kernel/ckrm/ckrm_sockc.c 2005-05-05 10:50:23.000000000 -0700
    +++ linux-2.6.12-rc3-ckrm6/kernel/ckrm/ckrm_sockc.c 2005-05-05 10:50:58.000000000 -0700
    @@ -172,8 +172,9 @@ static void ckrm_sock_add_resctrl(struct
    * Functions called from classification points *
    **************************************************************************/

    -static void cb_sockclass_listen_start(struct sock *sk)
    +static void cb_sockclass_listen_start(void *sk1)
    {
    + struct sock *sk = (struct sock *)sk1;
    struct ckrm_net_struct *ns = NULL;
    struct ckrm_sock_class *newcls = NULL;
    struct ckrm_res_ctlr *rcbs;
    @@ -243,8 +244,9 @@ static void cb_sockclass_listen_start(st
    return;
    }

    -static void cb_sockclass_listen_stop(struct sock *sk)
    +static void cb_sockclass_listen_stop(void *sk1)
    {
    + struct sock *sk = (struct sock *)sk1;
    struct ckrm_net_struct *ns = NULL;
    struct ckrm_sock_class *newcls = NULL;

    --

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-05-05 21:29    [W:0.025 / U:59.828 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site