staging: unisys: remove ERRDEV macros
[deliverable/linux.git] / drivers / staging / unisys / visorchannel / visorchannel_funcs.c
index 01b0b200feb642852d796aa5d38e6983ba8455e8..de0a64624e3dc2beee5a9c5a1ac15a2380c582ce 100644 (file)
@@ -77,13 +77,11 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channel_bytes,
                    visor_memregion_create_overlapped(parent->memregion,
                                off, sizeof(struct channel_header));
        if (p->memregion == NULL) {
-               ERRDRV("visor_memregion_create failed failed: (status=0)\n");
                rc = NULL;
                goto cleanup;
        }
        if (visor_memregion_read(p->memregion, 0, &p->chan_hdr,
                                 sizeof(struct channel_header)) < 0) {
-               ERRDRV("visor_memregion_read failed: (status=0)\n");
                rc = NULL;
                goto cleanup;
        }
@@ -94,7 +92,6 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channel_bytes,
                /* we had better be a CLIENT of this channel */
                guid = p->chan_hdr.chtype;
        if (visor_memregion_resize(p->memregion, channel_bytes) < 0) {
-               ERRDRV("visor_memregion_resize failed: (status=0)\n");
                rc = NULL;
                goto cleanup;
        }
@@ -255,10 +252,9 @@ visorchannel_clear(struct visorchannel *channel, ulong offset, u8 ch,
        int written = 0;
        u8 *buf = vmalloc(bufsize);
 
-       if (buf == NULL) {
-               ERRDRV("%s failed memory allocation", __func__);
+       if (buf == NULL)
                goto cleanup;
-       }
+
        memset(buf, ch, bufsize);
        while (nbytes > 0) {
                ulong thisbytes = bufsize;
@@ -323,10 +319,8 @@ sig_read_header(struct visorchannel *channel, u32 queue,
 {
        BOOL rc = FALSE;
 
-       if (channel->chan_hdr.ch_space_offset < sizeof(struct channel_header)) {
-               ERRDRV("oChannelSpace too small: (status=%d)\n", rc);
+       if (channel->chan_hdr.ch_space_offset < sizeof(struct channel_header))
                goto cleanup;
-       }
 
        /* Read the appropriate SIGNAL_QUEUE_HEADER into local memory. */
 
@@ -334,10 +328,6 @@ sig_read_header(struct visorchannel *channel, u32 queue,
                                 SIG_QUEUE_OFFSET(&channel->chan_hdr, queue),
                                 sig_hdr,
                                 sizeof(struct signal_queue_header)) < 0) {
-               ERRDRV("queue=%d SIG_QUEUE_OFFSET=%d",
-                      queue, (int)SIG_QUEUE_OFFSET(&channel->chan_hdr, queue));
-               ERRDRV("visor_memregion_read of signal queue failed: (status=%d)\n",
-                      rc);
                goto cleanup;
        }
        rc = TRUE;
@@ -357,15 +347,11 @@ sig_do_data(struct visorchannel *channel, u32 queue,
                if (visor_memregion_write(channel->memregion,
                                          signal_data_offset,
                                          data, sig_hdr->signal_size) < 0) {
-                       ERRDRV("visor_memregion_write of signal data failed: (status=%d)\n",
-                              rc);
                        goto cleanup;
                }
        } else {
                if (visor_memregion_read(channel->memregion, signal_data_offset,
                                         data, sig_hdr->signal_size) < 0) {
-                       ERRDRV("visor_memregion_read of signal data failed: (status=%d)\n",
-                              rc);
                        goto cleanup;
                }
        }
@@ -403,8 +389,6 @@ safe_sig_queue_validate(struct signal_queue_header *psafe_sqh,
                punsafe_sqh->head = *phead;
                punsafe_sqh->tail = *ptail;
 
-               ERRDRV("safe_sig_queue_validate: head = 0x%x, tail = 0x%x, MaxSlots = 0x%x",
-                      *phead, *ptail, psafe_sqh->max_slots);
                return 0;
        }
        return 1;
@@ -422,7 +406,6 @@ signalremove_inner(struct visorchannel *channel, u32 queue, void *msg)
 
        sig_hdr.tail = (sig_hdr.tail + 1) % sig_hdr.max_slots;
        if (!sig_read_data(channel, queue, &sig_hdr, sig_hdr.tail, msg)) {
-               ERRDRV("sig_read_data failed\n");
                return FALSE;
        }
        sig_hdr.num_received++;
@@ -431,14 +414,10 @@ signalremove_inner(struct visorchannel *channel, u32 queue, void *msg)
         * update host memory.
         */
        mb(); /* required for channel synch */
-       if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, tail)) {
-               ERRDRV("visor_memregion_write of Tail failed\n");
+       if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, tail))
                return FALSE;
-       }
-       if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_received)) {
-               ERRDRV("visor_memregion_write of NumSignalsReceived failed\n");
+       if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_received))
                return FALSE;
-       }
        return TRUE;
 }
 
@@ -470,28 +449,28 @@ signalinsert_inner(struct visorchannel *channel, u32 queue, void *msg)
        sig_hdr.head = ((sig_hdr.head + 1) % sig_hdr.max_slots);
        if (sig_hdr.head == sig_hdr.tail) {
                sig_hdr.num_overflows++;
-               if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_overflows))
-                       ERRDRV("visor_memregion_write of NumOverflows failed\n");
-
+               visor_memregion_write(channel->memregion,
+                                     SIG_QUEUE_OFFSET(&channel->chan_hdr,
+                                                      queue) +
+                                     offsetof(struct signal_queue_header,
+                                              num_overflows),
+                                     &(sig_hdr.num_overflows),
+                                     sizeof(sig_hdr.num_overflows));
                return FALSE;
        }
 
-       if (!sig_write_data(channel, queue, &sig_hdr, sig_hdr.head, msg)) {
-               ERRDRV("sig_write_data failed\n");
+       if (!sig_write_data(channel, queue, &sig_hdr, sig_hdr.head, msg))
                return FALSE;
-       }
+
        sig_hdr.num_sent++;
 
        /* For each data field in SIGNAL_QUEUE_HEADER that was modified,
         * update host memory.
         */
        mb(); /* required for channel synch */
-       if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, head)) {
-               ERRDRV("visor_memregion_write of Head failed\n");
+       if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, head))
                return FALSE;
-       }
        if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_sent)) {
-               ERRDRV("visor_memregion_write of NumSignalsSent failed\n");
                return FALSE;
        }
 
@@ -581,15 +560,13 @@ visorchannel_debug(struct visorchannel *channel, int num_queues,
        int i = 0;
        int errcode = 0;
 
-       if (channel == NULL) {
-               ERRDRV("%s no channel", __func__);
+       if (channel == NULL)
                return;
-       }
+
        memregion = channel->memregion;
-       if (memregion == NULL) {
-               ERRDRV("%s no memregion", __func__);
+       if (memregion == NULL)
                return;
-       }
+
        addr = visor_memregion_get_physaddr(memregion);
        nbytes_region = visor_memregion_get_nbytes(memregion);
        errcode = visorchannel_read(channel, off,
@@ -669,11 +646,8 @@ visorchannel_dump_section(struct visorchannel *chan, char *s,
                goto fmt_failed;
 
        errcode = visorchannel_read(chan, off, buf, len);
-       if (errcode < 0) {
-               ERRDRV("%s failed to read %s from channel errcode=%d",
-                      s, __func__, errcode);
+       if (errcode < 0)
                goto read_failed;
-       }
        seq_printf(seq, "channel %s:\n", s);
        tbuf = buf;
        while (len > 0) {
This page took 0.041715 seconds and 5 git commands to generate.