Skip to contentSkip to conversation

i2c: cleanup: change parameter to pointer

PATCH In review Dan Carpenter 2 participants 2 messages Apr 2, 2010 – Apr 4, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: cleanup: change parameter to pointer

We actually pass an array of 7 chars not 5.
This silences a smatch warning.

---
Compile tested only. :/

sound/i2c/other/ak4113.c +1 -1
index fff62cc..971a84a 100644
@@ -70,7 +70,7 @@ static int snd_ak4113_dev_free(struct snd_device *device)
 }
 
 int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read,
-		ak4113_write_t *write, const unsigned char pgm[5],
+		ak4113_write_t *write, const unsigned char *pgm,
 		void *private_data, struct ak4113 **r_ak4113)
 {
 	struct ak4113 *chip;
#1 lore raw

At Fri, 2 Apr 2010 14:29:23 +0300,

Quoted 5 lines · Dan Carpenter

We actually pass an array of 7 chars not 5.
This silences a smatch warning.

Thanks. I applied together with the fx in the declaration part in include/sound/ak4113.h.

Takashi

Quoted 17 lines

---
Compile tested only. :/

sound/i2c/other/ak4113.c +1 -1
index fff62cc..971a84a 100644
@@ -70,7 +70,7 @@ static int snd_ak4113_dev_free(struct snd_device *device)
 }
 
 int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read,
-		ak4113_write_t *write, const unsigned char pgm[5],
+		ak4113_write_t *write, const unsigned char *pgm,
 		void *private_data, struct ak4113 **r_ak4113)
 {
 	struct ak4113 *chip;