Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://github.com/codespell-project/codespell

Change-Id: I25415165df192cfc3bd1405aca81bfa5bf2f7a63
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
diff --git a/include/libpldm/base.h b/include/libpldm/base.h
index 562ef58..2f64849 100644
--- a/include/libpldm/base.h
+++ b/include/libpldm/base.h
@@ -375,7 +375,7 @@
  * protocol layer error and all the out-parameters are invalid.
  *
  *  @param[in] msg - Response message
- *  @param[in] payload_length - Length of reponse message payload
+ *  @param[in] payload_length - Length of response message payload
  *  @param[out] completion_code - Pointer to response msg's PLDM completion code
  *  @param[in] commands - pointer to array bitfield8_t[32] containing supported
  *             commands (PLDM_MAX_CMDS_PER_TYPE/8) = 32), as per DSP0240
@@ -413,7 +413,7 @@
  * protocol layer error and all the out-parameters are invalid.
  *
  *  @param[in] msg - Response message
- *  @param[in] payload_length - Length of reponse message payload
+ *  @param[in] payload_length - Length of response message payload
  *  @param[out] completion_code - Pointer to response msg's PLDM completion code
  *  @param[out] next_transfer_handle - the next handle for the next part of data
  *  @param[out] transfer_flag - flag to indicate the part of data
diff --git a/include/libpldm/bios_table.h b/include/libpldm/bios_table.h
index 62428ec..0dccc7c 100644
--- a/include/libpldm/bios_table.h
+++ b/include/libpldm/bios_table.h
@@ -62,7 +62,7 @@
 		pldm_bios_table_iter_value(iter);
 }
 
-/** @brief Get the bios string table entry that the iterator ponit to
+/** @brief Get the bios string table entry that the iterator points to
  *  @param[in] iter - Pointer the bios string table iterator
  *  @return Pointer to an entry in bios string table
  */
@@ -73,7 +73,7 @@
 		pldm_bios_table_iter_value(iter);
 }
 
-/** @brief Get the bios attribute value table entry that the iterator ponit to
+/** @brief Get the bios attribute value table entry that the iterator points to
  *  @param[in] iter - Pointer the bios attribute value table iterator
  *  @return Pointer to an entry in bios attribute value table
  */
@@ -208,7 +208,7 @@
 	bool read_only;	      //!< indicate whether the attribute is read-only
 	uint8_t pv_num;	      //!< number of possible values
 	const uint16_t *pv_handle; //!< handles of possible values
-	uint8_t def_num;	   //!< nnumber of default values
+	uint8_t def_num;	   //!< number of default values
 	const uint8_t *def_index;  //!< indices of default values.
 };
 
@@ -297,7 +297,7 @@
 	uint8_t string_type;	//!< The type of the string
 	uint16_t min_length;	//!< The minimum length of the string in bytes
 	uint16_t max_length;	//!< The maximum length of the string in bytes
-	uint16_t def_length;	//!< The length of the defaut string in bytes
+	uint16_t def_length;	//!< The length of the default string in bytes
 	const char *def_string; //!< The default string itself
 };
 
@@ -475,7 +475,7 @@
  *  @param[out] entry - Pointer to bios attribute value entry
  *  @param[in] entry_length - Length of attribute value entry
  *  @param[in] attr_handle - This handle points to an attribute in the
- *  BIOS Attribute Vlaue Table.
+ *  BIOS Attribute Value Table.
  *  @param[in] attr_type - Type of this attribute in the BIOS Attribute Value
  * Table
  *  @param[in] count - Total number of current values for this enum attribute
@@ -520,12 +520,12 @@
  *  @param[out] entry - Pointer to bios attribute value entry
  *  @param[in] entry_length - Length of attribute value entry
  *  @param[in] attr_handle - This handle points to an attribute in the
- *  BIOS Attribute Vlaue Table.
+ *  BIOS Attribute Value Table.
  *  @param[in] attr_type - Type of this attribute in the BIOS Attribute Value
  * Table
  *  @param[in] string_length - Length of current string in bytes. 0 indicates
  * that the current string value is not set.
- *  @param[in] string - The current string itsel
+ *  @param[in] string - The current string itself
  *  @return PLDM_SUCCESS on success. PLDM_ERROR_INVALID_DATA if entry is NULL, str is NULL while
  *  	    str_length is non-zero, or attr_type is not PLDM_BIOS_STRING. PLDM_ERROR_INVALID_LENGTH
  *  	    if entry_length lacks capacity to encode str into entry.
@@ -551,7 +551,7 @@
  *  @param[out] entry - Pointer to bios attribute value entry
  *  @param[in] entry_length - Length of attribute value entry
  *  @param[in] attr_handle - This handle points to an attribute in the
- *  BIOS Attribute Vlaue Table.
+ *  BIOS Attribute Value Table.
  *  @param[in] attr_type - Type of this attribute in the BIOS Attribute Value
  * Table
  *  @param[in] cv - Current Value
diff --git a/include/libpldm/firmware_update.h b/include/libpldm/firmware_update.h
index ac757a1..b59e777 100644
--- a/include/libpldm/firmware_update.h
+++ b/include/libpldm/firmware_update.h
@@ -49,7 +49,7 @@
 #define PLDM_QUERY_DOWNSTREAM_IDENTIFIERS_RESP_MIN_LEN 12
 
 /** @brief Minimum length of device descriptor, 2 bytes for descriptor type,
- *         2 bytes for descriptor length and atleast 1 byte of descriptor data
+ *         2 bytes for descriptor length and at least 1 byte of descriptor data
  */
 #define PLDM_FWUP_DEVICE_DESCRIPTOR_MIN_LEN    5
 #define PLDM_GET_FIRMWARE_PARAMETERS_REQ_BYTES 0
diff --git a/include/libpldm/fru.h b/include/libpldm/fru.h
index f337c43..2962131 100644
--- a/include/libpldm/fru.h
+++ b/include/libpldm/fru.h
@@ -304,7 +304,7 @@
  *  @param[in] transfer_flag - The transfer flag that indicates what part of the
  *             transfer this response represents
  *  @param[in] fru_structure_data - FRU Structure Data
- *  @param[in] data_size - Size of FRU Structrue Data
+ *  @param[in] data_size - Size of FRU Structure Data
  *  @param[in,out] msg - Message will be written to this
  *  @return pldm_completion_codes
  *  @note  Caller is responsible for memory alloc and dealloc of param 'msg',
diff --git a/include/libpldm/pdr.h b/include/libpldm/pdr.h
index 97404ff..579797c 100644
--- a/include/libpldm/pdr.h
+++ b/include/libpldm/pdr.h
@@ -164,7 +164,7 @@
  */
 void pldm_pdr_remove_remote_pdrs(pldm_pdr *repo);
 
-/** @brief Remove all remote PDR's that beling to a specific terminus
+/** @brief Remove all remote PDR's that belong to a specific terminus
  *         handle
  *  @param[in] repo - opaque pointer acting as a PDR repo handle
  *  @param[in] terminus_handle - Terminus Handle of the remove PLDM terminus
@@ -391,7 +391,7 @@
  */
 void pldm_entity_association_tree_destroy(pldm_entity_association_tree *tree);
 
-/** @brief Check if input enity node is a parent
+/** @brief Check if input entity node is a parent
  *
  *  @pre node must point to a valid object
  *
@@ -512,7 +512,7 @@
  *  @param[in] terminus_handle - terminus handle of the terminus
  *  @param[in] record_handle - record handle of the PDR
  *
- *  @return 0 on succes, -EINVAL if the provided arguments are invalid.
+ *  @return 0 on success, -EINVAL if the provided arguments are invalid.
  */
 int pldm_entity_association_pdr_add_from_node_with_record_handle(
 	pldm_entity_node *node, pldm_pdr *repo, pldm_entity **entities,
diff --git a/include/libpldm/platform.h b/include/libpldm/platform.h
index ece3ab1..1d34a7a 100644
--- a/include/libpldm/platform.h
+++ b/include/libpldm/platform.h
@@ -58,10 +58,10 @@
 #define PLDM_PLATFORM_EVENT_MESSAGE_EVENT_ID			 2
 #define PLDM_PLATFORM_EVENT_MESSAGE_TRANFER_HANDLE		 4
 
-/* Minumum length of senson event data */
+/* Minimum length of sensor event data */
 #define PLDM_MSG_POLL_EVENT_LENGTH 7
 
-/* Minumum length of senson event data */
+/* Minimum length of sensor event data */
 #define PLDM_SENSOR_EVENT_DATA_MIN_LENGTH			 5
 #define PLDM_SENSOR_EVENT_SENSOR_OP_STATE_DATA_LENGTH		 2
 #define PLDM_SENSOR_EVENT_STATE_SENSOR_STATE_DATA_LENGTH	 3
@@ -453,14 +453,14 @@
 	PLDM_RATE_UNIT_PER_YEAR
 };
 
-/** @brief PLDM respository state */
+/** @brief PLDM repository state */
 enum pldm_repository_state {
 	PLDM_AVAILABLE,
 	PLDM_UPDATE_IN_PROGRESS,
 	PLDM_FAILED
 };
 
-/** @brief PLDM respository data transfer handler timeout */
+/** @brief PLDM repository data transfer handler timeout */
 enum pldm_repository_data_transfer_handler_timeout {
 	PLDM_NO_TIMEOUT,
 	PLDM_DEFALUT_MINIMUM_TIMEOUT
@@ -1809,7 +1809,7 @@
 /** @brief Encode PollForPlatformEventMessage request data
  *  @param[in] instance_id - Message's instance id
  *  @param[in] format_version - Version of the event format
- *  @param[in] transfer_operation_flag - Tranfer operation
+ *  @param[in] transfer_operation_flag - Transfer operation
  *  @param[in] data_transfer_handle - The data transfer handle
  *  @param[in] event_id_to_acknowledge - the event data to acknowleadge
  *  @param[out] msg - Request message
@@ -2117,7 +2117,7 @@
  *      contain numbers_of_change_entries[i] elements.
  *  @param[in] event_data - The eventData will be encoded into this. This entire
  *      structure must be max_change_records_size long. It must be large enough
- *      to accomodate the data to be encoded. The caller is responsible for
+ *      to accommodate the data to be encoded. The caller is responsible for
  *      allocating and deallocating it, including the variable-size
  *      'event_data.change_records' field. If this parameter is NULL,
  *      PLDM_SUCCESS will be returned and actual_change_records_size will be set
diff --git a/src/dsp/firmware_update.c b/src/dsp/firmware_update.c
index 9ebb970..8b4a1ed 100644
--- a/src/dsp/firmware_update.c
+++ b/src/dsp/firmware_update.c
@@ -533,7 +533,7 @@
 		return PLDM_ERROR_INVALID_DATA;
 	}
 
-	// Assuming atleast 1 byte of VendorDefinedDescriptorData
+	// Assuming at least 1 byte of VendorDefinedDescriptorData
 	if (length < (sizeof(struct pldm_vendor_defined_descriptor_title_data) +
 		      entry->vendor_defined_descriptor_title_str_len)) {
 		return PLDM_ERROR_INVALID_LENGTH;
diff --git a/src/dsp/pdr.c b/src/dsp/pdr.c
index 09e87be..d5b3173 100644
--- a/src/dsp/pdr.c
+++ b/src/dsp/pdr.c
@@ -496,7 +496,7 @@
 	assert(start != NULL);
 
 	/* Insert after the the last node that matches the input entity type, or
-	 * at the end if no such match occurrs
+	 * at the end if no such match occurs
 	 */
 	while (start->next_sibling != NULL) {
 		uint16_t this_type = start->entity.entity_type;
@@ -1302,7 +1302,7 @@
 	*entities = l_entities;
 }
 
-/* Find the postion of record in pldm_pdr repo and place new_record in
+/* Find the position of record in pldm_pdr repo and place new_record in
  * the same position.
  */
 static int pldm_pdr_replace_record(pldm_pdr *repo, pldm_pdr_record *record,
diff --git a/src/msgbuf.h b/src/msgbuf.h
index 3dcfa42..37ad470 100644
--- a/src/msgbuf.h
+++ b/src/msgbuf.h
@@ -376,7 +376,7 @@
  * C++ could be less of a headache than the C as we can leverage template
  * functions. An advantage of template functions is that while their definition
  * is driven by instantion, the definition does not appear at the source
- * location of the instantation, which gives it a great leg-up over the problems
+ * location of the instantiation, which gives it a great leg-up over the problems
  * we have in the C path. However, the use of the msgbuf APIs in the test suite
  * still makes things somewhat tricky, as the call-sites in the test suite are
  * wrapped up in EXPECT_*() gtest macros. Ideally we'd implement functions that
@@ -415,7 +415,7 @@
 /**
  * @brief pldm_msgbuf extractor for a uint8_t
  *
- * @param[inout] ctx - pldm_msgbuf context for extractor
+ * @param[in,out] ctx - pldm_msgbuf context for extractor
  * @param[out] dst - destination of extracted value
  *
  * @return PLDM_SUCCESS if buffer accesses were in-bounds,
@@ -1047,8 +1047,8 @@
 /**
  * @brief pldm_msgbuf copy data between two msg buffers
  *
- * @param[inout] src - pldm_msgbuf for source from where value should be copied
- * @param[inout] dst - destination of copy from source
+ * @param[in,out] src - pldm_msgbuf for source from where value should be copied
+ * @param[in,out] dst - destination of copy from source
  * @param[in] size - size of data to be copied
  * @param[in] description - description of data copied
  *
diff --git a/tests/dsp/base.cpp b/tests/dsp/base.cpp
index 5b1fb2c..c95abdf 100644
--- a/tests/dsp/base.cpp
+++ b/tests/dsp/base.cpp
@@ -745,7 +745,7 @@
 
     auto rc =
         encode_cc_only_resp(0 /*instance id*/, 1 /*pldm type*/, 2 /*command*/,
-                            3 /*complection code*/, &responseMsg);
+                            3 /*completion code*/, &responseMsg);
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     auto p = reinterpret_cast<uint8_t*>(&responseMsg);
diff --git a/tests/dsp/bios_table.cpp b/tests/dsp/bios_table.cpp
index 95a9310..cee4a86 100644
--- a/tests/dsp/bios_table.cpp
+++ b/tests/dsp/bios_table.cpp
@@ -46,7 +46,7 @@
         2, 0, /* possible value handle */
         3, 0, /* possible value handle */
         1,    /* number of default value */
-        0     /* defaut value string handle index */
+        0     /* default value string handle index */
     };
     auto entry =
         reinterpret_cast<struct pldm_bios_attr_table_entry*>(enumEntry.data());
@@ -68,7 +68,7 @@
         2, 0, /* possible value handle */
         3, 0, /* possible value handle */
         1,    /* number of default value */
-        1     /* defaut value string handle index */
+        1     /* default value string handle index */
     };
 
     auto entry =
@@ -152,7 +152,7 @@
         2, 0, /* possible value handle */
         3, 0, /* possible value handle */
         1,    /* number of default value */
-        0     /* defaut value string handle index */
+        0     /* default value string handle index */
     };
 
     std::vector<uint16_t> pv_hdls{2, 3};
@@ -264,7 +264,7 @@
         1,   0,        /* min string length */
         100, 0,        /* max string length */
         3,   0,        /* default string length */
-        'a', 'b', 'c', /* defaul string */
+        'a', 'b', 'c', /* default string */
     };
 
     struct pldm_bios_table_attr_entry_string_info info = {
@@ -352,7 +352,7 @@
         1,  0, 0, 0, 0, 0, 0, 0, /* lower bound */
         10, 0, 0, 0, 0, 0, 0, 0, /* upper bound */
         2,  0, 0, 0,             /* scalar increment */
-        3,  0, 0, 0, 0, 0, 0, 0, /* defaut value */
+        3,  0, 0, 0, 0, 0, 0, 0, /* default value */
     };
 
     std::vector<uint16_t> pv_hdls{2, 3};
@@ -363,7 +363,7 @@
         false, /* read only */
         1,     /* lower bound */
         10,    /* upper bound */
-        2,     /* sacalar increment */
+        2,     /* scalar increment */
         3      /* default value */
     };
     auto encodeLength = pldm_bios_table_attr_entry_integer_encode_length();
@@ -416,7 +416,7 @@
         1,  0, 0, 0, 0, 0, 0, 0, /* lower bound */
         10, 0, 0, 0, 0, 0, 0, 0, /* upper bound */
         2,  0, 0, 0,             /* scalar increment */
-        3,  0, 0, 0, 0, 0, 0, 0, /* defaut value */
+        3,  0, 0, 0, 0, 0, 0, 0, /* default value */
     };
 
     uint64_t lower;
@@ -443,7 +443,7 @@
         2, 0, /* possible value handle */
         3, 0, /* possible value handle */
         1,    /* number of default value */
-        0     /* defaut value string handle index */
+        0     /* default value string handle index */
     };
     std::vector<uint8_t> stringEntry{
         1,   0,       /* attr handle */
@@ -462,7 +462,7 @@
         1,  0, 0, 0, 0, 0, 0, 0, /* lower bound */
         10, 0, 0, 0, 0, 0, 0, 0, /* upper bound */
         2,  0, 0, 0,             /* scalar increment */
-        3,  0, 0, 0, 0, 0, 0, 0, /* defaut value */
+        3,  0, 0, 0, 0, 0, 0, 0, /* default value */
     };
 
     Table table;
@@ -503,7 +503,7 @@
         2, 0, /* possible value handle */
         3, 0, /* possible value handle */
         1,    /* number of default value */
-        0     /* defaut value string handle index */
+        0     /* default value string handle index */
     };
     std::vector<uint8_t> stringEntry{
         1,   0,       /* attr handle */
@@ -522,7 +522,7 @@
         1,  0, 0, 0, 0, 0, 0, 0, /* lower bound */
         10, 0, 0, 0, 0, 0, 0, 0, /* upper bound */
         2,  0, 0, 0,             /* scalar increment */
-        3,  0, 0, 0, 0, 0, 0, 0, /* defaut value */
+        3,  0, 0, 0, 0, 0, 0, 0, /* default value */
     };
 
     Table table;
@@ -659,7 +659,7 @@
         0,   0,        /* attr handle */
         1,             /* attr type */
         3,   0,        /* current string length */
-        'a', 'b', 'c', /* defaut value string handle index */
+        'a', 'b', 'c', /* default value string handle index */
     };
 
     auto length = pldm_bios_table_attr_value_entry_encode_string_length(3);
@@ -702,7 +702,7 @@
         0,   0,        /* attr handle */
         1,             /* attr type */
         3,   0,        /* current string length */
-        'a', 'b', 'c', /* defaut value string handle index */
+        'a', 'b', 'c', /* default value string handle index */
     };
 
     auto entry = reinterpret_cast<struct pldm_bios_attr_val_table_entry*>(
@@ -795,7 +795,7 @@
         0,   0,        /* attr handle */
         1,             /* attr type */
         3,   0,        /* current string length */
-        'a', 'b', 'c', /* defaut value string handle index */
+        'a', 'b', 'c', /* default value string handle index */
     };
     std::vector<uint8_t> integerEntry{
         0,  0,                   /* attr handle */
@@ -851,7 +851,7 @@
         1,   0,        /* attr handle */
         1,             /* attr type */
         3,   0,        /* current string length */
-        'a', 'b', 'c', /* defaut value string handle index */
+        'a', 'b', 'c', /* default value string handle index */
     };
     std::vector<uint8_t> integerEntry{
         2,  0,                   /* attr handle */
@@ -900,7 +900,7 @@
         1,   0,        /* attr handle */
         1,             /* attr type */
         3,   0,        /* current string length */
-        'a', 'b', 'c', /* defaut value string handle index */
+        'a', 'b', 'c', /* default value string handle index */
     };
     std::vector<uint8_t> integerEntry{
         2,  0,                   /* attr handle */
@@ -915,7 +915,7 @@
         1,   0,        /* attr handle */
         1,             /* attr type */
         3,   0,        /* current string length */
-        'd', 'e', 'f', /* defaut value string handle index */
+        'd', 'e', 'f', /* default value string handle index */
     };
 
     Table expectTable;
@@ -935,7 +935,7 @@
         1,   0,                  /* attr handle */
         1,                       /* attr type */
         5,   0,                  /* current string length */
-        'd', 'e', 'f', 'a', 'b', /* defaut value string handle index */
+        'd', 'e', 'f', 'a', 'b', /* default value string handle index */
     };
     expectTable.resize(0);
     buildTable(expectTable, enumEntry, stringEntry2, integerEntry);
@@ -953,7 +953,7 @@
         1,   0, /* attr handle */
         1,      /* attr type */
         1,   0, /* current string length */
-        'd',    /* defaut value string handle index */
+        'd',    /* default value string handle index */
     };
     expectTable.resize(0);
     buildTable(expectTable, enumEntry, stringEntry3, integerEntry);
diff --git a/tests/dsp/bios_table_iter.c b/tests/dsp/bios_table_iter.c
index 5e187b4..a3228fc 100644
--- a/tests/dsp/bios_table_iter.c
+++ b/tests/dsp/bios_table_iter.c
@@ -36,7 +36,7 @@
 
     /*
      * We expect the test configuration to claim the iterator has reached the
-     * end beause the there's no entry length descriptor for the
+     * end because the there's no entry length descriptor for the
      * PLDM_BIOS_PASSWORD entry type. By the attr_able_entry_length()
      * implementation this would normally trigger an assert() to uphold that the
      * necessary pointers are not NULL. However, we've defined NDEBUG above and
diff --git a/tests/dsp/firmware_update.cpp b/tests/dsp/firmware_update.cpp
index 24bde16..ce494a9 100644
--- a/tests/dsp/firmware_update.cpp
+++ b/tests/dsp/firmware_update.cpp
@@ -1490,7 +1490,7 @@
 #ifdef LIBPLDM_API_TESTING
 TEST(QueryDownstreamIdentifiers, goodPathDecodeResponse)
 {
-    // Len is not fixed here taking it as 9, constains 1 downstream device with
+    // Len is not fixed here taking it as 9, contains 1 downstream device with
     // 1 descriptor
     constexpr uint32_t downstreamDevicesLen = 9;
     constexpr uint8_t complition_code_resp = PLDM_SUCCESS;
@@ -1582,7 +1582,7 @@
 #ifdef LIBPLDM_API_TESTING
 TEST(QueryDownstreamIdentifiers, decodeRequestErrorDownstreamDevicesSize)
 {
-    // Len is not fixed here taking it as 9, constains 1 downstream device with
+    // Len is not fixed here taking it as 9, contains 1 downstream device with
     // 1 descriptor
     constexpr uint32_t actualDownstreamDevicesLen = 9;
     constexpr uint8_t complition_code_resp = PLDM_SUCCESS;
diff --git a/tests/dsp/platform.cpp b/tests/dsp/platform.cpp
index 9002404..51b68a2 100644
--- a/tests/dsp/platform.cpp
+++ b/tests/dsp/platform.cpp
@@ -2134,7 +2134,7 @@
         eventData{
             0x1,                   // version
             0x88, 0x77,            // Event Id
-            0x44, 0x33, 0x22, 0x11 // Tranfer Handle
+            0x44, 0x33, 0x22, 0x11 // Transfer Handle
         };
 
     uint8_t formatVersion = 0x01;
@@ -2166,7 +2166,7 @@
         eventData{
             0x1,                   // version
             0x88, 0x77,            // Event Id
-            0x44, 0x33, 0x22, 0x11 // Tranfer Handle
+            0x44, 0x33, 0x22, 0x11 // Transfer Handle
         };
 
     uint8_t retFormatVersion;