Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
unsigned tss,
unsigned value )
{
- assert(q->ts_count < sizeof(q->ts)/sizeof(q->ts[0]));
+ assert(q->ts_count < ARRAY_SIZE(q->ts));
q->ts[q->ts_count].stage = unit;
q->ts[q->ts_count].name = tss;
q->ts[q->ts_count].value = value;
{
struct sh_opcode_info *info;
- if (op >= sizeof( opcode_info ) / sizeof( opcode_info[0] )) {
+ if (op >= ARRAY_SIZE(opcode_info)) {
/* The opcode is either PHASE, COMMENT, END or out of range.
*/
assert( 0 );