* [PATCH] fix a wrong use of a logical operator in drmmode_output_dpms()
@ 2015-05-20 15:08 Samuel Pitoiset
[not found] ` <1432134538-13701-1-git-send-email-samuel.pitoiset-MZpvjPyXg2s@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Samuel Pitoiset @ 2015-05-20 15:08 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Samuel Pitoiset
This is probably a typo error which has been introduced in 2009...
This fixes the following warning detected by Clang :
drmmode_display.c:907:30: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
if (props && (props->flags && DRM_MODE_PROP_ENUM)) {
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
---
src/drmmode_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 7c1d2bb..161bccd 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -904,7 +904,7 @@ drmmode_output_dpms(xf86OutputPtr output, int mode)
for (i = 0; i < koutput->count_props; i++) {
props = drmModeGetProperty(drmmode->fd, koutput->props[i]);
- if (props && (props->flags && DRM_MODE_PROP_ENUM)) {
+ if (props && (props->flags & DRM_MODE_PROP_ENUM)) {
if (!strcmp(props->name, "DPMS")) {
mode_id = koutput->props[i];
drmModeFreeProperty(props);
--
2.4.1
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] fix a wrong use of a logical operator in drmmode_output_dpms()
[not found] ` <1432134538-13701-1-git-send-email-samuel.pitoiset-MZpvjPyXg2s@public.gmane.org>
@ 2015-05-20 17:11 ` Tobias Klausmann
[not found] ` <555CC056.4020006-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Tobias Klausmann @ 2015-05-20 17:11 UTC (permalink / raw)
To: Samuel Pitoiset, nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
looks good to me! :)
Feel free to add my R-b.
On 20.05.2015 17:08, Samuel Pitoiset wrote:
> This is probably a typo error which has been introduced in 2009...
> This fixes the following warning detected by Clang :
>
> drmmode_display.c:907:30: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
> if (props && (props->flags && DRM_MODE_PROP_ENUM)) {
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
> ---
> src/drmmode_display.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index 7c1d2bb..161bccd 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -904,7 +904,7 @@ drmmode_output_dpms(xf86OutputPtr output, int mode)
>
> for (i = 0; i < koutput->count_props; i++) {
> props = drmModeGetProperty(drmmode->fd, koutput->props[i]);
> - if (props && (props->flags && DRM_MODE_PROP_ENUM)) {
> + if (props && (props->flags & DRM_MODE_PROP_ENUM)) {
> if (!strcmp(props->name, "DPMS")) {
> mode_id = koutput->props[i];
> drmModeFreeProperty(props);
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] fix a wrong use of a logical operator in drmmode_output_dpms()
[not found] ` <555CC056.4020006-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
@ 2015-05-20 17:13 ` Ilia Mirkin
[not found] ` <CAKb7Uvhy-o3-iAZD+EJLhhHVDGc_Zvm=-exna8waTa9QV_CVvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Ilia Mirkin @ 2015-05-20 17:13 UTC (permalink / raw)
To: Tobias Klausmann
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
This is obviously a bug, but one that has been there for some time.
Please figure out what this is guarding, and confirm that the feature
continues to work.
On Wed, May 20, 2015 at 1:11 PM, Tobias Klausmann
<tobias.johannes.klausmann@mni.thm.de> wrote:
> looks good to me! :)
>
> Feel free to add my R-b.
>
> On 20.05.2015 17:08, Samuel Pitoiset wrote:
>>
>> This is probably a typo error which has been introduced in 2009...
>> This fixes the following warning detected by Clang :
>>
>> drmmode_display.c:907:30: warning: use of logical '&&' with constant
>> operand [-Wconstant-logical-operand]
>> if (props && (props->flags && DRM_MODE_PROP_ENUM)) {
>>
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
>> ---
>> src/drmmode_display.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
>> index 7c1d2bb..161bccd 100644
>> --- a/src/drmmode_display.c
>> +++ b/src/drmmode_display.c
>> @@ -904,7 +904,7 @@ drmmode_output_dpms(xf86OutputPtr output, int mode)
>> for (i = 0; i < koutput->count_props; i++) {
>> props = drmModeGetProperty(drmmode->fd,
>> koutput->props[i]);
>> - if (props && (props->flags && DRM_MODE_PROP_ENUM)) {
>> + if (props && (props->flags & DRM_MODE_PROP_ENUM)) {
>> if (!strcmp(props->name, "DPMS")) {
>> mode_id = koutput->props[i];
>> drmModeFreeProperty(props);
>
>
> _______________________________________________
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] fix a wrong use of a logical operator in drmmode_output_dpms()
[not found] ` <CAKb7Uvhy-o3-iAZD+EJLhhHVDGc_Zvm=-exna8waTa9QV_CVvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-05-20 17:26 ` Samuel Pitoiset
[not found] ` <555CC3C1.3010102-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Samuel Pitoiset @ 2015-05-20 17:26 UTC (permalink / raw)
To: Ilia Mirkin, Tobias Klausmann
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
On 05/20/2015 07:13 PM, Ilia Mirkin wrote:
> This is obviously a bug, but one that has been there for some time.
> Please figure out what this is guarding, and confirm that the feature
> continues to work.
Sure, but do you have any ideas how to test this part of the DDX ?
It's the first time I play with it...
>
> On Wed, May 20, 2015 at 1:11 PM, Tobias Klausmann
> <tobias.johannes.klausmann@mni.thm.de> wrote:
>> looks good to me! :)
>>
>> Feel free to add my R-b.
>>
>> On 20.05.2015 17:08, Samuel Pitoiset wrote:
>>> This is probably a typo error which has been introduced in 2009...
>>> This fixes the following warning detected by Clang :
>>>
>>> drmmode_display.c:907:30: warning: use of logical '&&' with constant
>>> operand [-Wconstant-logical-operand]
>>> if (props && (props->flags && DRM_MODE_PROP_ENUM)) {
>>>
>>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
>>> ---
>>> src/drmmode_display.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
>>> index 7c1d2bb..161bccd 100644
>>> --- a/src/drmmode_display.c
>>> +++ b/src/drmmode_display.c
>>> @@ -904,7 +904,7 @@ drmmode_output_dpms(xf86OutputPtr output, int mode)
>>> for (i = 0; i < koutput->count_props; i++) {
>>> props = drmModeGetProperty(drmmode->fd,
>>> koutput->props[i]);
>>> - if (props && (props->flags && DRM_MODE_PROP_ENUM)) {
>>> + if (props && (props->flags & DRM_MODE_PROP_ENUM)) {
>>> if (!strcmp(props->name, "DPMS")) {
>>> mode_id = koutput->props[i];
>>> drmModeFreeProperty(props);
>>
>> _______________________________________________
>> Nouveau mailing list
>> Nouveau@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] fix a wrong use of a logical operator in drmmode_output_dpms()
[not found] ` <555CC3C1.3010102-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-05-21 4:40 ` Dave Airlie
[not found] ` <CAPM=9tyH-Xo09iAQ=0F-Vk8YtEDQkaaeLdDnmOwpDkEdC2t=sw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Dave Airlie @ 2015-05-21 4:40 UTC (permalink / raw)
To: Samuel Pitoiset; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
On 21 May 2015 at 03:26, Samuel Pitoiset <samuel.pitoiset@gmail.com> wrote:
>
>
> On 05/20/2015 07:13 PM, Ilia Mirkin wrote:
>>
>> This is obviously a bug, but one that has been there for some time.
>> Please figure out what this is guarding, and confirm that the feature
>> continues to work.
>
>
> Sure, but do you have any ideas how to test this part of the DDX ?
> It's the first time I play with it...
>
It's fine, the code just avoids going into the name checks if the type
isn't a enum,
it won't break anything actually fixing it.
The fix is
Reviewed-by: Dave Airlie <airlied@redhat.com>
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] fix a wrong use of a logical operator in drmmode_output_dpms()
[not found] ` <CAPM=9tyH-Xo09iAQ=0F-Vk8YtEDQkaaeLdDnmOwpDkEdC2t=sw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-05-27 11:23 ` Samuel Pitoiset
[not found] ` <5565A939.7060800-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Samuel Pitoiset @ 2015-05-27 11:23 UTC (permalink / raw)
To: Dave Airlie; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
On 05/21/2015 06:40 AM, Dave Airlie wrote:
> On 21 May 2015 at 03:26, Samuel Pitoiset <samuel.pitoiset@gmail.com> wrote:
>>
>> On 05/20/2015 07:13 PM, Ilia Mirkin wrote:
>>> This is obviously a bug, but one that has been there for some time.
>>> Please figure out what this is guarding, and confirm that the feature
>>> continues to work.
>>
>> Sure, but do you have any ideas how to test this part of the DDX ?
>> It's the first time I play with it...
>>
> It's fine, the code just avoids going into the name checks if the type
> isn't a enum,
> it won't break anything actually fixing it.
>
> The fix is
>
> Reviewed-by: Dave Airlie <airlied@redhat.com>
Okay, thanks Dave.
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] fix a wrong use of a logical operator in drmmode_output_dpms()
[not found] ` <5565A939.7060800-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-06-10 21:47 ` Samuel Pitoiset
0 siblings, 0 replies; 7+ messages in thread
From: Samuel Pitoiset @ 2015-06-10 21:47 UTC (permalink / raw)
To: Dave Airlie; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Pushed.
On 05/27/2015 01:23 PM, Samuel Pitoiset wrote:
>
>
> On 05/21/2015 06:40 AM, Dave Airlie wrote:
>> On 21 May 2015 at 03:26, Samuel Pitoiset <samuel.pitoiset@gmail.com>
>> wrote:
>>>
>>> On 05/20/2015 07:13 PM, Ilia Mirkin wrote:
>>>> This is obviously a bug, but one that has been there for some time.
>>>> Please figure out what this is guarding, and confirm that the feature
>>>> continues to work.
>>>
>>> Sure, but do you have any ideas how to test this part of the DDX ?
>>> It's the first time I play with it...
>>>
>> It's fine, the code just avoids going into the name checks if the type
>> isn't a enum,
>> it won't break anything actually fixing it.
>>
>> The fix is
>>
>> Reviewed-by: Dave Airlie <airlied@redhat.com>
>
> Okay, thanks Dave.
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-06-10 21:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-20 15:08 [PATCH] fix a wrong use of a logical operator in drmmode_output_dpms() Samuel Pitoiset
[not found] ` <1432134538-13701-1-git-send-email-samuel.pitoiset-MZpvjPyXg2s@public.gmane.org>
2015-05-20 17:11 ` Tobias Klausmann
[not found] ` <555CC056.4020006-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-05-20 17:13 ` Ilia Mirkin
[not found] ` <CAKb7Uvhy-o3-iAZD+EJLhhHVDGc_Zvm=-exna8waTa9QV_CVvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-20 17:26 ` Samuel Pitoiset
[not found] ` <555CC3C1.3010102-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-21 4:40 ` Dave Airlie
[not found] ` <CAPM=9tyH-Xo09iAQ=0F-Vk8YtEDQkaaeLdDnmOwpDkEdC2t=sw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-27 11:23 ` Samuel Pitoiset
[not found] ` <5565A939.7060800-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-10 21:47 ` Samuel Pitoiset
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.