提交 0936a944 编写于 作者: R Robert P. J. Day 提交者: Herbert Xu

[CRYPTO] hifn: Simplify code using ARRAY_SIZE() macro

Signed-off-by: NRobert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 feedfdaa
......@@ -895,7 +895,7 @@ static int hifn_enable_crypto(struct hifn_device *dev)
char *offtbl = NULL;
int i;
for (i = 0; i < sizeof(pci2id)/sizeof(pci2id[0]); i++) {
for (i = 0; i < ARRAY_SIZE(pci2id); i++) {
if (pci2id[i].pci_vendor == dev->pdev->vendor &&
pci2id[i].pci_prod == dev->pdev->device) {
offtbl = pci2id[i].card_id;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册