From: Nathan Chancellor Date: Wed, 7 Nov 2018 06:24:50 +0000 (-0500) Subject: media: imx214: Remove unnecessary self assignment in for loop X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=cb24f1a0ee61b7dc8adf39aa19f290bf12df9d7f;p=openwrt%2Fstaging%2Fblogic.git media: imx214: Remove unnecessary self assignment in for loop Clang warns when a variable is assigned to itself: drivers/media/i2c/imx214.c:695:13: error: explicitly assigning value of variable of type 'const struct reg_8 *' to itself [-Werror,-Wself-assign] for (table = table; table->addr != IMX214_TABLE_END ; table++) { ~~~~~ ^ ~~~~~ 1 error generated. Signed-off-by: Nathan Chancellor Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/imx214.c b/drivers/media/i2c/imx214.c index 284b9b49ebde..ec3d1b855f62 100644 --- a/drivers/media/i2c/imx214.c +++ b/drivers/media/i2c/imx214.c @@ -692,7 +692,7 @@ static int imx214_write_table(struct imx214 *imx214, int i; int ret; - for (table = table; table->addr != IMX214_TABLE_END ; table++) { + for (; table->addr != IMX214_TABLE_END ; table++) { if (table->addr == IMX214_TABLE_WAIT_MS) { usleep_range(table->val * 1000, table->val * 1000 + 500);