X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fbnxt%2Ftf_ulp%2Fulp_utils.c;h=bafb539c8df30a38ae84ace7a765daa6d17b73a3;hb=48fbc1be82b551e41c58e94de780fdd2ffaaeb78;hp=5dc710338a39edc791ec337d0db3a78444d5a80c;hpb=3fe124d2536c5b6d4aa9f7de77f90651b8fcd8e3;p=dpdk.git diff --git a/drivers/net/bnxt/tf_ulp/ulp_utils.c b/drivers/net/bnxt/tf_ulp/ulp_utils.c index 5dc710338a..bafb539c8d 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_utils.c +++ b/drivers/net/bnxt/tf_ulp/ulp_utils.c @@ -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)