Em Wed, 8 Jan 2014 11:37:37 +0300 Dan Carpenter <dan.carpenter@xxxxxxxxxx> escreveu: > The other thing that concerned me with this was the sparse warning: > > drivers/media/i2c/s5k5baf.c:481:26: error: bad constant expression Hmm... static void s5k5baf_write_arr_seq(struct s5k5baf *state, u16 addr, u16 count, const u16 *seq) { struct i2c_client *c = v4l2_get_subdevdata(&state->sd); __be16 buf[count + 1]; int ret, n; Yeah, allocating data like that at stack is not nice. I would simply replace the static allocation here by a dynamic one. > It was hard to verify that this couldn't go over 512. I guess 512 is > what we would consider an error in this context. This seems like it > could be determined by the firmware? > > regards, > dan carpenter > > -- > To unsubscribe from this list: send the line "unsubscribe linux-media" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Cheers, Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html