Use ARRAY_SIZE. Signed-off-by: Aaro Koskinen <aaro.koskinen@xxxxxx> --- drivers/staging/xgifb/vb_init.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c index f341df5..e96c1bd 100644 --- a/drivers/staging/xgifb/vb_init.c +++ b/drivers/staging/xgifb/vb_init.c @@ -1148,9 +1148,7 @@ static void ReadVBIOSTablData(unsigned char ChipType, i += 25; j--; k++; - } while ((j > 0) && - (k < (sizeof(XGI21_LCDCapList) / - sizeof(struct XGI21_LVDSCapStruct)))); + } while (j > 0 && k < ARRAY_SIZE(XGI21_LCDCapList)); } static void XGINew_ChkSenseStatus(struct xgi_hw_device_info *HwDeviceExtension, -- 1.7.2.5 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel