* [PATCH] media: imx214: Remove unnecessary self assignment in for loop
@ 2018-11-07 6:24 Nathan Chancellor
0 siblings, 0 replies; only message in thread
From: Nathan Chancellor @ 2018-11-07 6:24 UTC (permalink / raw)
To: Ricardo Ribalda Delgado, Mauro Carvalho Chehab
Cc: linux-media, linux-kernel, Nathan Chancellor
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 <natechancellor@gmail.com>
---
drivers/media/i2c/imx214.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.19.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-11-07 6:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-07 6:24 [PATCH] media: imx214: Remove unnecessary self assignment in for loop Nathan Chancellor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).