Hi everyone, On Sat, Jun 16, 2012 at 10:35 AM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: > > Hm... There are several more places which have this same problem. > I'm not sure what's going on here. > > drivers/media/video/saa7164/saa7164-i2c.c:112 saa7164_i2c_register() error: memcpy() '&saa7164_i2c_algo_template' too small (24 vs 64) I was just looking at that lines in saa7164_i2c_register: 112 memcpy(&bus->i2c_algo, &saa7164_i2c_algo_template, 113 sizeof(bus->i2c_algo)); They seem like pointless to me. The real algo is set here: 93 static struct i2c_adapter saa7164_i2c_adap_template = { 94 .name = "saa7164", 95 .owner = THIS_MODULE, 96 .algo = &saa7164_i2c_algo_template, 97 }; This would also mean that this fields are also pointless: 254 struct i2c_algo_bit_data i2c_algo; 255 struct i2c_client i2c_client; IMO, the issue pointed out by Dan would never appeared if instead of using memcpy to fill the structures, it would just get assigned; it's type safe, right? Please correct me if I'm wrong, Ezequiel. -- 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