diff options
author | Ken Cox <jkc@redhat.com> | 2014-03-19 14:06:18 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-19 16:55:40 -0400 |
commit | 316d363d680131eb8aef89d1a3b5744f71a504f6 (patch) | |
tree | d57629b7b423defc0dcc36b22ba4bdfe1975fb88 | |
parent | 67d5dc8a69bf91720f0a8fdeaa5ef94c42d1637e (diff) |
Staging: unisys: include: Remove unused macros from timskmod.h
The following macros were never referenced and have been removed:
DEVFROMID
DEVFROMFILE
DEVFROMINODE
DEVFROMIDX
TRY_WPOSTCODE_3
Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/unisys/include/timskmod.h | 118 |
1 files changed, 0 insertions, 118 deletions
diff --git a/drivers/staging/unisys/include/timskmod.h b/drivers/staging/unisys/include/timskmod.h index 0d0b29c9c4b2..c4262ab2cac3 100644 --- a/drivers/staging/unisys/include/timskmod.h +++ b/drivers/staging/unisys/include/timskmod.h | |||
@@ -193,13 +193,6 @@ typedef long VMMIO32;/**< #VMMIO pointing to 32-bit data */ | |||
193 | pcval32bit); \ | 193 | pcval32bit); \ |
194 | } while (0) | 194 | } while (0) |
195 | 195 | ||
196 | #define TRY_WPOSTCODE_3(x, EVENT_PC, pcval16bit1, pcval16bit2) do { \ | ||
197 | int status = (x); \ | ||
198 | if (status < 0) \ | ||
199 | FAIL_WPOSTCODE_3(__stringify(x), status, EVENT_PC, \ | ||
200 | pcval16bit1, pcval16bit2); \ | ||
201 | } while (0) | ||
202 | |||
203 | #define ASSERT(cond) \ | 196 | #define ASSERT(cond) \ |
204 | do { if (!(cond)) \ | 197 | do { if (!(cond)) \ |
205 | HUHDRV("ASSERT failed - %s", \ | 198 | HUHDRV("ASSERT failed - %s", \ |
@@ -315,117 +308,6 @@ typedef long VMMIO32;/**< #VMMIO pointing to 32-bit data */ | |||
315 | RETVOID; \ | 308 | RETVOID; \ |
316 | }) | 309 | }) |
317 | 310 | ||
318 | /** Converts a device index #devix into #devData, after checking for validity. | ||
319 | * Can only be called from functions returning void. | ||
320 | * @param devix your device index within the #DevData array. | ||
321 | * @param devData the #PRIVATEDEVICEDATA pointer that will be set on return. | ||
322 | * @param where string identifying the calling function, to be printed in | ||
323 | * debug message | ||
324 | * @param dbg 1 iff debug messages are enabled | ||
325 | */ | ||
326 | #define DEVFROMID(devix, devData, where, dbg) \ | ||
327 | { \ | ||
328 | if (devix >= MAXDEVICES) { \ | ||
329 | PRINTKDRV("bad devix passed to %s()", where); \ | ||
330 | RETVOID; \ | ||
331 | } \ | ||
332 | if (dbg) \ | ||
333 | DEBUGDEV(devix, "%s", where); \ | ||
334 | if (devix >= MAXDEVICES) { \ | ||
335 | DEBUGDEV(devix, "%s - bad devix %d", \ | ||
336 | where, devix); \ | ||
337 | RETVOID; \ | ||
338 | } \ | ||
339 | devData = DevData[devix]; \ | ||
340 | CHKDD(devData); \ | ||
341 | } | ||
342 | |||
343 | /** Converts a device index #devix into #devData, after checking for validity. | ||
344 | * Can only be called from functions returning int. | ||
345 | * @param devix your device index within the #DevData array. | ||
346 | * @param devData the #PRIVATEDEVICEDATA pointer that will be set on return. | ||
347 | * @param errcode error code that your function will return on error. | ||
348 | * @param where string identifying the calling function, to be printed in | ||
349 | * debug message | ||
350 | * @param dbg 1 iff debug messages are enabled | ||
351 | */ | ||
352 | #define DEVFROMIDX(devix, devData, errcode, where, dbg) \ | ||
353 | { \ | ||
354 | if (devix >= MAXDEVICES) { \ | ||
355 | PRINTKDRV("bad devix passed to %s()", where); \ | ||
356 | RETINT(errcode); \ | ||
357 | } \ | ||
358 | if (dbg) \ | ||
359 | DEBUGDEV(devix, "%s", where); \ | ||
360 | if (devix >= MAXDEVICES) { \ | ||
361 | DEBUGDEV(devix, "%s - bad devix %d", \ | ||
362 | where, devix); \ | ||
363 | RETINT(-ENODEV); \ | ||
364 | } \ | ||
365 | devData = DevData[devix]; \ | ||
366 | CHKDDX(devData, -EIO); \ | ||
367 | } | ||
368 | |||
369 | /** Converts an inode pointer #inode into a #devix and #devData, after | ||
370 | * checking for validity. | ||
371 | * Can only be called from functions returning int. | ||
372 | * @param devix your device index within the #DevData array. | ||
373 | * @param devData the #PRIVATEDEVICEDATA pointer that will be set on return. | ||
374 | * @param inode input inode pointer | ||
375 | * @param errcode error code that your function will return on error. | ||
376 | * @param where string identifying the calling function, to be printed in | ||
377 | * debug message | ||
378 | * @param dbg 1 iff debug messages are enabled | ||
379 | */ | ||
380 | #define DEVFROMINODE(devix, devData, inode, errcode, where, dbg) \ | ||
381 | { \ | ||
382 | if (inode == NULL) { \ | ||
383 | PRINTKDRV("bad inode passed to %s()", where); \ | ||
384 | RETINT(errcode); \ | ||
385 | } \ | ||
386 | devix = MINOR(inode->i_rdev); \ | ||
387 | if (dbg) \ | ||
388 | DEBUGDEV(devix, "%s", where); \ | ||
389 | if (devix >= MAXDEVICES) { \ | ||
390 | DEBUGDEV(devix, "%s - bad devix %d", \ | ||
391 | where, devix); \ | ||
392 | RETINT(-ENODEV); \ | ||
393 | } \ | ||
394 | devData = DevData[devix]; \ | ||
395 | CHKDDX(devData, -EIO); \ | ||
396 | } | ||
397 | |||
398 | /** Converts a file pointer #file into a #devix and #devData, after checking | ||
399 | * for validity. | ||
400 | * Can only be called from functions returning int. | ||
401 | * @param devix your device index within the #DevData array. | ||
402 | * @param devData the #PRIVATEDEVICEDATA pointer that will be set on return. | ||
403 | * @param file input file pointer | ||
404 | * @param errcode error code that your function will return on error. | ||
405 | * @param where string identifying the calling function, to be printed in | ||
406 | * debug message | ||
407 | * @param dbg 1 iff debug messages are enabled | ||
408 | */ | ||
409 | #define DEVFROMFILE(devix, devData, fileData, file, errcode, where, dbg) \ | ||
410 | { \ | ||
411 | if (file == NULL) { \ | ||
412 | PRINTKDRV("bad file passed to %s()", where); \ | ||
413 | RETINT(errcode); \ | ||
414 | } \ | ||
415 | CHKFDX((PRIVATEFILEDATA *)(file->private_data), -EIO); \ | ||
416 | fileData = file->private_data; \ | ||
417 | devix = fileData->devix; \ | ||
418 | if (dbg) \ | ||
419 | DEBUGDEV(devix, "%s %p", where, file); \ | ||
420 | if (devix >= MAXDEVICES) { \ | ||
421 | DEBUGDEV(devix, "%s - bad devix %d", \ | ||
422 | where, devix); \ | ||
423 | RETINT(-ENODEV); \ | ||
424 | } \ | ||
425 | devData = DevData[devix]; \ | ||
426 | CHKDDX(devData, -EIO); \ | ||
427 | } | ||
428 | |||
429 | /** Locks dd->lockDev if you havn't already locked it */ | 311 | /** Locks dd->lockDev if you havn't already locked it */ |
430 | #define LOCKDEV(dd) \ | 312 | #define LOCKDEV(dd) \ |
431 | { \ | 313 | { \ |