Commit 20de9fd
media: mtk_jpeg_core: avoid unused-variable warning
The mtk8195_jpegenc_drvdata object was added outside of an #ifdef causing
a harmless build warning.
drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c:1879:32: error: 'mtk8195_jpegenc_drvdata' defined but not used [-Werror=unused-variable]
1879 | static struct mtk_jpeg_variant mtk8195_jpegenc_drvdata = {
| ^~~~~~~~~~~~~~~~~~~~~~~
A follow-up patch moved it inside of an #ifdef, which caused more
warnings, and a third patch ended up adding even more #ifdefs. These
were all bogus, since the actual problem here is the incorrect use
of of_ptr(). Since the driver (like any other modern platform driver)
only works in combination with CONFIG_OF, there is no point in hiding
the reference, so just remove that along with all the pointless #ifdef
checks in the driver.
This improves build coverage and avoids running into the same problem
again when another part of the driver gets changed that relies on
the #ifdef blocks to be completely matched.
Fixes: 934e8bc ("mtk-jpegenc: support jpegenc multi-hardware")
Fixes: 4ae4777 ("media: mtk-jpegenc: Fix a compilation issue")
Fixes: da4ede4 ("media: mtk-jpeg: move data/code inside CONFIG_OF blocks")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>1 parent 53ebeea commit 20de9fd
3 files changed
Lines changed: 3 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
102 | 101 | | |
103 | 102 | | |
104 | 103 | | |
105 | | - | |
106 | 104 | | |
107 | 105 | | |
108 | 106 | | |
| |||
1455 | 1453 | | |
1456 | 1454 | | |
1457 | 1455 | | |
1458 | | - | |
1459 | 1456 | | |
1460 | 1457 | | |
1461 | 1458 | | |
| |||
1951 | 1948 | | |
1952 | 1949 | | |
1953 | 1950 | | |
1954 | | - | |
1955 | 1951 | | |
1956 | 1952 | | |
1957 | 1953 | | |
1958 | 1954 | | |
1959 | 1955 | | |
1960 | 1956 | | |
1961 | | - | |
| 1957 | + | |
1962 | 1958 | | |
1963 | 1959 | | |
1964 | 1960 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | | - | |
51 | 49 | | |
52 | 50 | | |
53 | 51 | | |
| |||
653 | 651 | | |
654 | 652 | | |
655 | 653 | | |
656 | | - | |
| 654 | + | |
657 | 655 | | |
658 | 656 | | |
659 | 657 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | | - | |
58 | 56 | | |
59 | 57 | | |
60 | 58 | | |
| |||
377 | 375 | | |
378 | 376 | | |
379 | 377 | | |
380 | | - | |
| 378 | + | |
381 | 379 | | |
382 | 380 | | |
383 | 381 | | |
| |||
0 commit comments