svga: Make use of ARRAY_SIZE macro

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Edward O'Callaghan 2015-12-04 15:31:40 +11:00 committed by Marek Olšák
parent 70d2d3ef7f
commit 82871081fc
2 changed files with 2 additions and 2 deletions

View file

@ -316,7 +316,7 @@ svga_queue_tss( struct ts_queue *q,
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;

View file

@ -144,7 +144,7 @@ const struct sh_opcode_info *svga_opcode_info( uint op )
{
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 );