Commit fcc645f1 authored by Charles Jacobsen's avatar Charles Jacobsen
Browse files

lcd: Fix some debug code bugs.

parent 72f4cd99
......@@ -108,7 +108,7 @@ int fipc_prep_buffers(unsigned int buf_order, void *buffer_1, void *buffer_2)
*/
if ((1UL << buf_order) < sizeof(struct fipc_message)) {
FIPC_DEBUG(FIPC_DEBUG_ERR,
"Buffers are too small (buf_order = %d, so their size is 2^buf_order = %ul bytes); but one fipc message is %ul, so the buffers need to be at least that big\n",
"Buffers are too small (buf_order = %d, so their size is 2^buf_order = %lu bytes); but one fipc message is %lu, so the buffers need to be at least that big\n",
buf_order, (1UL << buf_order),
sizeof(struct fipc_message));
return -EINVAL;
......@@ -147,7 +147,7 @@ int fipc_ring_channel_init(struct fipc_ring_channel *chnl,
*/
if ((1UL << buf_order) < sizeof(struct fipc_message)) {
FIPC_DEBUG(FIPC_DEBUG_ERR,
"Buffers are too small (buf_order = %d, so their size is 2^buf_order = %ul bytes); but one fipc message is %ul, so the buffers need to be at least that big\n",
"Buffers are too small (buf_order = %d, so their size is 2^buf_order = %lu bytes); but one fipc message is %lu, so the buffers need to be at least that big\n",
buf_order, (1UL << buf_order),
sizeof(struct fipc_message));
return -EINVAL;
......@@ -182,7 +182,7 @@ int fipc_send_msg_start(struct fipc_ring_channel *chnl,
#if FIPC_DEBUG_LVL >= FIPC_DEBUG_VERB
if (!ret)
fipc_debug("Allocated a slot at index %ul in tx\n",
fipc_debug("Allocated a slot at index %lu in tx\n",
tx_msg_to_idx(chnl, *msg));
else
fipc_debug("Failed to get a slot, out of slots right now.\n");
......@@ -199,7 +199,7 @@ int fipc_send_msg_end(struct fipc_ring_channel *chnl,
#if FIPC_DEBUG_LVL >= FIPC_DEBUG_VERB
fipc_debug("Marking message at idx %ul as sent\n",
fipc_debug("Marking message at idx %lu as sent\n",
tx_msg_to_idx(chnl, msg));
#endif
......@@ -243,7 +243,7 @@ int fipc_recv_msg_start(struct fipc_ring_channel *chnl,
#if FIPC_DEBUG_LVL >= FIPC_DEBUG_VERB
if (!ret)
fipc_debug("Received a message at index %ul in rx\n",
fipc_debug("Received a message at index %lu in rx\n",
rx_msg_to_idx(chnl, *msg));
else
fipc_debug("No messages to receive right now\n");
......@@ -281,7 +281,7 @@ int fipc_recv_msg_if(struct fipc_ring_channel *chnl,
#if FIPC_DEBUG_LVL >= FIPC_DEBUG_VERB
if (!ret)
fipc_debug("Received a message at index %ul in rx\n",
fipc_debug("Received a message at index %lu in rx\n",
rx_msg_to_idx(chnl, *msg));
else
fipc_debug("No messages to receive right now, or caller doesn't want it\n");
......@@ -298,7 +298,7 @@ int fipc_recv_msg_end(struct fipc_ring_channel *chnl,
#if FIPC_DEBUG_LVL >= FIPC_DEBUG_VERB
fipc_debug("Marking message at idx %ul as received\n",
fipc_debug("Marking message at idx %lu as received\n",
rx_msg_to_idx(chnl, msg));
#endif
......
......@@ -17,9 +17,9 @@
#define FIPC_DEBUG_ERR 1
#define FIPC_DEBUG_VERB 2
#define FIPC_DEBUG_LVL FIPC_DEBUG_NONE
#define FIPC_DEBUG_LVL FIPC_DEBUG_VERB
#define fipc_debug(fmt, ...) __fipc_debug(fmt, __VA_ARGS__)
#define fipc_debug(fmt, ...) __fipc_debug(fmt,##__VA_ARGS__)
#define FIPC_DEBUG(lvl, fmt, ...) do { \
if (lvl <= FIPC_DEBUG_LVL) { \
......
......@@ -14,7 +14,7 @@
#include <libfipc_platform_types.h>
#define __fipc_debug(fmt, ...) \
printk(KERN_ERR "fipc: %s:%d: "format,__FUNCTION__,__LINE__,##__VA_ARGS__)
printk(KERN_ERR "fipc: %s:%d: "fmt,__FUNCTION__,__LINE__,##__VA_ARGS__)
static inline int __fipc_mutex_init(fipc_mutex_t *mutex)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment