From: gh@us.ibm.com
To: linux-kernel@vger.kernel.org, ckrm-tech@lists.sourceforge.net
Subject: [patch 21/21] CKRM: Fix for compiler warnings
Date: Thu, 05 May 2005 11:07:52 -0700 [thread overview]
Message-ID: <20050505180936.211142000@us.ibm.com> (raw)
In-Reply-To: 20050505180731.010896000@us.ibm.com
--
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;
--
next prev parent reply other threads:[~2005-05-05 19:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-05 18:07 [patch 00/21] CKRM: Core patch set with Classification Engine, basic controllers gh
2005-05-05 18:07 ` [patch 01/21] CKRM: Core CKRM Event Callbacks gh
2005-05-05 18:07 ` [patch 02/21] CKRM: Processor Delay Accounting gh
2005-05-05 18:07 ` [patch 03/21] CKRM: Core infrastructure gh
2005-05-05 18:07 ` [patch 04/21] CKRM: Resource Control File System (rcfs) gh
2005-05-05 18:07 ` [patch 05/21] CKRM: Classtype definitions for task class gh
2005-05-05 18:07 ` [patch 06/21] CKRM: Classtype definitions for socket class gh
2005-05-05 18:07 ` [patch 07/21] CKRM: Numtasks Controller gh
2005-05-05 18:07 ` [patch 08/21] CKRM: Documentation gh
2005-05-05 18:07 ` [patch 09/21] CKRM: Add missing read_unlock gh
2005-05-05 18:07 ` [patch 10/21] CKRM: Move Callbacks from listenaq to socketclass gh
2005-05-05 18:07 ` [patch 11/21] CKRM: Change ipaddr_port syntax gh
2005-05-05 18:07 ` [patch 12/21] CKRM: Check to see if my guarantee is set to DONTCARE gh
2005-05-05 18:07 ` [patch 13/21] CKRM: Minor cosmetic cleanups in numtasks controller gh
2005-05-05 18:07 ` [patch 14/21] CKRM: undo removal of check in numtasks_put_ref_local gh
2005-05-05 18:07 ` [patch 15/21] CKRM: Rule Based Classification Engine, stub rcfs support gh
2005-05-05 18:07 ` [patch 16/21] CKRM: Rule Based Classification Engine, basic " gh
2005-05-05 18:07 ` [patch 17/21] CKRM: Rule Based Classification Engine, bitvector support for classification info gh
2005-05-05 18:07 ` [patch 18/21] CKRM: Rule Based Classification Engine, full CE gh
2005-05-05 18:07 ` [patch 19/21] CKRM: Rule Based Classification Engine, more advanced classification engine gh
2005-05-05 18:07 ` [patch 20/21] CKRM: Clean up typo in printk message gh
2005-05-05 18:07 ` gh [this message]
2005-05-08 12:49 ` [patch 21/21] CKRM: Fix for compiler warnings Domen Puncer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050505180936.211142000@us.ibm.com \
--to=gh@us.ibm.com \
--cc=ckrm-tech@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox