{"id":240,"url":"http://patchwork.ozlabs.org/api/1.1/patches/240/?format=json","web_url":"http://patchwork.ozlabs.org/project/cbe-oss-dev/patch/48C972F1.9030003@am.sony.com/","project":{"id":1,"url":"http://patchwork.ozlabs.org/api/1.1/projects/1/?format=json","name":"Cell Broadband Engine development","link_name":"cbe-oss-dev","list_id":"cbe-oss-dev.ozlabs.org","list_email":"cbe-oss-dev@ozlabs.org","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<48C972F1.9030003@am.sony.com>","date":"2008-09-11T19:35:13","name":"MARS: Fix build warnings","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"58936a72707951b6904434238de9f5ec1f58b7e2","submitter":{"id":127,"url":"http://patchwork.ozlabs.org/api/1.1/people/127/?format=json","name":"Yuji Mano","email":"yuji.mano@am.sony.com"},"delegate":{"id":26,"url":"http://patchwork.ozlabs.org/api/1.1/users/26/?format=json","username":"ymano","first_name":"Yuji","last_name":"Mano","email":"yuji.mano@am.sony.com"},"mbox":"http://patchwork.ozlabs.org/project/cbe-oss-dev/patch/48C972F1.9030003@am.sony.com/mbox/","series":[],"comments":"http://patchwork.ozlabs.org/api/patches/240/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/240/checks/","tags":{},"headers":{"Return-Path":"<cbe-oss-dev-bounces+patchwork=ozlabs.org@ozlabs.org>","X-Original-To":["patchwork@ozlabs.org","cbe-oss-dev@ozlabs.org"],"Delivered-To":["patchwork@ozlabs.org","cbe-oss-dev@ozlabs.org"],"Received":["from ozlabs.org (localhost [127.0.0.1])\n\tby ozlabs.org (Postfix) with ESMTP id 979B1DE721\n\tfor <patchwork@ozlabs.org>; Fri, 12 Sep 2008 06:38:09 +1000 (EST)","from WA4EHSOBE002.bigfish.com (outbound-wa4.frontbridge.com\n\t[216.32.181.16]) by ozlabs.org (Postfix) with ESMTP id B7C5DDE246\n\tfor <cbe-oss-dev@ozlabs.org>; Fri, 12 Sep 2008 06:37:15 +1000 (EST)","from mail1-wa4-R.bigfish.com (10.8.14.246) by\n\tWA4EHSOBE002.bigfish.com (10.8.40.22) with Microsoft SMTP Server id\n\t8.1.291.1; Thu, 11 Sep 2008 20:37:15 +0000","from mail1-wa4 (localhost.localdomain [127.0.0.1])\tby\n\tmail1-wa4-R.bigfish.com (Postfix) with ESMTP id F1672800100\tfor\n\t<cbe-oss-dev@ozlabs.org>; Thu, 11 Sep 2008 20:37:14 +0000 (UTC)","by mail1-wa4 (MessageSwitch) id 1221165433110496_14537; Thu, 11 Sep\n\t2008 20:37:13 +0000 (UCT)","from mail8.fw-sd.sony.com (mail8.fw-sd.sony.com [160.33.66.75])\tby\n\tmail1-wa4.bigfish.com (Postfix) with ESMTP id 0113F1568050\tfor\n\t<cbe-oss-dev@ozlabs.org>; Thu, 11 Sep 2008 20:37:12 +0000 (UTC)","from mail3.sjc.in.sel.sony.com (mail3.sjc.in.sel.sony.com\n\t[43.134.1.211])\tby mail8.fw-sd.sony.com (8.14.2/8.14.2) with ESMTP id\n\tm8BKbCQZ021199\tfor <cbe-oss-dev@ozlabs.org>;\n\tThu, 11 Sep 2008 20:37:12 GMT","from USSDIXIM02.am.sony.com (ussdixim02.am.sony.com\n\t[43.130.140.34])\n\tby mail3.sjc.in.sel.sony.com (8.12.11/8.12.11) with ESMTP id\n\tm8BKbBhV021786\n\tfor <cbe-oss-dev@ozlabs.org>; Thu, 11 Sep 2008 20:37:11 GMT","from ussdixms03.am.sony.com ([43.130.140.23]) by\n\tUSSDIXIM02.am.sony.com with Microsoft SMTPSVC(5.0.2195.6713);\n\tThu, 11 Sep 2008 13:37:11 -0700","from [43.135.148.175] ([43.135.148.175]) by ussdixms03.am.sony.com\n\twith Microsoft SMTPSVC(5.0.2195.6713);\n\tThu, 11 Sep 2008 13:37:11 -0700"],"X-BigFish":"VS4(zzzz10c0j10d3izz1497iz2dh6bh61h)","X-Spam-TCS-SCL":"0:0","X-FB-SS":"5,","Message-ID":"<48C972F1.9030003@am.sony.com>","Date":"Thu, 11 Sep 2008 12:35:13 -0700","From":"Yuji Mano <yuji.mano@am.sony.com>","User-Agent":"Thunderbird 2.0.0.5 (X11/20070719)","MIME-Version":"1.0","To":"CBE Development <cbe-oss-dev@ozlabs.org>","X-Enigmail-Version":"0.95.7","X-OriginalArrivalTime":"11 Sep 2008 20:37:11.0194 (UTC)\n\tFILETIME=[2AA08FA0:01C9144E]","X-SEL-encryption-scan":"scanned","Subject":"[Cbe-oss-dev] [PATCH 11/11]MARS: Fix build warnings","X-BeenThere":"cbe-oss-dev@ozlabs.org","X-Mailman-Version":"2.1.11","Precedence":"list","List-Id":"Discussion about Open Source Software for the Cell Broadband Engine\n\t<cbe-oss-dev.ozlabs.org>","List-Unsubscribe":"<https://ozlabs.org/mailman/options/cbe-oss-dev>,\n\t<mailto:cbe-oss-dev-request@ozlabs.org?subject=unsubscribe>","List-Archive":"<http://ozlabs.org/pipermail/cbe-oss-dev>","List-Post":"<mailto:cbe-oss-dev@ozlabs.org>","List-Help":"<mailto:cbe-oss-dev-request@ozlabs.org?subject=help>","List-Subscribe":"<https://ozlabs.org/mailman/listinfo/cbe-oss-dev>,\n\t<mailto:cbe-oss-dev-request@ozlabs.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"cbe-oss-dev-bounces+patchwork=ozlabs.org@ozlabs.org","Errors-To":"cbe-oss-dev-bounces+patchwork=ozlabs.org@ozlabs.org"},"content":"This patch fixes some build warnings.\n\nSigned-off-by: Yuji Mano <yuji.mano@am.sony.com>","diff":"--- a/src/host/lib/mars_task.c\n+++ b/src/host/lib/mars_task.c\n@@ -61,6 +61,7 @@ int mars_task_initialize(struct mars_con\n \n \tint ret;\n \tstruct mars_task_context *task;\n+\tstruct mars_workload_context *workload;\n \tElf32_Ehdr *ehdr = (Elf32_Ehdr *)elf_image;\n \tElf32_Phdr *phdr = (Elf32_Phdr *)((void *)ehdr + ehdr->e_phoff);\n \n@@ -78,10 +79,12 @@ int mars_task_initialize(struct mars_con\n \n \t/* begin process to add the task to the workload queue */\n \tret = workload_queue_add_begin(mars->workload_queue, &id->workload_id,\n-\t\t\t\tMARS_WORKLOAD_TYPE_TASK,\n-\t\t\t\t(struct mars_workload_context **)&task);\n+\t\t\t\tMARS_WORKLOAD_TYPE_TASK, &workload);\n \tMARS_CHECK_RET(ret == MARS_SUCCESS, ret);\n \n+\t/* cast workload context to task context */\n+\ttask = (struct mars_task_context *)workload;\n+\n \t/* initialize task specific id */\n \tmemcpy(&task->id, id, sizeof(struct mars_task_id));\n \n@@ -129,13 +132,17 @@ int mars_task_finalize(struct mars_task_\n \n \tint ret;\n \tstruct mars_task_context *task;\n+\tstruct mars_workload_context *workload;\n \tstruct mars_context *mars = (void *)(uintptr_t)id->mars_context_ea;\n \n \t/* begin process to remove the task from the workload queue */\n-\tret = workload_queue_remove_begin(mars->workload_queue, id->workload_id,\n-\t\t\t\t(struct mars_workload_context **)&task);\n+\tret = workload_queue_remove_begin(mars->workload_queue,\n+\t\t\t\tid->workload_id, &workload);\n \tMARS_CHECK_RET(ret == MARS_SUCCESS, ret);\n \n+\t/* cast workload context to task context */\n+\ttask = (struct mars_task_context *)workload;\n+\n \t/* free the allocated task context area if it has one */\n \tif (task->context_save_size)\n \t\tfree((void *)(uintptr_t)task->context_save_area);\n@@ -158,14 +165,17 @@ int mars_task_schedule(struct mars_task_\n \n \tint ret;\n \tstruct mars_task_context *task;\n+\tstruct mars_workload_context *workload;\n \tstruct mars_context *mars = (void *)(uintptr_t)id->mars_context_ea;\n \n \t/* begin process to schedule the workload in the workload queue */\n \tret = workload_queue_schedule_begin(mars->workload_queue,\n-\t\t\t\t\tid->workload_id, priority,\n-\t\t\t\t\t(struct mars_workload_context **)&task);\n+\t\t\t\tid->workload_id, priority, &workload);\n \tMARS_CHECK_RET(ret == MARS_SUCCESS, ret);\n \n+\t/* cast workload context to task context */\n+\ttask = (struct mars_task_context *)workload;\n+\n \t/* initialize task specific context variables */\n \ttask->stack = 0;\n \tif (args)\n@@ -189,13 +199,17 @@ int mars_task_wait(struct mars_task_id *\n \n \tint ret;\n \tstruct mars_task_context *task;\n+\tstruct mars_workload_context *workload;\n \tstruct mars_context *mars = (void *)(uintptr_t)id->mars_context_ea;\n \n \t/* blocking wait for workload completion */\n \tret = workload_queue_wait(mars->workload_queue, id->workload_id,\n-\t\t\t\t(struct mars_workload_context **)&task);\n+\t\t\t\t&workload);\n \tMARS_CHECK_RET(ret == MARS_SUCCESS, ret);\n \n+\t/* cast workload context to task context */\n+\ttask = (struct mars_task_context *)workload;\n+\n \t/* exit_code requested so return it to caller */\n \tif (exit_code)\n \t\t*exit_code = task->exit_code;\n@@ -211,13 +225,17 @@ int mars_task_try_wait(struct mars_task_\n \n \tint ret;\n \tstruct mars_task_context *task;\n+\tstruct mars_workload_context *workload;\n \tstruct mars_context *mars = (void *)(uintptr_t)id->mars_context_ea;\n \n \t/* non-blocking wait for workload completion */\n \tret = workload_queue_try_wait(mars->workload_queue, id->workload_id,\n-\t\t\t\t(struct mars_workload_context **)&task);\n+\t\t\t\t&workload);\n \tMARS_CHECK_RET(ret == MARS_SUCCESS, ret);\n \n+\t/* cast workload context to task context */\n+\ttask = (struct mars_task_context *)workload;\n+\n \t/* exit_code requested so return it to caller */\n \tif (exit_code)\n \t\t*exit_code = task->exit_code;\n--- a/src/host/lib/mars_workload_queue.c\n+++ b/src/host/lib/mars_workload_queue.c\n@@ -41,6 +41,7 @@\n \n #include \"mars/mars_workload_queue.h\"\n #include \"mars/mars_kernel_types.h\"\n+#include \"mars/mars_mutex.h\"\n #include \"mars/mars_error.h\"\n #include \"mars/mars_debug.h\"\n \n--- a/src/mpu/kernel/mars_kernel_task.c\n+++ b/src/mpu/kernel/mars_kernel_task.c\n@@ -64,6 +64,8 @@ void task_exec(struct mars_task_context \n \n void task_exit(struct mars_task_context *task)\n {\n+\t(void)task;\n+\n \tMARS_ASSERT(task);\n }\n \n","prefixes":[]}