* [PATCH -next] drm/hyperv: Remove unused variable
@ 2021-06-09 2:49 Pu Lehui
2021-06-09 7:46 ` Thomas Zimmermann
2021-06-15 3:14 ` [PATCH v2 -next] drm/hyperv: Fix unused const variable 'hyperv_modifiers' Pu Lehui
0 siblings, 2 replies; 7+ messages in thread
From: Pu Lehui @ 2021-06-09 2:49 UTC (permalink / raw)
To: drawat.floss, airlied, daniel
Cc: linux-hyperv, dri-devel, linux-kernel, pulehui, zhangjinhao2
Fixes gcc '-Wunused-const-variable' warning:
drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:152:23: warning:
'hyperv_modifiers' defined but not used [-Wunused-const-variable=]
Signed-off-by: Pu Lehui <pulehui@huawei.com>
---
drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
index 02718e3e859e..3f83493909e6 100644
--- a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
+++ b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
@@ -149,11 +149,6 @@ static const uint32_t hyperv_formats[] = {
DRM_FORMAT_XRGB8888,
};
-static const uint64_t hyperv_modifiers[] = {
- DRM_FORMAT_MOD_LINEAR,
- DRM_FORMAT_MOD_INVALID
-};
-
static inline int hyperv_pipe_init(struct hyperv_drm_device *hv)
{
int ret;
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH -next] drm/hyperv: Remove unused variable
2021-06-09 2:49 [PATCH -next] drm/hyperv: Remove unused variable Pu Lehui
@ 2021-06-09 7:46 ` Thomas Zimmermann
2021-06-14 14:01 ` Deepak Rawat
2021-06-15 2:04 ` Pu Lehui
2021-06-15 3:14 ` [PATCH v2 -next] drm/hyperv: Fix unused const variable 'hyperv_modifiers' Pu Lehui
1 sibling, 2 replies; 7+ messages in thread
From: Thomas Zimmermann @ 2021-06-09 7:46 UTC (permalink / raw)
To: Pu Lehui, drawat.floss, airlied, daniel
Cc: zhangjinhao2, linux-hyperv, linux-kernel, dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 1395 bytes --]
Hi
Am 09.06.21 um 04:49 schrieb Pu Lehui:
> Fixes gcc '-Wunused-const-variable' warning:
> drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:152:23: warning:
> 'hyperv_modifiers' defined but not used [-Wunused-const-variable=]
>
> Signed-off-by: Pu Lehui <pulehui@huawei.com>
> ---
> drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
> index 02718e3e859e..3f83493909e6 100644
> --- a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
> +++ b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
> @@ -149,11 +149,6 @@ static const uint32_t hyperv_formats[] = {
> DRM_FORMAT_XRGB8888,
> };
>
> -static const uint64_t hyperv_modifiers[] = {
> - DRM_FORMAT_MOD_LINEAR,
> - DRM_FORMAT_MOD_INVALID
> -};
This constant should rather be used in the call to
drm_simple_display_pipe_init(). [1]
Best regards
Thomas
[1]
https://cgit.freedesktop.org/drm/drm-misc/tree/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c#n161
> -
> static inline int hyperv_pipe_init(struct hyperv_drm_device *hv)
> {
> int ret;
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -next] drm/hyperv: Remove unused variable
2021-06-09 7:46 ` Thomas Zimmermann
@ 2021-06-14 14:01 ` Deepak Rawat
2021-06-15 2:10 ` Pu Lehui
2021-06-15 2:04 ` Pu Lehui
1 sibling, 1 reply; 7+ messages in thread
From: Deepak Rawat @ 2021-06-14 14:01 UTC (permalink / raw)
To: Thomas Zimmermann, Pu Lehui, airlied, daniel
Cc: zhangjinhao2, linux-hyperv, linux-kernel, dri-devel
On Wed, 2021-06-09 at 09:46 +0200, Thomas Zimmermann wrote:
> Hi
>
> Am 09.06.21 um 04:49 schrieb Pu Lehui:
> > Fixes gcc '-Wunused-const-variable' warning:
> > drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:152:23: warning:
> > 'hyperv_modifiers' defined but not used [-Wunused-const-
> > variable=]
> >
> > Signed-off-by: Pu Lehui <pulehui@huawei.com>
> > ---
> > drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 5 -----
> > 1 file changed, 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
> > b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
> > index 02718e3e859e..3f83493909e6 100644
> > --- a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
> > +++ b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
> > @@ -149,11 +149,6 @@ static const uint32_t hyperv_formats[] = {
> > DRM_FORMAT_XRGB8888,
> > };
> >
> > -static const uint64_t hyperv_modifiers[] = {
> > - DRM_FORMAT_MOD_LINEAR,
> > - DRM_FORMAT_MOD_INVALID
> > -};
>
> This constant should rather be used in the call to
> drm_simple_display_pipe_init(). [1]
>
> Best regards
> Thomas
>
> [1]
> https://cgit.freedesktop.org/drm/drm-misc/tree/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c#n161
>
>
Hi Pu,
Thanks for the patch. Is it possible to send another patch as per
suggestion by Thomas. There is a kernel test robot failure as well.
Deepak
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -next] drm/hyperv: Remove unused variable
2021-06-09 7:46 ` Thomas Zimmermann
2021-06-14 14:01 ` Deepak Rawat
@ 2021-06-15 2:04 ` Pu Lehui
1 sibling, 0 replies; 7+ messages in thread
From: Pu Lehui @ 2021-06-15 2:04 UTC (permalink / raw)
To: Thomas Zimmermann, drawat.floss, airlied, daniel
Cc: zhangjinhao2, linux-hyperv, linux-kernel, dri-devel
On 2021/6/9 15:46, Thomas Zimmermann wrote:
> Hi
>
> Am 09.06.21 um 04:49 schrieb Pu Lehui:
>> Fixes gcc '-Wunused-const-variable' warning:
>> drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:152:23: warning:
>> 'hyperv_modifiers' defined but not used [-Wunused-const-variable=]
>>
>> Signed-off-by: Pu Lehui <pulehui@huawei.com>
>> ---
>> drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 5 -----
>> 1 file changed, 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
>> b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
>> index 02718e3e859e..3f83493909e6 100644
>> --- a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
>> +++ b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
>> @@ -149,11 +149,6 @@ static const uint32_t hyperv_formats[] = {
>> DRM_FORMAT_XRGB8888,
>> };
>> -static const uint64_t hyperv_modifiers[] = {
>> - DRM_FORMAT_MOD_LINEAR,
>> - DRM_FORMAT_MOD_INVALID
>> -};
>
> This constant should rather be used in the call to
> drm_simple_display_pipe_init(). [1]
>
> Best regards
> Thomas
>
> [1]
> https://cgit.freedesktop.org/drm/drm-misc/tree/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c#n161
>
>
>
>> -
>> static inline int hyperv_pipe_init(struct hyperv_drm_device *hv)
>> {
>> int ret;
>>
>
Hi Thomas,
Thanks for your suggestion, I will fix it in v2.
Best regards
Lehui
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -next] drm/hyperv: Remove unused variable
2021-06-14 14:01 ` Deepak Rawat
@ 2021-06-15 2:10 ` Pu Lehui
0 siblings, 0 replies; 7+ messages in thread
From: Pu Lehui @ 2021-06-15 2:10 UTC (permalink / raw)
To: Deepak Rawat, Thomas Zimmermann, airlied, daniel
Cc: zhangjinhao2, linux-hyperv, linux-kernel, dri-devel
On 2021/6/14 22:01, Deepak Rawat wrote:
> On Wed, 2021-06-09 at 09:46 +0200, Thomas Zimmermann wrote:
>> Hi
>>
>> Am 09.06.21 um 04:49 schrieb Pu Lehui:
>>> Fixes gcc '-Wunused-const-variable' warning:
>>> drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:152:23: warning:
>>> 'hyperv_modifiers' defined but not used [-Wunused-const-
>>> variable=]
>>>
>>> Signed-off-by: Pu Lehui <pulehui@huawei.com>
>>> ---
>>> drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 5 -----
>>> 1 file changed, 5 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
>>> b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
>>> index 02718e3e859e..3f83493909e6 100644
>>> --- a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
>>> +++ b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
>>> @@ -149,11 +149,6 @@ static const uint32_t hyperv_formats[] = {
>>> DRM_FORMAT_XRGB8888,
>>> };
>>>
>>> -static const uint64_t hyperv_modifiers[] = {
>>> - DRM_FORMAT_MOD_LINEAR,
>>> - DRM_FORMAT_MOD_INVALID
>>> -};
>>
>> This constant should rather be used in the call to
>> drm_simple_display_pipe_init(). [1]
>>
>> Best regards
>> Thomas
>>
>> [1]
>> https://cgit.freedesktop.org/drm/drm-misc/tree/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c#n161
>>
>>
>
> Hi Pu,
>
> Thanks for the patch. Is it possible to send another patch as per
> suggestion by Thomas. There is a kernel test robot failure as well.
>
> Deepak
>
> .
>
Hi Deepak,
Thanks for your reply, I will send v2 soon.
Best regards
Lehui
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 -next] drm/hyperv: Fix unused const variable 'hyperv_modifiers'
2021-06-09 2:49 [PATCH -next] drm/hyperv: Remove unused variable Pu Lehui
2021-06-09 7:46 ` Thomas Zimmermann
@ 2021-06-15 3:14 ` Pu Lehui
2021-06-15 9:25 ` Thomas Zimmermann
1 sibling, 1 reply; 7+ messages in thread
From: Pu Lehui @ 2021-06-15 3:14 UTC (permalink / raw)
To: drawat.floss, airlied, daniel, tzimmermann
Cc: linux-hyperv, dri-devel, linux-kernel, pulehui, zhangjinhao2
There is a gcc '-Wunused-const-variable' warning:
drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:152:23: warning:
'hyperv_modifiers' defined but not used [-Wunused-const-variable=]
while the variable should be used in drm_simple_display_pipe_init()
as suggested by Thomas, let's fix it.
Fixes: 76c56a5affeb ("drm/hyperv: Add DRM driver for hyperv synthetic video device")
Signed-off-by: Pu Lehui <pulehui@huawei.com>
---
drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
index 02718e3e859e..3aaee4730ec6 100644
--- a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
+++ b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
@@ -163,7 +163,7 @@ static inline int hyperv_pipe_init(struct hyperv_drm_device *hv)
&hyperv_pipe_funcs,
hyperv_formats,
ARRAY_SIZE(hyperv_formats),
- NULL,
+ hyperv_modifiers,
&hv->connector);
if (ret)
return ret;
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 -next] drm/hyperv: Fix unused const variable 'hyperv_modifiers'
2021-06-15 3:14 ` [PATCH v2 -next] drm/hyperv: Fix unused const variable 'hyperv_modifiers' Pu Lehui
@ 2021-06-15 9:25 ` Thomas Zimmermann
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Zimmermann @ 2021-06-15 9:25 UTC (permalink / raw)
To: Pu Lehui, drawat.floss, airlied, daniel
Cc: zhangjinhao2, linux-hyperv, linux-kernel, dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 1463 bytes --]
Hi
Am 15.06.21 um 05:14 schrieb Pu Lehui:
> There is a gcc '-Wunused-const-variable' warning:
> drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:152:23: warning:
> 'hyperv_modifiers' defined but not used [-Wunused-const-variable=]
>
> while the variable should be used in drm_simple_display_pipe_init()
> as suggested by Thomas, let's fix it.
Thanks a lot! I added your patch to drm-misc-next-fixes.
Best regards
Thomas
>
> Fixes: 76c56a5affeb ("drm/hyperv: Add DRM driver for hyperv synthetic video device")
> Signed-off-by: Pu Lehui <pulehui@huawei.com>
> ---
> drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
> index 02718e3e859e..3aaee4730ec6 100644
> --- a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
> +++ b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
> @@ -163,7 +163,7 @@ static inline int hyperv_pipe_init(struct hyperv_drm_device *hv)
> &hyperv_pipe_funcs,
> hyperv_formats,
> ARRAY_SIZE(hyperv_formats),
> - NULL,
> + hyperv_modifiers,
> &hv->connector);
> if (ret)
> return ret;
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-06-15 9:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09 2:49 [PATCH -next] drm/hyperv: Remove unused variable Pu Lehui
2021-06-09 7:46 ` Thomas Zimmermann
2021-06-14 14:01 ` Deepak Rawat
2021-06-15 2:10 ` Pu Lehui
2021-06-15 2:04 ` Pu Lehui
2021-06-15 3:14 ` [PATCH v2 -next] drm/hyperv: Fix unused const variable 'hyperv_modifiers' Pu Lehui
2021-06-15 9:25 ` Thomas Zimmermann
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).