xpp: xtalk -- no private status range
authorOron Peled <oron.peled@xorcom.com>
Mon, 15 Dec 2014 16:14:21 +0000 (11:14 -0500)
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>
Thu, 5 Nov 2015 16:04:13 +0000 (18:04 +0200)
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

xpp/xtalk/xtalk_base.c

index ee9e462..bbf5640 100644 (file)
@@ -117,25 +117,17 @@ int xtalk_set_protocol(struct xtalk_base *xtalk_base,
 
                stat_msg = (xproto) ? xproto->ack_statuses[i] : NULL;
                if (stat_msg) {
-                       if (!IS_PRIVATE_OP(i)) {
-                               ERR("Bad status=0x%X "
-                                       "(should be in the range [0x%X-0x%X]\n",
-                                       i, PRIVATE_OP_FIRST, PRIVATE_OP_LAST);
-                               return -EINVAL;
-                       }
                        xtalk_base->xproto.ack_statuses[i] = stat_msg;
                        DBG("private: status=0x%X (%s)\n", i, stat_msg);
                } else {
-                       if (!IS_PRIVATE_OP(i)) {
-                               const char      *stat_msg;
-
-                               xtalk_base->xproto.ack_statuses[i] =
-                                       xproto_base->ack_statuses[i];
-                               stat_msg = xtalk_base->xproto.ack_statuses[i];
-                               if (stat_msg)
-                                       DBG("global: status=0x%X (%s)\n",
-                                               i, stat_msg);
-                       }
+                       const char      *global_msg;
+
+                       xtalk_base->xproto.ack_statuses[i] =
+                               xproto_base->ack_statuses[i];
+                       global_msg = xtalk_base->xproto.ack_statuses[i];
+                       if (global_msg)
+                               DBG("global: status=0x%X (%s)\n",
+                                               i, global_msg);
                }
        }
        xtalk_base->xproto.name = protoname;