* [PATCH RESEND 1/2] drm: panel-orientation-quirks: Get rid of superfluous (void *) casting
@ 2019-02-18 23:35 David Santamaría Rogado
2019-02-18 23:35 ` [PATCH RESEND 2/2] drm: panel-orientation-quirks: Add quirk for Lenovo Ideapad D330 David Santamaría Rogado
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: David Santamaría Rogado @ 2019-02-18 23:35 UTC (permalink / raw)
To: Jani Nikula, David Airlie, Daniel Vetter, Thierry Reding,
dri-devel
The (void *) casting in the driver_data variable assignment is superfluous.
Spotted by Jani Nikula.
Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
---
drivers/gpu/drm/drm_panel_orientation_quirks.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
index 52e445bb1aa5..61d3361381b7 100644
--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
+++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
@@ -86,13 +86,13 @@ static const struct dmi_system_id orientation_data[] = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Acer"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "One S1003"),
},
- .driver_data = (void *)&acer_s1003,
+ .driver_data = &acer_s1003,
}, { /* Asus T100HA */
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100HAN"),
},
- .driver_data = (void *)&asus_t100ha,
+ .driver_data = &asus_t100ha,
}, { /*
* GPD Pocket, note that the the DMI data is less generic then
* it seems, devices with a board-vendor of "AMI Corporation"
@@ -105,7 +105,7 @@ static const struct dmi_system_id orientation_data[] = {
DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
},
- .driver_data = (void *)&gpd_pocket,
+ .driver_data = &gpd_pocket,
}, { /* GPD Win (same note on DMI match as GPD Pocket) */
.matches = {
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
@@ -113,7 +113,7 @@ static const struct dmi_system_id orientation_data[] = {
DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
},
- .driver_data = (void *)&gpd_win,
+ .driver_data = &gpd_win,
}, { /* GPD Win 2 (too generic strings, also match on bios date) */
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),
@@ -121,7 +121,7 @@ static const struct dmi_system_id orientation_data[] = {
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Default string"),
DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
},
- .driver_data = (void *)&gpd_win2,
+ .driver_data = &gpd_win2,
}, { /* I.T.Works TW891 */
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
@@ -129,7 +129,7 @@ static const struct dmi_system_id orientation_data[] = {
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
DMI_EXACT_MATCH(DMI_BOARD_NAME, "TW891"),
},
- .driver_data = (void *)&itworks_tw891,
+ .driver_data = &itworks_tw891,
}, { /*
* Lenovo Ideapad Miix 310 laptop, only some production batches
* have a portrait screen, the resolution checks makes the quirk
@@ -140,20 +140,20 @@ static const struct dmi_system_id orientation_data[] = {
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "80SG"),
DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "MIIX 310-10ICR"),
},
- .driver_data = (void *)&lcd800x1280_rightside_up,
+ .driver_data = &lcd800x1280_rightside_up,
}, { /* Lenovo Ideapad Miix 320 */
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "80XF"),
DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"),
},
- .driver_data = (void *)&lcd800x1280_rightside_up,
+ .driver_data = &lcd800x1280_rightside_up,
}, { /* VIOS LTH17 */
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "VIOS"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "LTH17"),
},
- .driver_data = (void *)&lcd800x1280_rightside_up,
+ .driver_data = &lcd800x1280_rightside_up,
},
{}
};
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH RESEND 2/2] drm: panel-orientation-quirks: Add quirk for Lenovo Ideapad D330
2019-02-18 23:35 [PATCH RESEND 1/2] drm: panel-orientation-quirks: Get rid of superfluous (void *) casting David Santamaría Rogado
@ 2019-02-18 23:35 ` David Santamaría Rogado
2019-02-18 23:37 ` [PATCH RESEND 1/2] drm: panel-orientation-quirks: Get rid of superfluous (void *) casting David Santamaría Rogado
2019-02-21 21:21 ` kbuild test robot
2 siblings, 0 replies; 5+ messages in thread
From: David Santamaría Rogado @ 2019-02-18 23:35 UTC (permalink / raw)
To: Jani Nikula, David Airlie, Daniel Vetter, Thierry Reding,
dri-devel
Lenovo Ideapad D330 Pentium CPU version has 1920x1200 LCD. Console
ouput gets rotated at boot as Miix 310.
Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
---
drivers/gpu/drm/drm_panel_orientation_quirks.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
index 61d3361381b7..835574e2d5bf 100644
--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
+++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
@@ -80,6 +80,12 @@ static const struct drm_dmi_panel_orientation_data lcd800x1280_rightside_up = {
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
};
+static const struct drm_dmi_panel_orientation_data lcd1200x1920_rightside_up = {
+ .width = 1200,
+ .height = 1920,
+ .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
+};
+
static const struct dmi_system_id orientation_data[] = {
{ /* Acer One 10 (S1003) */
.matches = {
@@ -130,6 +136,13 @@ static const struct dmi_system_id orientation_data[] = {
DMI_EXACT_MATCH(DMI_BOARD_NAME, "TW891"),
},
.driver_data = &itworks_tw891,
+ }, { /* Lenovo Ideapad D330 */
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "81H3"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad D330-10IGM"),
+ },
+ .driver_data = &lcd1200x1920_rightside_up,
}, { /*
* Lenovo Ideapad Miix 310 laptop, only some production batches
* have a portrait screen, the resolution checks makes the quirk
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND 1/2] drm: panel-orientation-quirks: Get rid of superfluous (void *) casting
2019-02-18 23:35 [PATCH RESEND 1/2] drm: panel-orientation-quirks: Get rid of superfluous (void *) casting David Santamaría Rogado
2019-02-18 23:35 ` [PATCH RESEND 2/2] drm: panel-orientation-quirks: Add quirk for Lenovo Ideapad D330 David Santamaría Rogado
@ 2019-02-18 23:37 ` David Santamaría Rogado
2019-02-21 21:21 ` kbuild test robot
2 siblings, 0 replies; 5+ messages in thread
From: David Santamaría Rogado @ 2019-02-18 23:37 UTC (permalink / raw)
To: Jani Nikula, David Airlie, Daniel Vetter, Thierry Reding,
dri-devel
OK, I think I did it right, rebase two commits and ammeded both and
now resend. This one has been attached to this thread but number 2 has
been in a new thread.
El mar., 19 feb. 2019 a las 0:35, David Santamaría Rogado
(<howl.nsp@gmail.com>) escribió:
>
> The (void *) casting in the driver_data variable assignment is superfluous.
> Spotted by Jani Nikula.
>
> Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
> ---
> drivers/gpu/drm/drm_panel_orientation_quirks.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
> index 52e445bb1aa5..61d3361381b7 100644
> --- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
> +++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
> @@ -86,13 +86,13 @@ static const struct dmi_system_id orientation_data[] = {
> DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Acer"),
> DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "One S1003"),
> },
> - .driver_data = (void *)&acer_s1003,
> + .driver_data = &acer_s1003,
> }, { /* Asus T100HA */
> .matches = {
> DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
> DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100HAN"),
> },
> - .driver_data = (void *)&asus_t100ha,
> + .driver_data = &asus_t100ha,
> }, { /*
> * GPD Pocket, note that the the DMI data is less generic then
> * it seems, devices with a board-vendor of "AMI Corporation"
> @@ -105,7 +105,7 @@ static const struct dmi_system_id orientation_data[] = {
> DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
> DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
> },
> - .driver_data = (void *)&gpd_pocket,
> + .driver_data = &gpd_pocket,
> }, { /* GPD Win (same note on DMI match as GPD Pocket) */
> .matches = {
> DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
> @@ -113,7 +113,7 @@ static const struct dmi_system_id orientation_data[] = {
> DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
> DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
> },
> - .driver_data = (void *)&gpd_win,
> + .driver_data = &gpd_win,
> }, { /* GPD Win 2 (too generic strings, also match on bios date) */
> .matches = {
> DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),
> @@ -121,7 +121,7 @@ static const struct dmi_system_id orientation_data[] = {
> DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Default string"),
> DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
> },
> - .driver_data = (void *)&gpd_win2,
> + .driver_data = &gpd_win2,
> }, { /* I.T.Works TW891 */
> .matches = {
> DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
> @@ -129,7 +129,7 @@ static const struct dmi_system_id orientation_data[] = {
> DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
> DMI_EXACT_MATCH(DMI_BOARD_NAME, "TW891"),
> },
> - .driver_data = (void *)&itworks_tw891,
> + .driver_data = &itworks_tw891,
> }, { /*
> * Lenovo Ideapad Miix 310 laptop, only some production batches
> * have a portrait screen, the resolution checks makes the quirk
> @@ -140,20 +140,20 @@ static const struct dmi_system_id orientation_data[] = {
> DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "80SG"),
> DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "MIIX 310-10ICR"),
> },
> - .driver_data = (void *)&lcd800x1280_rightside_up,
> + .driver_data = &lcd800x1280_rightside_up,
> }, { /* Lenovo Ideapad Miix 320 */
> .matches = {
> DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "80XF"),
> DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"),
> },
> - .driver_data = (void *)&lcd800x1280_rightside_up,
> + .driver_data = &lcd800x1280_rightside_up,
> }, { /* VIOS LTH17 */
> .matches = {
> DMI_EXACT_MATCH(DMI_SYS_VENDOR, "VIOS"),
> DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "LTH17"),
> },
> - .driver_data = (void *)&lcd800x1280_rightside_up,
> + .driver_data = &lcd800x1280_rightside_up,
> },
> {}
> };
> --
> 2.20.1
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND 1/2] drm: panel-orientation-quirks: Get rid of superfluous (void *) casting
2019-02-18 23:35 [PATCH RESEND 1/2] drm: panel-orientation-quirks: Get rid of superfluous (void *) casting David Santamaría Rogado
2019-02-18 23:35 ` [PATCH RESEND 2/2] drm: panel-orientation-quirks: Add quirk for Lenovo Ideapad D330 David Santamaría Rogado
2019-02-18 23:37 ` [PATCH RESEND 1/2] drm: panel-orientation-quirks: Get rid of superfluous (void *) casting David Santamaría Rogado
@ 2019-02-21 21:21 ` kbuild test robot
2019-02-22 10:29 ` Jani Nikula
2 siblings, 1 reply; 5+ messages in thread
From: kbuild test robot @ 2019-02-21 21:21 UTC (permalink / raw)
To: David Santamaría Rogado
Cc: David Airlie, dri-devel, Thierry Reding, kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6185 bytes --]
Hi David,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.0-rc4 next-20190221]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/David-Santamar-a-Rogado/drm-panel-orientation-quirks-Get-rid-of-superfluous-void-casting/20190222-044326
config: i386-randconfig-x019-201907 (attached as .config)
compiler: gcc-8 (Debian 8.2.0-20) 8.2.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/drm_panel_orientation_quirks.c:89:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
.driver_data = &acer_s1003,
^
drivers/gpu/drm/drm_panel_orientation_quirks.c:95:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
.driver_data = &asus_t100ha,
^
drivers/gpu/drm/drm_panel_orientation_quirks.c:108:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
.driver_data = &gpd_pocket,
^
drivers/gpu/drm/drm_panel_orientation_quirks.c:116:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
.driver_data = &gpd_win,
^
drivers/gpu/drm/drm_panel_orientation_quirks.c:124:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
.driver_data = &gpd_win2,
^
drivers/gpu/drm/drm_panel_orientation_quirks.c:132:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
.driver_data = &itworks_tw891,
^
drivers/gpu/drm/drm_panel_orientation_quirks.c:143:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
.driver_data = &lcd800x1280_rightside_up,
^
drivers/gpu/drm/drm_panel_orientation_quirks.c:150:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
.driver_data = &lcd800x1280_rightside_up,
^
drivers/gpu/drm/drm_panel_orientation_quirks.c:156:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
.driver_data = &lcd800x1280_rightside_up,
^
vim +/const +89 drivers/gpu/drm/drm_panel_orientation_quirks.c
82
83 static const struct dmi_system_id orientation_data[] = {
84 { /* Acer One 10 (S1003) */
85 .matches = {
86 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Acer"),
87 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "One S1003"),
88 },
> 89 .driver_data = &acer_s1003,
90 }, { /* Asus T100HA */
91 .matches = {
92 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
93 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100HAN"),
94 },
95 .driver_data = &asus_t100ha,
96 }, { /*
97 * GPD Pocket, note that the the DMI data is less generic then
98 * it seems, devices with a board-vendor of "AMI Corporation"
99 * are quite rare, as are devices which have both board- *and*
100 * product-id set to "Default String"
101 */
102 .matches = {
103 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
104 DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
105 DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
106 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
107 },
108 .driver_data = &gpd_pocket,
109 }, { /* GPD Win (same note on DMI match as GPD Pocket) */
110 .matches = {
111 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
112 DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
113 DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
114 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
115 },
116 .driver_data = &gpd_win,
117 }, { /* GPD Win 2 (too generic strings, also match on bios date) */
118 .matches = {
119 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),
120 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
121 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Default string"),
122 DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
123 },
124 .driver_data = &gpd_win2,
125 }, { /* I.T.Works TW891 */
126 .matches = {
127 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
128 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "TW891"),
129 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
130 DMI_EXACT_MATCH(DMI_BOARD_NAME, "TW891"),
131 },
132 .driver_data = &itworks_tw891,
133 }, { /*
134 * Lenovo Ideapad Miix 310 laptop, only some production batches
135 * have a portrait screen, the resolution checks makes the quirk
136 * apply only to those batches.
137 */
138 .matches = {
139 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
140 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "80SG"),
141 DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "MIIX 310-10ICR"),
142 },
143 .driver_data = &lcd800x1280_rightside_up,
144 }, { /* Lenovo Ideapad Miix 320 */
145 .matches = {
146 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
147 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "80XF"),
148 DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"),
149 },
150 .driver_data = &lcd800x1280_rightside_up,
151 }, { /* VIOS LTH17 */
152 .matches = {
153 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "VIOS"),
154 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "LTH17"),
155 },
156 .driver_data = &lcd800x1280_rightside_up,
157 },
158 {}
159 };
160
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33004 bytes --]
[-- Attachment #3: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND 1/2] drm: panel-orientation-quirks: Get rid of superfluous (void *) casting
2019-02-21 21:21 ` kbuild test robot
@ 2019-02-22 10:29 ` Jani Nikula
0 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2019-02-22 10:29 UTC (permalink / raw)
To: kbuild test robot, David Santamaría Rogado
Cc: David Airlie, dri-devel, Thierry Reding, kbuild-all
On Fri, 22 Feb 2019, kbuild test robot <lkp@intel.com> wrote:
> Hi David,
>
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on linus/master]
> [also build test WARNING on v5.0-rc4 next-20190221]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/David-Santamar-a-Rogado/drm-panel-orientation-quirks-Get-rid-of-superfluous-void-casting/20190222-044326
> config: i386-randconfig-x019-201907 (attached as .config)
> compiler: gcc-8 (Debian 8.2.0-20) 8.2.0
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=i386
>
> All warnings (new ones prefixed by >>):
>
>>> drivers/gpu/drm/drm_panel_orientation_quirks.c:89:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> .driver_data = &acer_s1003,
*facepalm*
I overlooked that .driver_data is void *, not const void *. IMO it's
ugly to use (void *) to cast the const away, but it is what it is and
not doing so will lead to these warnings.
So I'm really sorry I'm going to have to ask you to revert back to just
patch 2/2 without this. My mistake.
BR,
Jani.
> ^
> drivers/gpu/drm/drm_panel_orientation_quirks.c:95:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> .driver_data = &asus_t100ha,
> ^
> drivers/gpu/drm/drm_panel_orientation_quirks.c:108:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> .driver_data = &gpd_pocket,
> ^
> drivers/gpu/drm/drm_panel_orientation_quirks.c:116:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> .driver_data = &gpd_win,
> ^
> drivers/gpu/drm/drm_panel_orientation_quirks.c:124:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> .driver_data = &gpd_win2,
> ^
> drivers/gpu/drm/drm_panel_orientation_quirks.c:132:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> .driver_data = &itworks_tw891,
> ^
> drivers/gpu/drm/drm_panel_orientation_quirks.c:143:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> .driver_data = &lcd800x1280_rightside_up,
> ^
> drivers/gpu/drm/drm_panel_orientation_quirks.c:150:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> .driver_data = &lcd800x1280_rightside_up,
> ^
> drivers/gpu/drm/drm_panel_orientation_quirks.c:156:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> .driver_data = &lcd800x1280_rightside_up,
> ^
>
> vim +/const +89 drivers/gpu/drm/drm_panel_orientation_quirks.c
>
> 82
> 83 static const struct dmi_system_id orientation_data[] = {
> 84 { /* Acer One 10 (S1003) */
> 85 .matches = {
> 86 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Acer"),
> 87 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "One S1003"),
> 88 },
> > 89 .driver_data = &acer_s1003,
> 90 }, { /* Asus T100HA */
> 91 .matches = {
> 92 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
> 93 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100HAN"),
> 94 },
> 95 .driver_data = &asus_t100ha,
> 96 }, { /*
> 97 * GPD Pocket, note that the the DMI data is less generic then
> 98 * it seems, devices with a board-vendor of "AMI Corporation"
> 99 * are quite rare, as are devices which have both board- *and*
> 100 * product-id set to "Default String"
> 101 */
> 102 .matches = {
> 103 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
> 104 DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
> 105 DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
> 106 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
> 107 },
> 108 .driver_data = &gpd_pocket,
> 109 }, { /* GPD Win (same note on DMI match as GPD Pocket) */
> 110 .matches = {
> 111 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
> 112 DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
> 113 DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
> 114 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
> 115 },
> 116 .driver_data = &gpd_win,
> 117 }, { /* GPD Win 2 (too generic strings, also match on bios date) */
> 118 .matches = {
> 119 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),
> 120 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
> 121 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Default string"),
> 122 DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
> 123 },
> 124 .driver_data = &gpd_win2,
> 125 }, { /* I.T.Works TW891 */
> 126 .matches = {
> 127 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
> 128 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "TW891"),
> 129 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
> 130 DMI_EXACT_MATCH(DMI_BOARD_NAME, "TW891"),
> 131 },
> 132 .driver_data = &itworks_tw891,
> 133 }, { /*
> 134 * Lenovo Ideapad Miix 310 laptop, only some production batches
> 135 * have a portrait screen, the resolution checks makes the quirk
> 136 * apply only to those batches.
> 137 */
> 138 .matches = {
> 139 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> 140 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "80SG"),
> 141 DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "MIIX 310-10ICR"),
> 142 },
> 143 .driver_data = &lcd800x1280_rightside_up,
> 144 }, { /* Lenovo Ideapad Miix 320 */
> 145 .matches = {
> 146 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> 147 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "80XF"),
> 148 DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"),
> 149 },
> 150 .driver_data = &lcd800x1280_rightside_up,
> 151 }, { /* VIOS LTH17 */
> 152 .matches = {
> 153 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "VIOS"),
> 154 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "LTH17"),
> 155 },
> 156 .driver_data = &lcd800x1280_rightside_up,
> 157 },
> 158 {}
> 159 };
> 160
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-02-22 10:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-18 23:35 [PATCH RESEND 1/2] drm: panel-orientation-quirks: Get rid of superfluous (void *) casting David Santamaría Rogado
2019-02-18 23:35 ` [PATCH RESEND 2/2] drm: panel-orientation-quirks: Add quirk for Lenovo Ideapad D330 David Santamaría Rogado
2019-02-18 23:37 ` [PATCH RESEND 1/2] drm: panel-orientation-quirks: Get rid of superfluous (void *) casting David Santamaría Rogado
2019-02-21 21:21 ` kbuild test robot
2019-02-22 10:29 ` Jani Nikula
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.