1 /** 2 * linux-compat.h - DesignWare USB3 Linux Compatibiltiy Adapter Header 3 * 4 * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com 5 * 6 * Authors: Kishon Vijay Abraham I <kishon@ti.com> 7 * 8 * Taken from Linux Kernel v3.16 (drivers/usb/dwc3/core.c) and ported 9 * to uboot. 10 * 11 * SPDX-License-Identifier: GPL-2.0 12 * 13 */ 14 15 #ifndef __DWC3_LINUX_COMPAT__ 16 #define __DWC3_LINUX_COMPAT__ 17 18 #define pr_debug(format) debug(format) 19 #define WARN(val, format, arg...) debug(format, ##arg) 20 #define WARN_ON_ONCE(val) debug("Error %d\n", val) 21 22 #define BUILD_BUG_ON_NOT_POWER_OF_2(n) 23 24 static inline size_t strlcat(char *dest, const char *src, size_t n) 25 { 26 strcat(dest, src); 27 return strlen(dest) + strlen(src); 28 } 29 30 #endif 31