The patch titled dvb: fix I2C adapters name size has been removed from the -mm tree. Its filename was dvb-fix-i2c-adapters-name-size.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: dvb: fix I2C adapters name size From: Jean Delvare <khali@xxxxxxxxxxxx> Some DVB drivers are incorrectly assuming that the size of i2c_adapter.name is I2C_NAME_SIZE. Here's a fix. Also change strncpy to strlcpy, as the former is error-prone (and was indeed incorrectly used.) Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx> Acked-by: Uwe Bugla <uwe.bugla@xxxxxx> Reviewed-by: Michael Krufky <mkrufky@xxxxxxxxxxx> Acked-by: Steven Toth <stoth@xxxxxxxxxxxxx> Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx> Cc: <patrick.boettcher@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/media/dvb/b2c2/flexcop-i2c.c | 12 ++++++------ drivers/media/dvb/frontends/cx24123.c | 4 ++-- drivers/media/dvb/frontends/s5h1420.c | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff -puN drivers/media/dvb/b2c2/flexcop-i2c.c~dvb-fix-i2c-adapters-name-size drivers/media/dvb/b2c2/flexcop-i2c.c --- a/drivers/media/dvb/b2c2/flexcop-i2c.c~dvb-fix-i2c-adapters-name-size +++ a/drivers/media/dvb/b2c2/flexcop-i2c.c @@ -221,12 +221,12 @@ int flexcop_i2c_init(struct flexcop_devi fc->fc_i2c_adap[1].port = FC_I2C_PORT_EEPROM; fc->fc_i2c_adap[2].port = FC_I2C_PORT_TUNER; - strncpy(fc->fc_i2c_adap[0].i2c_adap.name, - "B2C2 FlexCop I2C to demod", I2C_NAME_SIZE); - strncpy(fc->fc_i2c_adap[1].i2c_adap.name, - "B2C2 FlexCop I2C to eeprom", I2C_NAME_SIZE); - strncpy(fc->fc_i2c_adap[2].i2c_adap.name, - "B2C2 FlexCop I2C to tuner", I2C_NAME_SIZE); + strlcpy(fc->fc_i2c_adap[0].i2c_adap.name, "B2C2 FlexCop I2C to demod", + sizeof(fc->fc_i2c_adap[0].i2c_adap.name)); + strlcpy(fc->fc_i2c_adap[1].i2c_adap.name, "B2C2 FlexCop I2C to eeprom", + sizeof(fc->fc_i2c_adap[1].i2c_adap.name)); + strlcpy(fc->fc_i2c_adap[2].i2c_adap.name, "B2C2 FlexCop I2C to tuner", + sizeof(fc->fc_i2c_adap[2].i2c_adap.name)); i2c_set_adapdata(&fc->fc_i2c_adap[0].i2c_adap, &fc->fc_i2c_adap[0]); i2c_set_adapdata(&fc->fc_i2c_adap[1].i2c_adap, &fc->fc_i2c_adap[1]); diff -puN drivers/media/dvb/frontends/cx24123.c~dvb-fix-i2c-adapters-name-size drivers/media/dvb/frontends/cx24123.c --- a/drivers/media/dvb/frontends/cx24123.c~dvb-fix-i2c-adapters-name-size +++ a/drivers/media/dvb/frontends/cx24123.c @@ -1072,8 +1072,8 @@ struct dvb_frontend* cx24123_attach(cons if (config->dont_use_pll) cx24123_repeater_mode(state, 1, 0); - strncpy(state->tuner_i2c_adapter.name, - "CX24123 tuner I2C bus", I2C_NAME_SIZE); + strlcpy(state->tuner_i2c_adapter.name, "CX24123 tuner I2C bus", + sizeof(state->tuner_i2c_adapter.name)); state->tuner_i2c_adapter.class = I2C_CLASS_TV_DIGITAL, state->tuner_i2c_adapter.algo = &cx24123_tuner_i2c_algo; state->tuner_i2c_adapter.algo_data = NULL; diff -puN drivers/media/dvb/frontends/s5h1420.c~dvb-fix-i2c-adapters-name-size drivers/media/dvb/frontends/s5h1420.c --- a/drivers/media/dvb/frontends/s5h1420.c~dvb-fix-i2c-adapters-name-size +++ a/drivers/media/dvb/frontends/s5h1420.c @@ -915,7 +915,8 @@ struct dvb_frontend *s5h1420_attach(cons state->frontend.demodulator_priv = state; /* create tuner i2c adapter */ - strncpy(state->tuner_i2c_adapter.name, "S5H1420-PN1010 tuner I2C bus", I2C_NAME_SIZE); + strlcpy(state->tuner_i2c_adapter.name, "S5H1420-PN1010 tuner I2C bus", + sizeof(state->tuner_i2c_adapter.name)); state->tuner_i2c_adapter.class = I2C_CLASS_TV_DIGITAL, state->tuner_i2c_adapter.algo = &s5h1420_tuner_i2c_algo; state->tuner_i2c_adapter.algo_data = NULL; _ Patches currently in -mm which might be from khali@xxxxxxxxxxxx are linux-next.patch mm-only-enforce-acpi-resource-conflict-checks.patch radeonfb-revert-fix-radeon-ddc-regression.patch resource-add-resource_type-and-ioresource_type_bits.patch i2c-use-bcd2bin-bin2bcd.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