X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/3e170ce000f1506b7b5d2c5c7faec85ceabb573d..c6bf4f310a33a9262d455ea4d3f0630b1255e3fe:/iokit/Kernel/IOReporterDefs.h diff --git a/iokit/Kernel/IOReporterDefs.h b/iokit/Kernel/IOReporterDefs.h index ec94a3d24..1bac12706 100644 --- a/iokit/Kernel/IOReporterDefs.h +++ b/iokit/Kernel/IOReporterDefs.h @@ -1,8 +1,8 @@ /* * Copyright (c) 2012-2013 Apple Computer, Inc. All Rights Reserved. - * + * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in @@ -11,10 +11,10 @@ * unlawful or unlicensed copies of an Apple operating system, or to * circumvent, violate, or enable the circumvention or violation of, any * terms of an Apple operating system software license agreement. - * + * * Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -22,7 +22,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ @@ -33,7 +33,7 @@ //#define IORDEBUG_IOLOG -#if defined(IORDEBUG_IOLOG) +#if defined(IORDEBUG_IOLOG) #define IORLOG(fmt, args...) \ do { \ IOLog((fmt), ##args); \ @@ -41,7 +41,7 @@ do { \ } while(0) #else -#define IORLOG(fmt, args...) +#define IORLOG(fmt, args...) #endif #define IORERROR_LOG @@ -59,21 +59,21 @@ do { \ #define PREFL_MEMOP_FAIL(__val, __type) do { \ if (__val <= 0) { \ - IORERROR("%s - %s <= 0!\n", __func__, #__val); \ - res = kIOReturnUnderrun; \ - goto finish; \ + IORERROR("%s - %s <= 0!\n", __func__, #__val); \ + res = kIOReturnUnderrun; \ + goto finish; \ } else if (__val > INT_MAX / (int)sizeof(__type)) { \ - IORERROR("%s - %s > INT_MAX / sizeof(%s)!\n",__func__,#__val,#__type);\ - res = kIOReturnOverrun; \ - goto finish; \ + IORERROR("%s - %s > INT_MAX / sizeof(%s)!\n",__func__,#__val,#__type);\ + res = kIOReturnOverrun; \ + goto finish; \ } \ } while(0) #define PREFL_MEMOP_PANIC(__val, __type) do { \ if (__val <= 0) { \ - panic("%s - %s <= 0!", __func__, #__val); \ + panic("%s - %s <= 0!", __func__, #__val); \ } else if (__val > INT_MAX / (int)sizeof(__type)) { \ - panic("%s - %s > INT_MAX / sizeof(%s)!", __func__, #__val, #__type); \ + panic("%s - %s > INT_MAX / sizeof(%s)!", __func__, #__val, #__type); \ } \ } while(0) @@ -99,16 +99,15 @@ _elements[idx].values.v[3]); \ #define IOREPORTER_CHECK_LOCK() \ do { \ if (!_reporterIsLocked) { \ - panic("%s was called out of locked context!", __PRETTY_FUNCTION__); \ + panic("%s was called out of locked context!", __PRETTY_FUNCTION__); \ } \ } while(0) \ #define IOREPORTER_CHECK_CONFIG_LOCK() \ do { \ if (!_reporterConfigIsLocked) { \ - panic("%s was called out of config locked context!", __PRETTY_FUNCTION__); \ + panic("%s was called out of config locked context!", __PRETTY_FUNCTION__); \ } \ } while(0) \ #endif /* ! _IOEPORTERDEFS_H */ -