All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [third][PATCH 3/4][2.6 drivers/net/skfp/smt.c:]replace SIZE
@ 2007-07-16 14:06 acripps
  2007-07-16 17:06 ` walter harms
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: acripps @ 2007-07-16 14:06 UTC (permalink / raw)
  To: kernel-janitors

Removed the N_SMT_PLEN macro in favor of the more generic ARRAY_SIZE(arr)
defined in kernel.h
Compile tested, no issues found.
Signed-off-by: Aaron Cripps <cripps@cs.mun.ca>

diff --git a/drivers/net/skfp/smt.c b/drivers/net/skfp/smt.c
index 75afc1f..a1c49ed 100644
--- a/drivers/net/skfp/smt.c
+++ b/drivers/net/skfp/smt.c
@@ -1654,8 +1654,6 @@ static const struct smt_pdef {
 	{ SMT_P4053,	0,	SWAP_SMT_P4053			} ,
 } ;
 
-#define N_SMT_PLEN	(sizeof(smt_pdef)/sizeof(smt_pdef[0]))
-
 int smt_check_para(struct s_smc *smc, struct smt_header	*sm,
 		   const u_short list[])
 {
@@ -1881,7 +1879,7 @@ void smt_swap_para(struct smt_header *sm, int len, int direction)
 		if (plen < 0)
 			break ;
 		plen += PARA_LEN ;
-		for (i = N_SMT_PLEN, pd = smt_pdef; i ; i--,pd++) {
+		for (i = ARRAY_SIZE(smt_pdef), pd = smt_pdef; i ; i--,pd++) {
 			if (pd->ptype = type)
 				break ;
 		}
_______________________________________________
REMINDER: this mailing list moved to vger.kernel.org and current one will be discontinued soon.
To resubscribe, send email to majordomo@vger.kernel.org with
&quot;subscribe kernel-janitors&quot; in message body and follow instructions.

Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

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

end of thread, other threads:[~2007-07-16 17:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-16 14:06 [KJ] [third][PATCH 3/4][2.6 drivers/net/skfp/smt.c:]replace SIZE acripps
2007-07-16 17:06 ` walter harms
2007-07-16 17:24 ` Nishanth Aravamudan
2007-07-16 17:25 ` Matthew Wilcox
2007-07-16 17:33 ` Cripps
2007-07-16 17:48 ` Matthew Wilcox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.