Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: tidspbridge: remove rmm_init() and rmm_exit()

The rmm module has a rmm_init() and a rmm_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Víctor Manuel Jáquez Leal and committed by
Greg Kroah-Hartman
974f9cd5 311abd9a

+2 -59
-25
drivers/staging/tidspbridge/include/dspbridge/rmm.h
··· 115 115 extern void rmm_delete(struct rmm_target_obj *target); 116 116 117 117 /* 118 - * ======== rmm_exit ======== 119 - * Exit the RMM module 120 - * 121 - * Parameters: 122 - * Returns: 123 - * Requires: 124 - * rmm_init successfully called. 125 - * Ensures: 126 - */ 127 - extern void rmm_exit(void); 128 - 129 - /* 130 118 * ======== rmm_free ======== 131 119 * Free or unreserve memory allocated through rmm_alloc(). 132 120 * ··· 134 146 */ 135 147 extern bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 dsp_addr, 136 148 u32 size, bool reserved); 137 - 138 - /* 139 - * ======== rmm_init ======== 140 - * Initialize the RMM module 141 - * 142 - * Parameters: 143 - * Returns: 144 - * TRUE: Success. 145 - * FALSE: Failure. 146 - * Requires: 147 - * Ensures: 148 - */ 149 - extern bool rmm_init(void); 150 149 151 150 /* 152 151 * ======== rmm_stat ========
+2 -8
drivers/staging/tidspbridge/pmgr/dspapi.c
··· 272 272 msg_exit(); 273 273 io_exit(); 274 274 mgr_exit(); 275 - rmm_exit(); 276 275 } 277 276 } 278 277 ··· 284 285 { 285 286 bool ret = true; 286 287 bool fdev, fchnl, fmsg, fio; 287 - bool fmgr, frmm; 288 + bool fmgr; 288 289 289 290 if (api_c_refs == 0) { 290 291 /* initialize driver and other modules */ 291 292 fmgr = mgr_init(); 292 - frmm = rmm_init(); 293 293 fchnl = chnl_init(); 294 294 fmsg = msg_mod_init(); 295 295 fio = io_init(); 296 296 fdev = dev_init(); 297 297 ret = fdev && fchnl && fmsg && fio; 298 - ret = ret && fmgr && frmm; 298 + ret = ret && fmgr; 299 299 if (!ret) { 300 300 301 301 if (fmgr) ··· 311 313 312 314 if (fdev) 313 315 dev_exit(); 314 - 315 - if (frmm) 316 - rmm_exit(); 317 - 318 316 } 319 317 } 320 318 if (ret)
-6
drivers/staging/tidspbridge/rmgr/nldr.c
··· 628 628 void nldr_exit(void) 629 629 { 630 630 refs--; 631 - 632 - if (refs == 0) 633 - rmm_exit(); 634 631 } 635 632 636 633 /* ··· 743 746 */ 744 747 bool nldr_init(void) 745 748 { 746 - if (refs == 0) 747 - rmm_init(); 748 - 749 749 refs++; 750 750 751 751 return true;
-20
drivers/staging/tidspbridge/rmgr/rmm.c
··· 80 80 struct list_head ovly_list; /* List of overlay memory in use */ 81 81 }; 82 82 83 - static u32 refs; /* module reference count */ 84 - 85 83 static bool alloc_block(struct rmm_target_obj *target, u32 segid, u32 size, 86 84 u32 align, u32 *dsp_address); 87 85 static bool free_block(struct rmm_target_obj *target, u32 segid, u32 addr, ··· 258 260 } 259 261 260 262 /* 261 - * ======== rmm_exit ======== 262 - */ 263 - void rmm_exit(void) 264 - { 265 - refs--; 266 - } 267 - 268 - /* 269 263 * ======== rmm_free ======== 270 264 */ 271 265 bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 dsp_addr, u32 size, ··· 287 297 } 288 298 } 289 299 return ret; 290 - } 291 - 292 - /* 293 - * ======== rmm_init ======== 294 - */ 295 - bool rmm_init(void) 296 - { 297 - refs++; 298 - 299 - return true; 300 300 } 301 301 302 302 /*