kfdtest: Style cleanup

Clean up the KFDTest style via CPPLint. Some warnings remain regarding
volatile variables being cast to void*. This is the command used:
cpplint.py --linelength=120
--filter=-readability/multiline_string,-readability/todo,-build/include,-runtime/references

multiline_string is due to using ISA code
todo is to avoid errors that we don't have TODO(username) instead of TODO
include is about including the folder in the header includes
references is regarding non-const references '&' being const or using
pointers. That can be addressed later

Change-Id: I3c6622da0a13dd33ab29b2bfff48be25e763b750
This commit is contained in:
Kent Russell
2018-08-13 09:03:31 -04:00
parent 3f7b6356fd
commit dffac0a97e
33 changed files with 371 additions and 328 deletions
+5 -4
View File
@@ -70,7 +70,8 @@ static struct block_name_table {
{"DRIVER ", {0xea9b5ae1, 0x6c3f, 0x44b3, 0x89, 0x54, 0xda, 0xf0, 0x75, 0x65, 0xa9, 0xa}}
};
void KFDPerfCountersTest::GetBlockName(HSA_UUID uuid, char *name, uint32_t name_len, char *uuid_str, uint32_t uuid_str_len) {
void KFDPerfCountersTest::GetBlockName(HSA_UUID uuid, char *name, uint32_t name_len,
char *uuid_str, uint32_t uuid_str_len) {
uint32_t i, table_size;
table_size = sizeof(block_lookup_table) / sizeof(struct block_name_table);
@@ -134,7 +135,7 @@ TEST_F(KFDPerfCountersTest, GetCounterProperties) {
LOG() << name << " (" << uuid_string << "): " << type << ", " <<
block->NumCounters << " counter IDs" << std::endl;
block = (HsaCounterBlockProperties *)&block->Counters[block->NumCounters];
block = reinterpret_cast<HsaCounterBlockProperties *>(&block->Counters[block->NumCounters]);
}
TEST_END
@@ -161,7 +162,7 @@ TEST_F(KFDPerfCountersTest, RegisterTrace) {
priv_block_found = true;
break;
}
block = (HsaCounterBlockProperties *)&block->Counters[block->NumCounters];
block = reinterpret_cast<HsaCounterBlockProperties *>(&block->Counters[block->NumCounters]);
}
if (!priv_block_found) {
@@ -202,7 +203,7 @@ TEST_F(KFDPerfCountersTest, StartStopQueryTrace) {
priv_block_found = true;
break;
}
block = (HsaCounterBlockProperties *)&block->Counters[block->NumCounters];
block = reinterpret_cast<HsaCounterBlockProperties *>(&block->Counters[block->NumCounters]);
}
if (!priv_block_found) {