+ sound-sparc-dbri-use-array_size-macro.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     sound/sparc/dbri: Use ARRAY_SIZE macro

has been added to the -mm tree.  Its filename is

     sound-sparc-dbri-use-array_size-macro.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: sound/sparc/dbri: Use ARRAY_SIZE macro
From: Tobias Klauser <tklauser@xxxxxxxxxxxxxxxxxxx>

Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0])

Signed-off-by: Tobias Klauser <tklauser@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 sound/sparc/dbri.c |    4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)

diff -puN sound/sparc/dbri.c~sound-sparc-dbri-use-array_size-macro sound/sparc/dbri.c
--- a/sound/sparc/dbri.c~sound-sparc-dbri-use-array_size-macro
+++ a/sound/sparc/dbri.c
@@ -2452,8 +2452,6 @@ static struct snd_kcontrol_new dbri_cont
 	CS4215_SINGLE("Mic boost", 4, 4, 1, 1)
 };
 
-#define NUM_CS4215_CONTROLS (sizeof(dbri_controls)/sizeof(struct snd_kcontrol_new))
-
 static int __init snd_dbri_mixer(struct snd_dbri * dbri)
 {
 	struct snd_card *card;
@@ -2464,7 +2462,7 @@ static int __init snd_dbri_mixer(struct 
 	card = dbri->card;
 	strcpy(card->mixername, card->shortname);
 
-	for (idx = 0; idx < NUM_CS4215_CONTROLS; idx++) {
+	for (idx = 0; idx < ARRAY_SIZE(dbri_controls); idx++) {
 		if ((err = snd_ctl_add(card,
 				snd_ctl_new1(&dbri_controls[idx], dbri))) < 0)
 			return err;
_

Patches currently in -mm which might be from tklauser@xxxxxxxxxxxxxxxxxxx are

sound-mips-au1x00-use-array_size-macro.patch
sound-sparc-dbri-use-array_size-macro.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux