Linux cryptographic layer development
 help / color / mirror / Atom feed
* [PATCH] CRYPTO:  Simplify code using ARRAY_SIZE() macro.
@ 2008-05-25 11:32 Robert P. J. Day
  2008-05-26 11:20 ` Herbert Xu
  0 siblings, 1 reply; 11+ messages in thread
From: Robert P. J. Day @ 2008-05-25 11:32 UTC (permalink / raw)
  To: linux-crypto


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
========================================================================

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-05-29 23:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-25 11:32 [PATCH] CRYPTO: Simplify code using ARRAY_SIZE() macro Robert P. J. Day
2008-05-26 11:20 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox