X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Flinux%2Fcompat.h;h=2336b56cf5c170ee75f7b9a7e1f5655adb3f3f03;hb=235c5b8315c6a9eb566fd3d99a098cc6db869fc5;hp=533983faffc15deecff35587ae934c9c36a2f6a4;hpb=2d221489df021393654805536be7effcb9d39702;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/linux/compat.h b/include/linux/compat.h index 533983f..2336b56 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -15,8 +15,6 @@ struct p_current{ extern struct p_current *current; -#define ndelay(x) udelay((x) < 1000 ? 1 : (x)/1000) - #define dev_dbg(dev, fmt, args...) \ debug(fmt, ##args) #define dev_vdbg(dev, fmt, args...) \ @@ -108,8 +106,12 @@ static inline void kmem_cache_destroy(struct kmem_cache *cachep) #define BUG_ON(condition) do { if (condition) BUG(); } while(0) #endif /* BUG */ -#define WARN_ON(x) if (x) {printf("WARNING in %s line %d\n" \ - , __FILE__, __LINE__); } +#define WARN_ON(condition) ({ \ + int __ret_warn_on = !!(condition); \ + if (unlikely(__ret_warn_on)) \ + printf("WARNING in %s line %d\n", __FILE__, __LINE__); \ + unlikely(__ret_warn_on); \ +}) #define PAGE_SIZE 4096