net/mlx5: fix meter policy flow match item
[dpdk.git] / drivers / net / bnxt / tf_ulp / ulp_utils.c
index 5dc7103..bafb539 100644 (file)
@@ -62,7 +62,7 @@ ulp_regfile_read(struct ulp_regfile *regfile,
  * data [in] The value is written into this variable.  It is going to be in the
  * same byte order as it was written.
  *
- * size [in] The size in bytes of the value beingritten into this
+ * size [in] The size in bytes of the value being written into this
  * variable.
  *
  * returns 0 on success
@@ -295,7 +295,7 @@ ulp_blob_push(struct ulp_blob *blob,
                                     datalen,
                                     data);
        if (!rc) {
-               BNXT_TF_DBG(ERR, "Failed ro write blob\n");
+               BNXT_TF_DBG(ERR, "Failed to write blob\n");
                return 0;
        }
        blob->write_idx += datalen;
@@ -355,7 +355,7 @@ ulp_blob_insert(struct ulp_blob *blob, uint32_t offset,
                                     datalen,
                                     data);
        if (!rc) {
-               BNXT_TF_DBG(ERR, "Failed ro write blob\n");
+               BNXT_TF_DBG(ERR, "Failed to write blob\n");
                return 0;
        }
        /* copy the previously stored data */
@@ -409,7 +409,7 @@ ulp_blob_push_64(struct ulp_blob *blob,
  *
  * data [in] 32-bit value to be added to the blob.
  *
- * datalen [in] The number of bits to be added ot the blob.
+ * datalen [in] The number of bits to be added to the blob.
  *
  * The offset of the data is updated after each push of data.
  * NULL returned on error, pointer pushed value otherwise.
@@ -448,7 +448,7 @@ ulp_blob_push_32(struct ulp_blob *blob,
  * The offset of the data is updated after each push of data.
  * NULL returned on error, pointer pushed value otherwise.
  */
-uint32_t
+int32_t
 ulp_blob_push_encap(struct ulp_blob *blob,
                    uint8_t *data,
                    uint32_t datalen)
@@ -460,7 +460,7 @@ ulp_blob_push_encap(struct ulp_blob *blob,
        if (!blob || !data ||
            datalen > (uint32_t)(blob->bitlen - blob->write_idx)) {
                BNXT_TF_DBG(ERR, "invalid argument\n");
-               return 0;
+               return -1;
        }
 
        initial_size = ULP_BYTE_2_BITS(sizeof(uint64_t)) -
@@ -479,7 +479,7 @@ ulp_blob_push_encap(struct ulp_blob *blob,
                }
                if (!ulp_blob_push(blob, val, size)) {
                        BNXT_TF_DBG(ERR, "push field failed\n");
-                       return 0;
+                       return -1;
                }
                val += ULP_BITS_2_BYTE(size);
                write_size -= size;
@@ -1085,7 +1085,7 @@ uint32_t ulp_bitmap_is_ones(uint8_t *bitmap, int32_t size)
 }
 
 /* Function to check if bitmap is not zero. Return 1 on success */
-uint32_t ulp_bitmap_notzero(uint8_t *bitmap, int32_t size)
+uint32_t ulp_bitmap_notzero(const uint8_t *bitmap, int32_t size)
 {
        while (size-- > 0) {
                if (*bitmap != 0)