From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: linux-crypto@vger.kernel.org
Subject: [PATCH] CRYPTO: Simplify code using ARRAY_SIZE() macro.
Date: Sun, 25 May 2008 07:32:45 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.1.10.0805250731530.23219@localhost.localdomain> (raw)
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
---
diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index 81f3f95..c4c018d 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -894,7 +894,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;
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.
http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================
next reply other threads:[~2008-05-25 11:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-25 11:32 Robert P. J. Day [this message]
2008-05-26 11:20 ` [PATCH] CRYPTO: Simplify code using ARRAY_SIZE() macro Herbert Xu
2008-05-27 8:50 ` Robert P. J. Day
2008-05-27 18:29 ` IPSec ESP Authenc Offload Loc Ho
2008-05-28 6:34 ` Herbert Xu
2008-05-28 16:42 ` Loc Ho
2008-05-28 22:22 ` Herbert Xu
2008-05-28 23:02 ` Loc Ho
2008-05-29 7:01 ` Herbert Xu
2008-05-29 17:44 ` Loc Ho
2008-05-29 23:35 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.1.10.0805250731530.23219@localhost.localdomain \
--to=rpjday@crashcourse.ca \
--cc=linux-crypto@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox