Update from omapzoom 18-Aug-2008
[bridge-dev.git] / 0015-BRIDGE-cleanup-static-declarations-warnings.patch
blob80048dad0524a1d3e1d3b5f8e9233da0183e81e0
1 Index: lk/drivers/dsp/bridge/rmgr/drv.c
2 ===================================================================
3 --- lk.orig/drivers/dsp/bridge/rmgr/drv.c 2008-08-18 10:38:37.000000000 +0300
4 +++ lk/drivers/dsp/bridge/rmgr/drv.c 2008-08-18 10:38:39.000000000 +0300
5 @@ -123,6 +123,7 @@
6 #include <strm.h>
7 #include <nodepriv.h>
8 #include <wmdchnl.h>
9 +#include <resourcecleanup.h>
10 #endif
12 /* ----------------------------------- Defines, Data Structures, Typedefs */
13 @@ -158,11 +159,12 @@
14 static DSP_STATUS RequestBridgeResourcesDSP(u32 dwContext, s32 fRequest);
16 #ifndef RES_CLEANUP_DISABLE
19 /* GPP PROCESS CLEANUP CODE */
20 -static DSP_STATUS PrintProcessInformation(void);
22 +static DSP_STATUS PrintProcessInformation(void);
23 +static DSP_STATUS DRV_ProcFreeNodeRes(HANDLE hPCtxt);
24 +static DSP_STATUS DRV_ProcFreeDMMRes(HANDLE hPCtxt);
25 +static DSP_STATUS DRV_ProcFreeSTRMRes(HANDLE hPCtxt);
26 extern enum NODE_STATE NODE_GetState(HANDLE hNode);
28 /* Get the process context list from driver object */
29 @@ -533,8 +535,6 @@
30 return status;
35 /* Update DMM resource status */
36 DSP_STATUS DRV_UpdateDMMResElement(HANDLE hDMMRes, u32 pMpuAddr, u32 ulSize,
37 u32 pReqAddr, u32 pMapAddr,
38 @@ -555,7 +555,7 @@
41 /* Actual DMM De-Allocation */
42 -DSP_STATUS DRV_ProcFreeDMMRes(HANDLE hPCtxt)
43 +static DSP_STATUS DRV_ProcFreeDMMRes(HANDLE hPCtxt)
45 struct PROCESS_CONTEXT *pCtxt = (struct PROCESS_CONTEXT *)hPCtxt;
46 DSP_STATUS status = DSP_SOK;
47 @@ -761,7 +761,7 @@
50 /* Actual Stream De-Allocation */
51 -DSP_STATUS DRV_ProcFreeSTRMRes(HANDLE hPCtxt)
52 +static DSP_STATUS DRV_ProcFreeSTRMRes(HANDLE hPCtxt)
54 struct PROCESS_CONTEXT *pCtxt = (struct PROCESS_CONTEXT *)hPCtxt;
55 DSP_STATUS status = DSP_SOK;
56 @@ -861,6 +861,7 @@
57 (*STRMRes)->uNumBufs = uNumBufs;
58 return status;
61 /* Displaying the resources allocated by a process */
62 DSP_STATUS DRV_ProcDisplayResInfo(u8 *pBuf1, u32 *pSize)
64 @@ -877,7 +878,7 @@
65 DSP_STATUS status = DSP_SOK;
67 CFG_GetObject((u32 *)&hDrvObject, REG_DRV_OBJECT);
68 - DRV_GetProcCtxtList(&pCtxt, hDrvObject);
69 + DRV_GetProcCtxtList(&pCtxt, (struct DRV_OBJECT *)hDrvObject);
70 GT_0trace(curTrace, GT_ENTER, "*********************"
71 "DRV_ProcDisplayResourceInfo:*\n");
72 while (pCtxt != NULL) {
73 @@ -1538,7 +1539,7 @@
74 GT_0trace(curTrace, GT_7CLASS,
75 "Failed to reserve bridge resources ");
77 - DBC_Ensure((DSP_SUCCEEDED(status) && pDevNodeString != 0 &&
78 + DBC_Ensure((DSP_SUCCEEDED(status) && pDevNodeString != NULL &&
79 !LST_IsEmpty(pDRVObject->devNodeString)) ||
80 (DSP_FAILED(status) && *pDevNodeString == 0));
82 Index: lk/drivers/dsp/bridge/rmgr/drv_interface.c
83 ===================================================================
84 --- lk.orig/drivers/dsp/bridge/rmgr/drv_interface.c 2008-08-18 10:38:37.000000000 +0300
85 +++ lk/drivers/dsp/bridge/rmgr/drv_interface.c 2008-08-18 10:38:39.000000000 +0300
86 @@ -132,10 +132,11 @@
87 static s32 shm_size = 0x400000; /* 4 MB */
88 static u32 phys_mempool_base = 0x87000000;
89 static u32 phys_mempool_size = 0x600000;
91 #if !defined(CONFIG_ARCH_OMAP2430) && !defined(CONFIG_ARCH_OMAP3430)
92 static int tc_wordswapon = 1; /* Default value is always TRUE */
93 #else
94 -static int tc_wordswapon = 0; /* Default value is always TRUE */
95 +static int tc_wordswapon = 0; /* Default value is always true */
96 #endif
99 @@ -544,7 +545,7 @@
100 /* This function is called when an application opens handle to the
101 * bridge driver. */
103 -int bridge_open(struct inode *ip, struct file *filp)
104 +static int bridge_open(struct inode *ip, struct file *filp)
106 int status = 0;
107 #ifndef RES_CLEANUP_DISABLE
108 @@ -564,7 +565,7 @@
109 if (DSP_FAILED(dsp_status))
110 goto func_cont;
112 - DRV_GetProcCtxtList(&pCtxtclosed, hDrvObject);
113 + DRV_GetProcCtxtList(&pCtxtclosed, (struct DRV_OBJECT *)hDrvObject);
114 while (pCtxtclosed != NULL) {
115 tsk = find_task_by_vpid(pCtxtclosed->pid);
117 @@ -576,7 +577,7 @@
118 DRV_RemoveAllResources(pCtxtclosed);
119 if (pCtxtclosed->hProcessor != NULL) {
120 DRV_GetProcCtxtList(&pCtxttraverse,
121 - hDrvObject);
122 + (struct DRV_OBJECT *)hDrvObject);
123 if (pCtxttraverse->next == NULL) {
124 PROC_Detach(pCtxtclosed->hProcessor);
125 } else {
126 @@ -605,7 +606,7 @@
129 pTmp = pCtxtclosed->next;
130 - DRV_RemoveProcContext(hDrvObject, pCtxtclosed,
131 + DRV_RemoveProcContext((struct DRV_OBJECT *)hDrvObject, pCtxtclosed,
132 (void *)pCtxtclosed->pid);
133 } else {
134 pTmp = pCtxtclosed->next;
135 @@ -615,7 +616,7 @@
136 func_cont:
137 dsp_status = CFG_GetObject((u32 *)&hDrvObject, REG_DRV_OBJECT);
138 if (DSP_SUCCEEDED(dsp_status))
139 - dsp_status = DRV_InsertProcContext(hDrvObject, &pPctxt);
140 + dsp_status = DRV_InsertProcContext((struct DRV_OBJECT *)hDrvObject, &pPctxt);
142 if (pPctxt != NULL) {
143 PRCS_GetCurrentHandle(&hProcess);
144 @@ -630,7 +631,7 @@
146 /* This function is called when an application closes handle to the bridge
147 * driver. */
148 -int bridge_release(struct inode *ip, struct file *filp)
149 +static int bridge_release(struct inode *ip, struct file *filp)
151 int status;
152 HANDLE pid;
153 @@ -657,14 +658,14 @@
156 /* This function provides IO interface to the bridge driver. */
157 -int bridge_ioctl(struct inode *ip, struct file *filp, unsigned int code,
158 +static int bridge_ioctl(struct inode *ip, struct file *filp, unsigned int code,
159 unsigned long args)
161 int status;
162 u32 retval = DSP_SOK;
163 union Trapped_Args pBufIn;
165 - DBC_Require(filp != 0);
166 + DBC_Require(filp != NULL);
167 #ifndef CONFIG_DISABLE_BRIDGE_PM
168 status = omap34xxbridge_suspend_lockout(&bridge_suspend_data, filp);
169 if (status != 0)
170 @@ -699,7 +700,7 @@
173 /* This function maps kernel space memory to user space memory. */
174 -int bridge_mmap(struct file *filp, struct vm_area_struct *vma)
175 +static int bridge_mmap(struct file *filp, struct vm_area_struct *vma)
177 #if GT_TRACE
178 u32 offset = vma->vm_pgoff << PAGE_SHIFT;
179 Index: lk/drivers/dsp/bridge/rmgr/dspdrv.c
180 ===================================================================
181 --- lk.orig/drivers/dsp/bridge/rmgr/dspdrv.c 2008-08-18 10:38:37.000000000 +0300
182 +++ lk/drivers/dsp/bridge/rmgr/dspdrv.c 2008-08-18 10:38:39.000000000 +0300
183 @@ -195,7 +195,7 @@
185 /* Remove the Driver Object */
186 (void)DRV_Destroy(drvObject);
187 - drvObject = 0;
188 + drvObject = NULL;
189 WCD_Exit();
190 GT_0trace(curTrace, GT_7CLASS,
191 "DSP_Init:Logical device Failed to Load\n");
192 Index: lk/drivers/dsp/bridge/rmgr/nldr.c
193 ===================================================================
194 --- lk.orig/drivers/dsp/bridge/rmgr/nldr.c 2008-08-18 10:38:37.000000000 +0300
195 +++ lk/drivers/dsp/bridge/rmgr/nldr.c 2008-08-18 10:38:39.000000000 +0300
196 @@ -746,7 +746,7 @@
198 if (cRefs == 0) {
199 RMM_exit();
200 - NLDR_debugMask.flags = 0;
201 + NLDR_debugMask.flags = NULL;
204 DBC_Ensure(cRefs >= 0);
205 @@ -1403,8 +1403,8 @@
206 if (nLibs > 0) {
207 depLibUUIDs = MEM_Calloc(sizeof(struct DSP_UUID) *
208 nLibs, MEM_PAGED);
209 - persistentDepLibs = MEM_Calloc(sizeof(bool) *
210 - nLibs, MEM_PAGED);
211 + persistentDepLibs =
212 + MEM_Calloc(sizeof(bool) * nLibs, MEM_PAGED);
213 if (!depLibUUIDs || !persistentDepLibs)
214 status = DSP_EMEMORY;
216 Index: lk/drivers/dsp/bridge/rmgr/node.c
217 ===================================================================
218 --- lk.orig/drivers/dsp/bridge/rmgr/node.c 2008-08-18 10:38:37.000000000 +0300
219 +++ lk/drivers/dsp/bridge/rmgr/node.c 2008-08-18 10:38:39.000000000 +0300
220 @@ -324,7 +324,7 @@
223 /* Default buffer attributes */
224 -struct DSP_BUFFERATTR NODE_DFLTBUFATTRS = {
225 +static struct DSP_BUFFERATTR NODE_DFLTBUFATTRS = {
226 0, /* cbStruct */
227 1, /* uSegment */
228 0, /* uAlignment */
229 @@ -776,10 +776,10 @@
230 res_status = CFG_GetObject((u32 *)&hDrvObject,
231 REG_DRV_OBJECT);
232 if (DSP_SUCCEEDED(res_status)) {
233 - DRV_GetProcContext(hProcess, hDrvObject, &pPctxt,
234 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDrvObject, &pPctxt,
235 *phNode, 0);
236 if (pPctxt == NULL) {
237 - DRV_InsertProcContext(hDrvObject, &pPctxt);
238 + DRV_InsertProcContext((struct DRV_OBJECT *)hDrvObject, &pPctxt);
239 if (pPctxt != NULL) {
240 DRV_ProcUpdatestate(pPctxt,
241 PROC_RES_ALLOCATED);
242 @@ -795,7 +795,7 @@
243 res_status = CFG_GetObject((u32 *)&hDrvObject,
244 REG_DRV_OBJECT);
245 if (DSP_SUCCEEDED(res_status)) {
246 - DRV_GetProcContext(hProcess, hDrvObject, &pPctxt,
247 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDrvObject, &pPctxt,
248 *phNode, 0);
249 if (pPctxt != NULL) {
250 DRV_InsertNodeResElement(*phNode, &nodeRes,
251 @@ -1775,7 +1775,7 @@
252 if (DSP_FAILED(res_status))
253 goto func_cont;
255 - DRV_GetProcContext(hProcess, hDrvObject, &pCtxt, hNode, 0);
256 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDrvObject, &pCtxt, hNode, 0);
257 if (pCtxt == NULL)
258 goto func_cont;
260 Index: lk/drivers/dsp/bridge/rmgr/proc.c
261 ===================================================================
262 --- lk.orig/drivers/dsp/bridge/rmgr/proc.c 2008-08-18 10:38:37.000000000 +0300
263 +++ lk/drivers/dsp/bridge/rmgr/proc.c 2008-08-18 10:38:39.000000000 +0300
264 @@ -365,9 +365,9 @@
265 if (DSP_FAILED(res_status))
266 goto func_cont;
268 - DRV_GetProcContext(hProcess, hDRVObject, &pPctxt, NULL, 0);
269 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDRVObject, &pPctxt, NULL, 0);
270 if (pPctxt == NULL) {
271 - DRV_InsertProcContext(hDRVObject, &pPctxt);
272 + DRV_InsertProcContext((struct DRV_OBJECT *)hDRVObject, &pPctxt);
273 if (pPctxt != NULL) {
274 DRV_ProcUpdatestate(pPctxt, PROC_RES_ALLOCATED);
275 DRV_ProcSetPID(pPctxt, (s32)hProcess);
276 @@ -377,7 +377,7 @@
277 PRCS_GetCurrentHandle(&hProcess);
278 res_status = CFG_GetObject((u32 *)&hDRVObject, REG_DRV_OBJECT);
279 if (DSP_SUCCEEDED(res_status)) {
280 - DRV_GetProcContext(hProcess, hDRVObject, &pPctxt, NULL, 0);
281 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDRVObject, &pPctxt, NULL, 0);
282 if (pPctxt != NULL)
283 pPctxt->hProcessor = (DSP_HPROCESSOR)*phProcessor;
285 @@ -634,7 +634,7 @@
286 res_status = CFG_GetObject((u32 *)&hDRVObject, REG_DRV_OBJECT);
287 /* res_status = CFG_GetObject(REG_DRV_OBJECT, (u32*)&hDRVObject); */
288 if (DSP_SUCCEEDED(res_status)) {
289 - DRV_GetProcContext(hProcess, hDRVObject, &pPctxt, NULL, 0);
290 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDRVObject, &pPctxt, NULL, 0);
291 if (pPctxt != NULL)
292 pPctxt->hProcessor = NULL;
294 @@ -854,7 +854,7 @@
295 *phDevObject = pProcObject->hDevObject;
296 status = DSP_SOK;
297 } else {
298 - *phDevObject = 0;
299 + *phDevObject = NULL;
302 DBC_Ensure((DSP_SUCCEEDED(status) && *phDevObject > 0) ||
303 @@ -1383,11 +1383,11 @@
304 res_status = CFG_GetObject((u32 *)&hDrvObject,
305 REG_DRV_OBJECT);
306 if (DSP_SUCCEEDED(res_status)) {
307 - if (DRV_GetProcContext(hProcess, hDrvObject, &pCtxt,
308 - NULL, (u32) pMpuAddr) != DSP_ENOTFOUND) {
309 + if (DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDrvObject, &pCtxt,
310 + NULL, (u32)pMpuAddr) != DSP_ENOTFOUND) {
311 DRV_InsertDMMResElement(&dmmRes, pCtxt);
312 - DRV_UpdateDMMResElement(dmmRes, (u32) pMpuAddr,
313 - ulSize, (u32) pReqAddr,
314 + DRV_UpdateDMMResElement(dmmRes, (u32)pMpuAddr,
315 + ulSize, (u32)pReqAddr,
316 (u32)*ppMapAddr, hProcessor);
319 @@ -1737,7 +1737,7 @@
320 if (DSP_FAILED(res_status))
321 goto func_end;
323 - DRV_GetProcContext(hProcess, hDrvObject, &pCtxt, NULL, (u32)pMapAddr);
324 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDrvObject, &pCtxt, NULL, (u32)pMapAddr);
325 if (pCtxt != NULL) {
326 if (DRV_GetDMMResElement((u32)pMapAddr, &dmmRes, pCtxt) !=
327 DSP_ENOTFOUND)
328 Index: lk/drivers/dsp/bridge/rmgr/pwr.c
329 ===================================================================
330 --- lk.orig/drivers/dsp/bridge/rmgr/pwr.c 2008-08-18 10:38:37.000000000 +0300
331 +++ lk/drivers/dsp/bridge/rmgr/pwr.c 2008-08-18 10:38:39.000000000 +0300
332 @@ -61,7 +61,7 @@
333 u32 arg = timeout;
335 for (hDevObject = (struct DEV_OBJECT *)DRV_GetFirstDevObject();
336 - hDevObject != 0;
337 + hDevObject != NULL;
338 hDevObject =
339 (struct DEV_OBJECT *)DRV_GetNextDevObject
340 ((u32)hDevObject)) {
341 @@ -101,7 +101,7 @@
342 u32 arg = timeout;
344 for (hDevObject = (struct DEV_OBJECT *)DRV_GetFirstDevObject();
345 - hDevObject != 0;
346 + hDevObject != NULL;
347 hDevObject = (struct DEV_OBJECT *)DRV_GetNextDevObject
348 ((u32)hDevObject)) {
349 if (DSP_SUCCEEDED(DEV_GetWMDContext(hDevObject,
350 @@ -132,7 +132,7 @@
351 arg[1] = level;
353 for (hDevObject = (struct DEV_OBJECT *)DRV_GetFirstDevObject();
354 - hDevObject != 0;
355 + hDevObject != NULL;
356 hDevObject = (struct DEV_OBJECT *)DRV_GetNextDevObject
357 ((u32)hDevObject)) {
358 if (DSP_SUCCEEDED(DEV_GetWMDContext(hDevObject,
359 @@ -164,7 +164,7 @@
360 arg[1] = level;
362 for (hDevObject = (struct DEV_OBJECT *)DRV_GetFirstDevObject();
363 - hDevObject != 0;
364 + hDevObject != NULL;
365 hDevObject = (struct DEV_OBJECT *)DRV_GetNextDevObject
366 ((u32)hDevObject)) {
367 if (DSP_SUCCEEDED(DEV_GetWMDContext(hDevObject,
368 Index: lk/drivers/dsp/bridge/rmgr/strm.c
369 ===================================================================
370 --- lk.orig/drivers/dsp/bridge/rmgr/strm.c 2008-08-18 10:38:37.000000000 +0300
371 +++ lk/drivers/dsp/bridge/rmgr/strm.c 2008-08-18 10:38:39.000000000 +0300
372 @@ -209,7 +209,7 @@
373 if (DSP_FAILED(res_status))
374 goto func_end;
376 - DRV_GetProcContext(hProcess, hDrvObject, &pCtxt, NULL, 0);
377 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDrvObject, &pCtxt, NULL, 0);
378 if (pCtxt != NULL) {
379 if (DRV_GetSTRMResElement(hStrm, &hSTRMRes, pCtxt) !=
380 DSP_ENOTFOUND) {
381 @@ -280,7 +280,7 @@
382 if (DSP_FAILED(res_status))
383 goto func_end;
385 - DRV_GetProcContext(hProcess, hDrvObject, &pCtxt, NULL, 0);
386 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDrvObject, &pCtxt, NULL, 0);
387 if (pCtxt != NULL) {
388 if (DRV_GetSTRMResElement(hStrm, &hSTRMRes, pCtxt) !=
389 DSP_ENOTFOUND) {
390 @@ -428,7 +428,7 @@
391 PRCS_GetCurrentHandle(&hProcess);
392 res_status = CFG_GetObject((u32 *)&hDrvObject, REG_DRV_OBJECT);
393 if (DSP_SUCCEEDED(res_status)) {
394 - DRV_GetProcContext(hProcess, hDrvObject, &pCtxt, NULL, 0);
395 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDrvObject, &pCtxt, NULL, 0);
396 if (pCtxt != NULL) {
397 if (DRV_GetSTRMResElement(hStrm, hSTRMRes, pCtxt) !=
398 DSP_ENOTFOUND) {
399 @@ -773,7 +773,7 @@
400 PRCS_GetCurrentHandle(&hProcess);
401 res_status = CFG_GetObject((u32 *)&hDrvObject, REG_DRV_OBJECT);
402 if (DSP_SUCCEEDED(res_status)) {
403 - DRV_GetProcContext(hProcess, hDrvObject, &pCtxt, hNode, 0);
404 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDrvObject, &pCtxt, hNode, 0);
405 if (pCtxt != NULL)
406 DRV_ProcInsertSTRMResElement(*phStrm, &hSTRMRes, pCtxt);
408 Index: lk/drivers/dsp/bridge/pmgr/cmm.c
409 ===================================================================
410 --- lk.orig/drivers/dsp/bridge/pmgr/cmm.c 2008-08-18 10:38:37.000000000 +0300
411 +++ lk/drivers/dsp/bridge/pmgr/cmm.c 2008-08-18 10:38:39.000000000 +0300
412 @@ -190,7 +190,7 @@
415 /* Address translator default attrs */
416 -struct CMM_XLATORATTRS CMM_DFLTXLATORATTRS = {
417 +static struct CMM_XLATORATTRS CMM_DFLTXLATORATTRS = {
418 1, /* ulSegId, does not have to match CMM_DFLTALCTATTRS ulSegId */
419 0, /* dwDSPBufs */
420 0, /* dwDSPBufSize */
421 Index: lk/drivers/dsp/bridge/pmgr/cod.c
422 ===================================================================
423 --- lk.orig/drivers/dsp/bridge/pmgr/cod.c 2008-08-18 10:38:37.000000000 +0300
424 +++ lk/drivers/dsp/bridge/pmgr/cod.c 2008-08-18 10:38:39.000000000 +0300
425 @@ -209,11 +209,11 @@
426 zlAttrs.baseImage = true;
427 zlAttrs.logWrite = NULL;
428 zlAttrs.logWriteHandle = NULL;
429 - zlAttrs.write = 0;
430 - zlAttrs.rmmHandle = 0;
431 - zlAttrs.wHandle = 0;
432 - zlAttrs.symHandle = 0;
433 - zlAttrs.symArg = 0;
434 + zlAttrs.write = NULL;
435 + zlAttrs.rmmHandle = NULL;
436 + zlAttrs.wHandle = NULL;
437 + zlAttrs.symHandle = NULL;
438 + zlAttrs.symArg = NULL;
440 hMgrNew->attrs = zlAttrs;
442 Index: lk/drivers/dsp/bridge/pmgr/dbll.c
443 ===================================================================
444 --- lk.orig/drivers/dsp/bridge/pmgr/dbll.c 2008-08-18 10:38:37.000000000 +0300
445 +++ lk/drivers/dsp/bridge/pmgr/dbll.c 2008-08-18 10:38:39.000000000 +0300
446 @@ -342,7 +342,7 @@
447 CSL_Exit();
448 GH_exit();
449 #if GT_TRACE
450 - DBLL_debugMask.flags = 0;
451 + DBLL_debugMask.flags = NULL;
452 #endif
455 Index: lk/drivers/dsp/bridge/pmgr/dmm.c
456 ===================================================================
457 --- lk.orig/drivers/dsp/bridge/pmgr/dmm.c 2008-08-18 10:38:37.000000000 +0300
458 +++ lk/drivers/dsp/bridge/pmgr/dmm.c 2008-08-18 10:38:39.000000000 +0300
459 @@ -328,7 +328,7 @@
460 status = DEV_GetDmmMgr(hDevObject, phDmmMgr);
462 GT_2trace(DMM_debugMask, GT_4CLASS, "Leaving DMM_GetHandle status %x, "
463 - "*phDmmMgr %x\n", status, phDmmMgr ? *phDmmMgr : 0);
464 + "*phDmmMgr %x\n", status, phDmmMgr ? *phDmmMgr : NULL);
465 return status;
468 @@ -542,7 +542,7 @@
469 * Purpose:
470 * Returns a region containing the specified memory region
472 -struct MapPage *GetRegion(u32 aAddr)
473 +static struct MapPage *GetRegion(u32 aAddr)
475 struct MapPage *currRegion = NULL;
476 u32 i = 0;
477 @@ -567,7 +567,7 @@
478 * Purpose:
479 * Returns the requested free region
481 -struct MapPage *GetFreeRegion(u32 aSize)
482 +static struct MapPage *GetFreeRegion(u32 aSize)
484 struct MapPage *currRegion = NULL;
485 u32 i = 0;
486 @@ -615,7 +615,7 @@
487 * Purpose:
488 * Returns the requestedmapped region
490 -struct MapPage *GetMappedRegion(u32 aAddr)
491 +static struct MapPage *GetMappedRegion(u32 aAddr)
493 u32 i = 0;
494 struct MapPage *currRegion = NULL;
495 Index: lk/drivers/dsp/bridge/pmgr/io.c
496 ===================================================================
497 --- lk.orig/drivers/dsp/bridge/pmgr/io.c 2008-08-18 10:38:37.000000000 +0300
498 +++ lk/drivers/dsp/bridge/pmgr/io.c 2008-08-18 10:38:39.000000000 +0300
499 @@ -59,6 +59,7 @@
500 /* ----------------------------------- This */
501 #include <ioobj.h>
502 #include <iodefs.h>
503 +#include <io.h>
505 /* ----------------------------------- Globals */
506 static u32 cRefs;
507 Index: lk/drivers/dsp/bridge/pmgr/wcd.c
508 ===================================================================
509 --- lk.orig/drivers/dsp/bridge/pmgr/wcd.c 2008-08-18 10:38:37.000000000 +0300
510 +++ lk/drivers/dsp/bridge/pmgr/wcd.c 2008-08-18 10:38:39.000000000 +0300
511 @@ -174,8 +174,8 @@
514 /* ----------------------------------- Globals */
515 -struct GT_Mask WCD_debugMask = { NULL, NULL }; /* Core VxD Mask */
516 -u32 WCD_cRefs;
517 +static struct GT_Mask WCD_debugMask = { NULL, NULL }; /* Core VxD Mask */
518 +static u32 WCD_cRefs;
521 * Function table.
522 @@ -183,7 +183,7 @@
523 * numbers defined in wcdioctl.h This is how an IOCTL number in user mode
524 * turns into a function call in kernel mode.
526 -struct WCD_Cmd WCD_cmdTable[] = {
527 +static struct WCD_Cmd WCD_cmdTable[] = {
528 /* MGR module */
529 {MGRWRAP_EnumNode_Info, CMD_MGR_ENUMNODE_INFO_OFFSET},
530 {MGRWRAP_EnumProc_Info, CMD_MGR_ENUMPROC_INFO_OFFSET},
531 Index: lk/arch/arm/plat-omap/include/bridge/resourcecleanup.h
532 ===================================================================
533 --- lk.orig/arch/arm/plat-omap/include/bridge/resourcecleanup.h 2008-08-18 10:38:34.000000000 +0300
534 +++ lk/arch/arm/plat-omap/include/bridge/resourcecleanup.h 2008-08-18 10:38:39.000000000 +0300
535 @@ -20,11 +20,10 @@
536 #include <drv.h>
539 -extern DSP_STATUS DRV_DisplayProcContext(HANDLE hDrvObject);
540 +extern DSP_STATUS DRV_GetProcCtxtList(struct PROCESS_CONTEXT **pPctxt,
541 + struct DRV_OBJECT *hDrvObject);
543 -extern DSP_STATUS DRV_GetProcCtxtList(HANDLE pPctxt, HANDLE hDrvObject);
545 -extern DSP_STATUS DRV_InsertProcContext(HANDLE hDrvObject, HANDLE pPctxt);
546 +extern DSP_STATUS DRV_InsertProcContext(struct DRV_OBJECT *hDrVObject, HANDLE hPCtxt);
548 extern DSP_STATUS DRV_RemoveAllDMMResElements(HANDLE pCtxt);
550 @@ -35,14 +34,15 @@
552 extern DSP_STATUS DRV_ProcSetPID(HANDLE pCtxt, s32 hProcess);
554 -extern DSP_STATUS DRV_GetProcContext(HANDLE phProcess, HANDLE hDrvObject,
555 - HANDLE pCtxt, DSP_HNODE hNode,
556 - u32 pMapAddr);
557 +extern DSP_STATUS DRV_GetProcContext(u32 phProcess,
558 + struct DRV_OBJECT *hDrvObject,
559 + HANDLE hPCtxt, DSP_HNODE hNode,
560 + u32 pMapAddr);
562 extern DSP_STATUS DRV_RemoveAllResources(HANDLE pPctxt);
564 -extern DSP_STATUS DRV_RemoveProcContext(HANDLE hDRVObject, HANDLE hPCtxt,
565 - HANDLE hProcess);
566 +extern DSP_STATUS DRV_RemoveProcContext(struct DRV_OBJECT *hDRVObject,
567 + HANDLE hPCtxt, HANDLE hProcess);
569 extern DSP_STATUS DRV_GetNodeResElement(HANDLE hNode, HANDLE nodeRes,
570 HANDLE pCtxt);
571 @@ -50,13 +50,11 @@
572 extern DSP_STATUS DRV_InsertNodeResElement(HANDLE hNode, HANDLE nodeRes,
573 HANDLE pCtxt);
575 -extern DSP_STATUS DRV_ProcNodeUpdateHeapStatus(HANDLE nodeRes, int status);
577 -extern DSP_STATUS DRV_ProcNodeUpdateStreamStatus(HANDLE nodeRes, int status);
578 +extern void DRV_ProcNodeUpdateHeapStatus(HANDLE hNodeRes, s32 status);
580 extern DSP_STATUS DRV_RemoveNodeResElement(HANDLE nodeRes, HANDLE status);
582 -extern DSP_STATUS DRV_ProcNodeUpdateStatus(HANDLE nodeRes, int status);
583 +extern void DRV_ProcNodeUpdateStatus(HANDLE hNodeRes, s32 status);
585 extern DSP_STATUS DRV_UpdateDMMResElement(HANDLE dmmRes, u32 pMpuAddr,
586 u32 ulSize, u32 pReqAddr,
587 Index: lk/drivers/dsp/bridge/services/mem.c
588 ===================================================================
589 --- lk.orig/drivers/dsp/bridge/services/mem.c 2008-08-18 10:38:37.000000000 +0300
590 +++ lk/drivers/dsp/bridge/services/mem.c 2008-08-18 10:38:39.000000000 +0300
591 @@ -199,7 +199,7 @@
595 -void MEM_ExtPhysPoolRelease(void)
596 +static void MEM_ExtPhysPoolRelease(void)
598 GT_0trace(MEM_debugMask, GT_1CLASS,
599 "Releasing External memory pool \n");
600 @@ -215,7 +215,7 @@
601 * Allocate physically contiguous, uncached memory from external memory pool
604 -void *MEM_ExtPhysMemAlloc(u32 bytes, u32 align, OUT u32 *pPhysAddr)
605 +static void *MEM_ExtPhysMemAlloc(u32 bytes, u32 align, OUT u32 *pPhysAddr)
607 u32 newAllocPtr;
608 u32 offset;
609 @@ -236,7 +236,7 @@
610 "ExtPhysical Memory Allocation "
611 "unable to allocate memory for bytes = 0x%x \n",
612 bytes);
613 - pPhysAddr = 0;
614 + pPhysAddr = NULL;
615 return NULL;
616 } else {
617 offset = (extMemPool.nextPhysAllocPtr & (align - 1));
618 Index: lk/drivers/dsp/bridge/wmd/io_sm.c
619 ===================================================================
620 --- lk.orig/drivers/dsp/bridge/wmd/io_sm.c 2008-08-18 10:38:38.000000000 +0300
621 +++ lk/drivers/dsp/bridge/wmd/io_sm.c 2008-08-18 10:38:39.000000000 +0300
622 @@ -719,7 +719,7 @@
623 mapAttrs |= DSP_MAPELEMSIZE32;
624 /* Map the L4 peripherals */
626 - int i = 0;
627 + i = 0;
628 while (L4PeripheralTable[i].physAddr && DSP_SUCCEEDED(status)) {
629 status = hIOMgr->pIntfFxns->pfnBrdMemMap
630 (hIOMgr->hWmdContext,
631 Index: lk/drivers/dsp/bridge/wmd/mmu_fault.c
632 ===================================================================
633 --- lk.orig/drivers/dsp/bridge/wmd/mmu_fault.c 2008-08-18 10:38:38.000000000 +0300
634 +++ lk/drivers/dsp/bridge/wmd/mmu_fault.c 2008-08-18 10:38:39.000000000 +0300
635 @@ -59,7 +59,7 @@
636 #include "_tiomap.h"
637 #include "mmu_fault.h"
639 -u32 dmmuEventMask;
640 +static u32 dmmuEventMask;
641 u32 faultAddr;
643 static bool MMU_CheckIfFault(struct WMD_DEV_CONTEXT *pDevContext);
644 Index: lk/drivers/dsp/bridge/wmd/msg_sm.c
645 ===================================================================
646 --- lk.orig/drivers/dsp/bridge/wmd/msg_sm.c 2008-08-18 10:38:38.000000000 +0300
647 +++ lk/drivers/dsp/bridge/wmd/msg_sm.c 2008-08-18 10:38:39.000000000 +0300
648 @@ -63,6 +63,7 @@
650 /* ----------------------------------- This */
651 #include <_msg_sm.h>
652 +#include <wmdmsg.h>
654 /* ----------------------------------- Defines, Data Structures, Typedefs */
655 #define MSGQ_SIGNATURE 0x5147534d /* "QGSM" */
656 Index: lk/drivers/dsp/bridge/wmd/tiomap_io.c
657 ===================================================================
658 --- lk.orig/drivers/dsp/bridge/wmd/tiomap_io.c 2008-08-18 10:38:38.000000000 +0300
659 +++ lk/drivers/dsp/bridge/wmd/tiomap_io.c 2008-08-18 10:38:39.000000000 +0300
660 @@ -56,9 +56,9 @@
662 static u32 ulShm0End;
663 static u32 ulDynExtBase;
664 -u32 ulTraceSecBeg;
665 -u32 ulTraceSecEnd;
666 -u32 ulShmBaseVirt;
667 +static u32 ulTraceSecBeg;
668 +static u32 ulTraceSecEnd;
669 +static u32 ulShmBaseVirt;
671 bool bSymbolsReloaded = true;
673 @@ -73,11 +73,8 @@
674 DSP_STATUS status = DSP_SOK;
675 struct WMD_DEV_CONTEXT *pDevContext = hDevContext;
676 u32 offset;
677 - static u32 ulShmBaseVirt;
678 u32 ulTLBBaseVirt = 0;
679 u32 ulShmOffsetVirt = 0;
680 - static u32 ulTraceSecBeg;
681 - static u32 ulTraceSecEnd;
682 u32 dwExtProgVirtMem;
683 u32 dwBaseAddr = pDevContext->dwDspExtBaseAddr;
684 bool bTraceRead = false;
685 Index: lk/drivers/dsp/bridge/wmd/ue_deh.c
686 ===================================================================
687 --- lk.orig/drivers/dsp/bridge/wmd/ue_deh.c 2008-08-18 10:38:38.000000000 +0300
688 +++ lk/drivers/dsp/bridge/wmd/ue_deh.c 2008-08-18 10:38:39.000000000 +0300
689 @@ -69,7 +69,7 @@
690 #include "_deh.h"
691 #include <_tiomap_mmu.h>
693 -struct HW_MMUMapAttrs_t mapAttrs = { HW_LITTLE_ENDIAN, HW_ELEM_SIZE_16BIT,
694 +static struct HW_MMUMapAttrs_t mapAttrs = { HW_LITTLE_ENDIAN, HW_ELEM_SIZE_16BIT,
695 HW_MMU_CPUES} ;
696 #define VirtToPhys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
698 Index: lk/drivers/dsp/bridge/dynload/cload.c
699 ===================================================================
700 --- lk.orig/drivers/dsp/bridge/dynload/cload.c 2008-08-18 10:38:35.000000000 +0300
701 +++ lk/drivers/dsp/bridge/dynload/cload.c 2008-08-18 10:38:39.000000000 +0300
702 @@ -122,7 +122,7 @@
703 * returned. Individual errors are reported during the load process
704 * using syms->Error_Report().
705 ***********************************************************************/
706 -extern int Dynamic_Load_Module(struct Dynamic_Loader_Stream *module,
707 +int Dynamic_Load_Module(struct Dynamic_Loader_Stream *module,
708 struct Dynamic_Loader_Sym *syms ,
709 struct Dynamic_Loader_Allocate *alloc,
710 struct Dynamic_Loader_Initialize *init,
711 @@ -234,7 +234,7 @@
712 * returned. Individual errors are reported during the load process
713 * using syms->Error_Report().
714 ***********************************************************************/
715 -extern int
716 +int
717 Dynamic_Open_Module(struct Dynamic_Loader_Stream *module,
718 struct Dynamic_Loader_Sym *syms,
719 struct Dynamic_Loader_Allocate *alloc,
720 @@ -503,7 +503,7 @@
722 /* initialize the handle header */
723 hndl->dm.hnext = hndl->dm.hprev = hndl; /* circular list */
724 - hndl->dm.hroot = 0;
725 + hndl->dm.hroot = NULL;
726 hndl->dm.dbthis = 0;
727 dlthis->myhandle = hndl; /* save away for return */
728 /* pointer to the section list of allocated sections */
729 @@ -738,7 +738,6 @@
730 s32 delta;
731 struct doff_syment_t *input_sym;
732 unsigned syms_in_buf;
733 - int siz;
734 struct doff_syment_t my_sym_buf[MY_SYM_BUF_SIZ];
735 input_sym = my_sym_buf;
736 syms_in_buf = symbols_left > MY_SYM_BUF_SIZ ?
737 @@ -821,7 +820,6 @@
738 /* This symbol is an absolute symbol */
739 if (sp->secnn == DN_ABS && ((sp->sclass == DN_EXT) ||
740 (sp->sclass == DN_EXTLAB))) {
741 - struct dynload_symbol *symp;
742 symp = dlthis->mysym->Find_Matching_Symbol
743 (dlthis->mysym, sname);
744 if (!symp)
745 @@ -1699,7 +1697,7 @@
746 * Zero for success. On error, the number of errors detected is returned.
747 * Individual errors are reported using syms->Error_Report().
748 ************************************************************************/
749 -extern int Dynamic_Unload_Module(DLOAD_mhandle mhandle,
750 +int Dynamic_Unload_Module(DLOAD_mhandle mhandle,
751 struct Dynamic_Loader_Sym *syms,
752 struct Dynamic_Loader_Allocate *alloc,
753 struct Dynamic_Loader_Initialize *init)
754 Index: lk/drivers/dsp/bridge/dynload/getsection.c
755 ===================================================================
756 --- lk.orig/drivers/dsp/bridge/dynload/getsection.c 2008-08-18 10:38:35.000000000 +0300
757 +++ lk/drivers/dsp/bridge/dynload/getsection.c 2008-08-18 10:38:39.000000000 +0300
758 @@ -156,7 +156,7 @@
760 /* Check that mandatory arguments are present */
761 if (!module || !syms) {
762 - if (syms != 0)
763 + if (syms != NULL)
764 dload_syms_error(syms, "Required parameter is NULL");
766 return NULL;
767 Index: lk/arch/arm/plat-omap/include/bridge/io.h
768 ===================================================================
769 --- lk.orig/arch/arm/plat-omap/include/bridge/io.h 2008-08-18 10:38:34.000000000 +0300
770 +++ lk/arch/arm/plat-omap/include/bridge/io.h 2008-08-18 10:38:39.000000000 +0300
771 @@ -98,7 +98,7 @@
772 * Resources, if any acquired in IO_Init(), are freed when the last
773 * client of IO calls IO_Exit().
775 - extern void IO_Exit();
776 + extern void IO_Exit(void);
779 * ======== IO_Init ========
780 @@ -111,7 +111,7 @@
781 * Ensures:
782 * A requirement for each of the other public CHNL functions.
784 - extern bool IO_Init();
785 + extern bool IO_Init(void);
788 * ======== IO_OnLoaded ========