blob: dd1422b6afbb11a9fb2376621dff049378c4fc42 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Evgeniy Polyakova8018762011-08-25 15:59:06 -07002 * Copyright (c) 2004 Evgeniy Polyakov <zbr@ioremap.net>
Evgeniy Polyakov77859252005-05-20 22:33:25 +04003 *
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
Linus Torvalds1da177e2005-04-16 15:20:36 -070013 */
14
15#ifndef __W1_LOG_H
16#define __W1_LOG_H
17
18#define DEBUG
19
20#ifdef W1_DEBUG
21# define assert(expr) do {} while (0)
22#else
23# define assert(expr) \
24 if(unlikely(!(expr))) { \
Fjodor Schelichowfdc91672014-06-19 02:52:00 +020025 pr_err("Assertion failed! %s,%s,%s,line=%d\n", \
26 #expr, __FILE__, __func__, __LINE__); \
Linus Torvalds1da177e2005-04-16 15:20:36 -070027 }
28#endif
29
30#endif /* __W1_LOG_H */
31