From c1f0856adb443bf346d65e92acfda00e1a65c11c Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Mon, 27 Apr 2020 12:59:24 -0700 Subject: [PATCH] [style] remove const from uint16_t function/method params (#4901) --- examples/platforms/cc1352/radio.c | 6 +++--- examples/platforms/cc2538/radio.c | 6 +++--- examples/platforms/cc2650/radio.c | 6 +++--- examples/platforms/cc2652/radio.c | 6 +++--- examples/platforms/gp712/radio.c | 4 ++-- examples/platforms/gp712/radio_qorvo.h | 4 ++-- examples/platforms/jn5189/radio.c | 4 ++-- examples/platforms/kw41z/radio.c | 4 ++-- examples/platforms/nrf528xx/src/radio.c | 4 ++-- examples/platforms/qpg6095/radio.c | 4 ++-- examples/platforms/qpg6095/radio_qorvo.h | 4 ++-- examples/platforms/samr21/radio.c | 4 ++-- src/core/api/link_raw_api.cpp | 4 ++-- src/lib/spinel/radio_spinel.hpp | 4 ++-- src/lib/spinel/radio_spinel_impl.hpp | 4 ++-- tests/fuzz/fuzzer_platform.cpp | 4 ++-- tests/unit/test_platform.cpp | 4 ++-- 17 files changed, 38 insertions(+), 38 deletions(-) diff --git a/examples/platforms/cc1352/radio.c b/examples/platforms/cc1352/radio.c index a271f82d0..b8beabb39 100644 --- a/examples/platforms/cc1352/radio.c +++ b/examples/platforms/cc1352/radio.c @@ -458,7 +458,7 @@ static uint_fast8_t rfCoreModifySourceMatchEntry(uint8_t aEntryNo, cc1352_addres * @return The index where the address was found. * @retval CC1352_SRC_MATCH_NONE The address was not found. */ -static uint8_t rfCoreFindShortSrcMatchIdx(const uint16_t aAddress) +static uint8_t rfCoreFindShortSrcMatchIdx(uint16_t aAddress) { uint8_t i; uint8_t ret = CC1352_SRC_MATCH_NONE; @@ -1509,7 +1509,7 @@ void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable) /** * Function documented in platform/radio.h */ -otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); @@ -1543,7 +1543,7 @@ exit: /** * Function documented in platform/radio.h */ -otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); diff --git a/examples/platforms/cc2538/radio.c b/examples/platforms/cc2538/radio.c index 9aff8f16e..cd2b35125 100644 --- a/examples/platforms/cc2538/radio.c +++ b/examples/platforms/cc2538/radio.c @@ -875,7 +875,7 @@ uint32_t getSrcMatchEntriesEnableStatus(bool aShort) return status; } -int8_t findSrcMatchShortEntry(const uint16_t aShortAddress) +int8_t findSrcMatchShortEntry(uint16_t aShortAddress) { int8_t entry = -1; uint16_t shortAddr; @@ -1036,7 +1036,7 @@ void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable) } } -otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); @@ -1086,7 +1086,7 @@ exit: return error; } -otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); diff --git a/examples/platforms/cc2650/radio.c b/examples/platforms/cc2650/radio.c index 30124a51c..09d45d6fa 100644 --- a/examples/platforms/cc2650/radio.c +++ b/examples/platforms/cc2650/radio.c @@ -432,7 +432,7 @@ static uint_fast8_t rfCoreModifySourceMatchEntry(uint8_t aEntryNo, cc2650_addres * @return The index where the address was found. * @retval CC2650_SRC_MATCH_NONE The address was not found. */ -static uint8_t rfCoreFindShortSrcMatchIdx(const uint16_t aAddress) +static uint8_t rfCoreFindShortSrcMatchIdx(uint16_t aAddress) { uint8_t i; uint8_t ret = CC2650_SRC_MATCH_NONE; @@ -1460,7 +1460,7 @@ void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable) /** * Function documented in platform/radio.h */ -otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); @@ -1494,7 +1494,7 @@ exit: /** * Function documented in platform/radio.h */ -otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); diff --git a/examples/platforms/cc2652/radio.c b/examples/platforms/cc2652/radio.c index 6dfba4286..345c234f0 100644 --- a/examples/platforms/cc2652/radio.c +++ b/examples/platforms/cc2652/radio.c @@ -457,7 +457,7 @@ static uint_fast8_t rfCoreModifySourceMatchEntry(uint8_t aEntryNo, cc2652_addres * @return The index where the address was found. * @retval CC2652_SRC_MATCH_NONE The address was not found. */ -static uint8_t rfCoreFindShortSrcMatchIdx(const uint16_t aAddress) +static uint8_t rfCoreFindShortSrcMatchIdx(uint16_t aAddress) { uint8_t i; uint8_t ret = CC2652_SRC_MATCH_NONE; @@ -1490,7 +1490,7 @@ void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable) /** * Function documented in platform/radio.h */ -otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); @@ -1524,7 +1524,7 @@ exit: /** * Function documented in platform/radio.h */ -otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); diff --git a/examples/platforms/gp712/radio.c b/examples/platforms/gp712/radio.c index f10b5f8aa..faa5c6501 100644 --- a/examples/platforms/gp712/radio.c +++ b/examples/platforms/gp712/radio.c @@ -274,7 +274,7 @@ void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable) qorvoRadioEnableSrcMatch(aEnable); } -otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); @@ -288,7 +288,7 @@ otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const otExtAddress return qorvoRadioAddSrcMatchExtEntry(aExtAddress->m8, otCachedSettings.panid); } -otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); diff --git a/examples/platforms/gp712/radio_qorvo.h b/examples/platforms/gp712/radio_qorvo.h index 91144ef89..0749ee16e 100644 --- a/examples/platforms/gp712/radio_qorvo.h +++ b/examples/platforms/gp712/radio_qorvo.h @@ -144,7 +144,7 @@ void qorvoRadioClearSrcMatchEntries(void); * @param[in] panid The panid. * */ -otError qorvoRadioAddSrcMatchShortEntry(const uint16_t aShortAddress, uint16_t panid); +otError qorvoRadioAddSrcMatchShortEntry(uint16_t aShortAddress, uint16_t panid); /** * This function adds an extended address plus panid to the source address match list. @@ -162,7 +162,7 @@ otError qorvoRadioAddSrcMatchExtEntry(const uint8_t *aExtAddress, uint16_t panid * @param[in] panid The panid. * */ -otError qorvoRadioClearSrcMatchShortEntry(const uint16_t aShortAddress, uint16_t panid); +otError qorvoRadioClearSrcMatchShortEntry(uint16_t aShortAddress, uint16_t panid); /** * This function removes an extended address plus panid from the source address match list. diff --git a/examples/platforms/jn5189/radio.c b/examples/platforms/jn5189/radio.c index 85545cefe..1acc33912 100755 --- a/examples/platforms/jn5189/radio.c +++ b/examples/platforms/jn5189/radio.c @@ -438,7 +438,7 @@ void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable) sIsFpEnabled = aEnable; } -otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); @@ -483,7 +483,7 @@ otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const otExtAddress return error; } -otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); diff --git a/examples/platforms/kw41z/radio.c b/examples/platforms/kw41z/radio.c index 4baa4433e..ec4b3219f 100644 --- a/examples/platforms/kw41z/radio.c +++ b/examples/platforms/kw41z/radio.c @@ -283,7 +283,7 @@ void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable) } } -otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); @@ -301,7 +301,7 @@ otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const otExtAddress return rf_add_addr_table_entry(checksum, true); } -otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); diff --git a/examples/platforms/nrf528xx/src/radio.c b/examples/platforms/nrf528xx/src/radio.c index a9cec0cd5..dde635134 100644 --- a/examples/platforms/nrf528xx/src/radio.c +++ b/examples/platforms/nrf528xx/src/radio.c @@ -453,7 +453,7 @@ void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable) nrf_802154_auto_pending_bit_set(aEnable); } -otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); @@ -492,7 +492,7 @@ otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const otExtAddress return error; } -otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); diff --git a/examples/platforms/qpg6095/radio.c b/examples/platforms/qpg6095/radio.c index 61a82a2ac..237621438 100644 --- a/examples/platforms/qpg6095/radio.c +++ b/examples/platforms/qpg6095/radio.c @@ -263,7 +263,7 @@ void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable) qorvoRadioEnableSrcMatch(aEnable); } -otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); return qorvoRadioAddSrcMatchShortEntry(aShortAddress, otCachedSettings.panid); @@ -275,7 +275,7 @@ otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const otExtAddress return qorvoRadioAddSrcMatchExtEntry(aExtAddress->m8, otCachedSettings.panid); } -otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); return qorvoRadioClearSrcMatchShortEntry(aShortAddress, otCachedSettings.panid); diff --git a/examples/platforms/qpg6095/radio_qorvo.h b/examples/platforms/qpg6095/radio_qorvo.h index 84c56bb0d..678a09660 100644 --- a/examples/platforms/qpg6095/radio_qorvo.h +++ b/examples/platforms/qpg6095/radio_qorvo.h @@ -143,7 +143,7 @@ void qorvoRadioClearSrcMatchEntries(void); * @param[in] panid The panid. * */ -otError qorvoRadioAddSrcMatchShortEntry(const uint16_t aShortAddress, uint16_t panid); +otError qorvoRadioAddSrcMatchShortEntry(uint16_t aShortAddress, uint16_t panid); /** * This function adds an extended address plus panid to the source address match list. @@ -161,7 +161,7 @@ otError qorvoRadioAddSrcMatchExtEntry(const uint8_t *aExtAddress, uint16_t panid * @param[in] panid The panid. * */ -otError qorvoRadioClearSrcMatchShortEntry(const uint16_t aShortAddress, uint16_t panid); +otError qorvoRadioClearSrcMatchShortEntry(uint16_t aShortAddress, uint16_t panid); /** * This function removes an extended address plus panid from the source address match list. diff --git a/examples/platforms/samr21/radio.c b/examples/platforms/samr21/radio.c index 1f951e18b..b38011c7d 100644 --- a/examples/platforms/samr21/radio.c +++ b/examples/platforms/samr21/radio.c @@ -586,7 +586,7 @@ void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable) OT_UNUSED_VARIABLE(aEnable); } -otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { return OT_ERROR_NOT_IMPLEMENTED; } @@ -596,7 +596,7 @@ otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const otExtAddress return OT_ERROR_NOT_IMPLEMENTED; } -otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { return OT_ERROR_NOT_IMPLEMENTED; } diff --git a/src/core/api/link_raw_api.cpp b/src/core/api/link_raw_api.cpp index 53606e614..0db29bd2c 100644 --- a/src/core/api/link_raw_api.cpp +++ b/src/core/api/link_raw_api.cpp @@ -140,7 +140,7 @@ exit: return error; } -otError otLinkRawSrcMatchAddShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otLinkRawSrcMatchAddShortEntry(otInstance *aInstance, uint16_t aShortAddress) { otError error = OT_ERROR_NONE; Instance &instance = *static_cast(aInstance); @@ -168,7 +168,7 @@ exit: return error; } -otError otLinkRawSrcMatchClearShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otLinkRawSrcMatchClearShortEntry(otInstance *aInstance, uint16_t aShortAddress) { otError error = OT_ERROR_NONE; Instance &instance = *static_cast(aInstance); diff --git a/src/lib/spinel/radio_spinel.hpp b/src/lib/spinel/radio_spinel.hpp index 9fe0c0156..bb12a0460 100644 --- a/src/lib/spinel/radio_spinel.hpp +++ b/src/lib/spinel/radio_spinel.hpp @@ -354,7 +354,7 @@ public: * @retval OT_ERROR_RESPONSE_TIMEOUT Failed due to no response received from the transceiver. * @retval OT_ERROR_NO_BUFS No available entry in the source match table. */ - otError AddSrcMatchShortEntry(const uint16_t aShortAddress); + otError AddSrcMatchShortEntry(uint16_t aShortAddress); /** * This method removes a short address from the source address match table. @@ -367,7 +367,7 @@ public: * @retval OT_ERROR_RESPONSE_TIMEOUT Failed due to no response received from the transceiver. * @retval OT_ERROR_NO_ADDRESS The short address is not in source address match table. */ - otError ClearSrcMatchShortEntry(const uint16_t aShortAddress); + otError ClearSrcMatchShortEntry(uint16_t aShortAddress); /** * Clear all short addresses from the source address match table. diff --git a/src/lib/spinel/radio_spinel_impl.hpp b/src/lib/spinel/radio_spinel_impl.hpp index f32a07f56..1034ac1f0 100644 --- a/src/lib/spinel/radio_spinel_impl.hpp +++ b/src/lib/spinel/radio_spinel_impl.hpp @@ -1051,7 +1051,7 @@ otError RadioSpinel::EnableSrcMatch(bool aEna } template -otError RadioSpinel::AddSrcMatchShortEntry(const uint16_t aShortAddress) +otError RadioSpinel::AddSrcMatchShortEntry(uint16_t aShortAddress) { return Insert(SPINEL_PROP_MAC_SRC_MATCH_SHORT_ADDRESSES, SPINEL_DATATYPE_UINT16_S, aShortAddress); } @@ -1063,7 +1063,7 @@ otError RadioSpinel::AddSrcMatchExtEntry(cons } template -otError RadioSpinel::ClearSrcMatchShortEntry(const uint16_t aShortAddress) +otError RadioSpinel::ClearSrcMatchShortEntry(uint16_t aShortAddress) { return Remove(SPINEL_PROP_MAC_SRC_MATCH_SHORT_ADDRESSES, SPINEL_DATATYPE_UINT16_S, aShortAddress); } diff --git a/tests/fuzz/fuzzer_platform.cpp b/tests/fuzz/fuzzer_platform.cpp index 1e29011c2..72ebfb56a 100644 --- a/tests/fuzz/fuzzer_platform.cpp +++ b/tests/fuzz/fuzzer_platform.cpp @@ -356,7 +356,7 @@ void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable) OT_UNUSED_VARIABLE(aEnable); } -otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); OT_UNUSED_VARIABLE(aShortAddress); @@ -370,7 +370,7 @@ otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const otExtAddress return OT_ERROR_NONE; } -otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); OT_UNUSED_VARIABLE(aShortAddress); diff --git a/tests/unit/test_platform.cpp b/tests/unit/test_platform.cpp index 5beb3163a..ad51f46ae 100644 --- a/tests/unit/test_platform.cpp +++ b/tests/unit/test_platform.cpp @@ -347,7 +347,7 @@ void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable) OT_UNUSED_VARIABLE(aEnable); } -otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); OT_UNUSED_VARIABLE(aShortAddress); @@ -361,7 +361,7 @@ otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const otExtAddress return OT_ERROR_NONE; } -otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress) +otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); OT_UNUSED_VARIABLE(aShortAddress);