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: I539a0c5baa63be240fc1c76367c0af338dd89c7b
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
diff --git a/libpldmresponder/bios_attribute.cpp b/libpldmresponder/bios_attribute.cpp
index ccd2a71..7ae6af7 100644
--- a/libpldmresponder/bios_attribute.cpp
+++ b/libpldmresponder/bios_attribute.cpp
@@ -40,7 +40,7 @@
}
catch (const std::exception&)
{
- // No action required, dBusMap whill have no value
+ // No action required, dBusMap will have no value
}
}
diff --git a/libpldmresponder/bios_config.cpp b/libpldmresponder/bios_config.cpp
index 82b3dfe..9883075 100644
--- a/libpldmresponder/bios_config.cpp
+++ b/libpldmresponder/bios_config.cpp
@@ -1079,7 +1079,7 @@
}
}
- throw std::invalid_argument("Unknow attribute Name");
+ throw std::invalid_argument("Unknown attribute Name");
}
void BIOSConfig::constructPendingAttribute(
diff --git a/libpldmresponder/bios_integer_attribute.cpp b/libpldmresponder/bios_integer_attribute.cpp
index 8c343c7..058df1b 100644
--- a/libpldmresponder/bios_integer_attribute.cpp
+++ b/libpldmresponder/bios_integer_attribute.cpp
@@ -37,7 +37,7 @@
if (rc != PLDM_SUCCESS)
{
error(
- "Wrong field for integer attribute '{ATTRIBUTE}', error '{ERROR}', lower bound '{LOW_BOUND}', upper bound '{UPPER_BOUND}', default value '{DEFAULT_VALUE}' and scalar increament '{SCALAR_INCREMENT}'",
+ "Wrong field for integer attribute '{ATTRIBUTE}', error '{ERROR}', lower bound '{LOW_BOUND}', upper bound '{UPPER_BOUND}', default value '{DEFAULT_VALUE}' and scalar increment '{SCALAR_INCREMENT}'",
"ATTRIBUTE", attr, "ERROR", errmsg, "LOW_BOUND",
integerInfo.lowerBound, "UPPER_BOUND", integerInfo.upperBound,
"DEFAULT_VALUE", integerInfo.defaultValue, "SCALAR_INCREMENT",
diff --git a/libpldmresponder/event_parser.hpp b/libpldmresponder/event_parser.hpp
index 471c151..5489591 100644
--- a/libpldmresponder/event_parser.hpp
+++ b/libpldmresponder/event_parser.hpp
@@ -86,7 +86,7 @@
StateSensorHandler() = delete;
/** @brief Parse the event state sensor configuration JSON file and build
- * the lookup data stucture.
+ * the lookup data structure.
*
* @param[in] dirPath - directory path which has the config JSONs
*/
diff --git a/libpldmresponder/examples/bios/integer_attrs.json b/libpldmresponder/examples/bios/integer_attrs.json
index aecc26d..672c440 100644
--- a/libpldmresponder/examples/bios/integer_attrs.json
+++ b/libpldmresponder/examples/bios/integer_attrs.json
@@ -23,7 +23,7 @@
"default_value": 2
},
{
- // This atttribute has invalid default value or scalar_increment, when
+ // This attribute has invalid default value or scalar_increment, when
// scalar_increment=2 and lower_bound=1, default_value must be 1, 3, 5...
"attribute_name": "INTEGER_INVALID_CASE",
"lower_bound": 1,
diff --git a/libpldmresponder/fru.cpp b/libpldmresponder/fru.cpp
index be8f573..0eb3d33 100644
--- a/libpldmresponder/fru.cpp
+++ b/libpldmresponder/fru.cpp
@@ -66,7 +66,7 @@
std::string s = tmpObj.top();
tmpObj.pop();
}
- // Update pldm entity to assocition tree
+ // Update pldm entity to association tree
std::string prePath = tmpObjPaths.top();
while (!tmpObjPaths.empty())
{
@@ -245,7 +245,7 @@
}
catch (const std::exception& e)
{
- error("Failed to make a d-bus call Asociation, error - {ERROR}",
+ error("Failed to make a d-bus call Association, error - {ERROR}",
"ERROR", e);
return {};
}
diff --git a/libpldmresponder/fru_parser.hpp b/libpldmresponder/fru_parser.hpp
index f9be6f3..9e59f11 100644
--- a/libpldmresponder/fru_parser.hpp
+++ b/libpldmresponder/fru_parser.hpp
@@ -124,7 +124,7 @@
*/
void setupDefaultDBusLookup(const std::filesystem::path& fruMasterJsonPath);
- /** @brief Build the default FRU record informations
+ /** @brief Build the default FRU record information
*/
void setupDefaultFruRecordMap();
diff --git a/libpldmresponder/oem_handler.hpp b/libpldmresponder/oem_handler.hpp
index 3b14ea8..68c844b 100644
--- a/libpldmresponder/oem_handler.hpp
+++ b/libpldmresponder/oem_handler.hpp
@@ -28,7 +28,7 @@
* equal to composite sensor count in number
*
* @return - Success or failure in getting the states. Returns failure in
- * terms of PLDM completion codes if fetching atleast one state
+ * terms of PLDM completion codes if fetching at least one state
* fails
*/
virtual int getOemStateSensorReadingsHandler(
@@ -51,7 +51,7 @@
* @param[in] effecterId - Effecter id
*
* @return - Success or failure in setting the states.Returns failure in
- * terms of PLDM completion codes if atleast one state fails to
+ * terms of PLDM completion codes if at least one state fails to
* be set
*/
virtual int oemSetStateEffecterStatesHandler(
diff --git a/libpldmresponder/platform.hpp b/libpldmresponder/platform.hpp
index b045d84..e43058e 100644
--- a/libpldmresponder/platform.hpp
+++ b/libpldmresponder/platform.hpp
@@ -320,7 +320,7 @@
* @param[in] stateField - The state field data for each of the states,
* equal to composite effecter count in number
* @return - Success or failure in setting the states. Returns failure in
- * terms of PLDM completion codes if atleast one state fails to be set
+ * terms of PLDM completion codes if at least one state fails to be set
*/
template <class DBusInterface>
int setStateEffecterStatesHandler(
diff --git a/libpldmresponder/platform_numeric_effecter.hpp b/libpldmresponder/platform_numeric_effecter.hpp
index 274357c..86f72c9 100644
--- a/libpldmresponder/platform_numeric_effecter.hpp
+++ b/libpldmresponder/platform_numeric_effecter.hpp
@@ -242,7 +242,7 @@
* @param[in] effecterValueLength - The setting value length of numeric
* effecter being requested.
* @return - Success or failure in setting the states. Returns failure in
- * terms of PLDM completion codes if atleast one state fails to be set
+ * terms of PLDM completion codes if at least one state fails to be set
*/
template <class DBusInterface, class Handler>
int setNumericEffecterValueHandler(const DBusInterface& dBusIntf,
@@ -344,7 +344,7 @@
* @param[in] PropertyValue - D-Bus Value
* @param[in] effecterDataSize - effecter value size.
* @param[in,out] responsePtr - Response of getNumericEffecterValue.
- * @param[in] responsePayloadLength - reponse length.
+ * @param[in] responsePayloadLength - response length.
* @param[in] instanceId - instance id for response
*
* @return PLDM_SUCCESS/PLDM_ERROR
@@ -427,7 +427,7 @@
* @param[in] PropertyValue - Variant contains the D-Bus Value
* @param[in] effecterDataSize - effecter value size.
* @param[in,out] responsePtr - Response of getNumericEffecterValue.
- * @param[in] responsePayloadLength - reponse length.
+ * @param[in] responsePayloadLength - response length.
* @param[in] instanceId - instance id for response
*
* @return PLDM_SUCCESS/PLDM_ERROR
diff --git a/libpldmresponder/platform_state_effecter.hpp b/libpldmresponder/platform_state_effecter.hpp
index 201b283..106cbc1 100644
--- a/libpldmresponder/platform_state_effecter.hpp
+++ b/libpldmresponder/platform_state_effecter.hpp
@@ -32,7 +32,7 @@
* @param[in] stateField - The state field data for each of the states,
* equal to composite effecter count in number
* @return - Success or failure in setting the states. Returns failure in
- * terms of PLDM completion codes if atleast one state fails to be set
+ * terms of PLDM completion codes if at least one state fails to be set
*/
template <class DBusInterface, class Handler>
int setStateEffecterStatesHandler(
diff --git a/libpldmresponder/platform_state_sensor.hpp b/libpldmresponder/platform_state_sensor.hpp
index 4fab000..d0276e5 100644
--- a/libpldmresponder/platform_state_sensor.hpp
+++ b/libpldmresponder/platform_state_sensor.hpp
@@ -75,7 +75,7 @@
* @param[out] stateField - The state field data for each of the states,
* equal to composite sensor count in number
* @return - Success or failure in setting the states. Returns failure in
- * terms of PLDM completion codes if atleast one state fails to be set
+ * terms of PLDM completion codes if at least one state fails to be set
*/
template <class DBusInterface, class Handler>
int getStateSensorReadingsHandler(
diff --git a/libpldmresponder/test/libpldmresponder_bios_config_test.cpp b/libpldmresponder/test/libpldmresponder_bios_config_test.cpp
index 5c0e779..ea29015 100644
--- a/libpldmresponder/test/libpldmresponder_bios_config_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_bios_config_test.cpp
@@ -27,7 +27,7 @@
class TestBIOSConfig : public ::testing::Test
{
public:
- static void SetUpTestCase() // will execute once at the begining of all
+ static void SetUpTestCase() // will execute once at the beginning of all
// TestBIOSConfig objects
{
char tmpdir[] = "/tmp/BIOSTables.XXXXXX";
@@ -305,7 +305,7 @@
0, 0, /* attr handle */
1, /* attr type string read-write */
4, 0, /* current string length */
- 'a', 'b', 'c', 'd', /* defaut value string handle index */
+ 'a', 'b', 'c', 'd', /* default value string handle index */
};
uint16_t attrHandle{10};
@@ -351,7 +351,7 @@
0, 0, /* attr handle */
1, /* attr type string read-write */
4, 0, /* current string length */
- 'a', 'b', 'c', 'd', /* defaut value string handle index */
+ 'a', 'b', 'c', 'd', /* default value string handle index */
};
attrValueEntry[0] = attrHandle & 0xff;
diff --git a/libpldmresponder/test/libpldmresponder_bios_enum_attribute_test.cpp b/libpldmresponder/test/libpldmresponder_bios_enum_attribute_test.cpp
index 98161a0..1521fcb 100644
--- a/libpldmresponder/test/libpldmresponder_bios_enum_attribute_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_bios_enum_attribute_test.cpp
@@ -109,7 +109,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 */
};
std::vector<uint8_t> expectedAttrValueEntry{
@@ -214,7 +214,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 */
};
ON_CALL(biosStringTable, findString(2))
diff --git a/libpldmresponder/test/libpldmresponder_bios_integer_attribute_test.cpp b/libpldmresponder/test/libpldmresponder_bios_integer_attribute_test.cpp
index f016649..6d4026a 100644
--- a/libpldmresponder/test/libpldmresponder_bios_integer_attribute_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_bios_integer_attribute_test.cpp
@@ -107,7 +107,7 @@
1, 0, 0, 0, 0, 0, 0, 0, /* lower bound */
15, 0, 0, 0, 0, 0, 0, 0, /* upper bound */
1, 0, 0, 0, /* scalar increment */
- 2, 0, 0, 0, 0, 0, 0, 0, /* defaut value */
+ 2, 0, 0, 0, 0, 0, 0, 0, /* default value */
};
std::vector<uint8_t> expectedAttrValueEntry{
0, 0, /* attr handle */
diff --git a/libpldmresponder/test/libpldmresponder_bios_string_attribute_test.cpp b/libpldmresponder/test/libpldmresponder_bios_string_attribute_test.cpp
index 06c1f6c..08c8ea7 100644
--- a/libpldmresponder/test/libpldmresponder_bios_string_attribute_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_bios_string_attribute_test.cpp
@@ -103,7 +103,7 @@
0, 0, /* attr handle */
0x81, /* attr type string read-only */
3, 0, /* current string length */
- 'a', 'b', 'c', /* defaut value string handle index */
+ 'a', 'b', 'c', /* default value string handle index */
};
ON_CALL(biosStringTable, findHandle(StrEq("str_example1")))
@@ -154,7 +154,7 @@
0, 0, /* attr handle */
1, /* attr type string read-write */
4, 0, /* current string length */
- 'a', 'b', 'c', 'd', /* defaut value string handle index */
+ 'a', 'b', 'c', 'd', /* default value string handle index */
};
checkConstructEntry(stringReadWrite, biosStringTable, expectedAttrEntry,
@@ -191,7 +191,7 @@
0, 0, /* attr handle */
1, /* attr type string read-write */
4, 0, /* current string length */
- 'a', 'b', 'c', 'd', /* defaut value string handle index */
+ 'a', 'b', 'c', 'd', /* default value string handle index */
};
auto entry = reinterpret_cast<pldm_bios_attr_val_table_entry*>(
attrValueEntry.data());
diff --git a/libpldmresponder/test/libpldmresponder_systemspecific_bios_test.cpp b/libpldmresponder/test/libpldmresponder_systemspecific_bios_test.cpp
index 1b84204..0c7cc8c 100644
--- a/libpldmresponder/test/libpldmresponder_systemspecific_bios_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_systemspecific_bios_test.cpp
@@ -27,7 +27,7 @@
class TestSystemSpecificBIOSConfig : public ::testing::Test
{
public:
- static void SetUpTestCase() // will execute once at the begining of all
+ static void SetUpTestCase() // will execute once at the beginning of all
// TestSystemSpecificBIOSConfig objects
{
char tmpdir[] = "/tmp/BIOSTables.XXXXXX";
@@ -386,7 +386,7 @@
0, 0, /* attr handle */
1, /* attr type string read-write */
4, 0, /* current string length */
- 'a', 'b', 'c', 'd', /* defaut value string handle index */
+ 'a', 'b', 'c', 'd', /* default value string handle index */
};
uint16_t attrHandle{10};
@@ -395,7 +395,7 @@
auto rc = biosConfig.setAttrValue(attrValueEntry.data(),
attrValueEntry.size(), false);
- std::cout << "Error in settig Attribute " << rc << std::endl;
+ std::cout << "Error in setting Attribute " << rc << std::endl;
EXPECT_EQ(rc, PLDM_BIOS_TABLE_UNAVAILABLE);
}
@@ -436,7 +436,7 @@
0, 0, /* attr handle */
1, /* attr type string read-write */
4, 0, /* current string length */
- 'a', 'b', 'c', 'd', /* defaut value string handle index */
+ 'a', 'b', 'c', 'd', /* default value string handle index */
};
attrValueEntry[0] = attrHandle & 0xff;