[Freedreno] [freedreno][PATCH] drmmode_output_dpms: Replace logical && with bitwise & operation

Andreas Färber afaerber at suse.de
Mon Sep 7 07:28:02 PDT 2015


Am 07.09.2015 um 10:50 schrieb Khem Raj:
> This is a mask calculation so bitbwise & should have been used

"bitwise", and add a full stop after the sentence while at it?

> 
> Signed-off-by: Khem Raj <raj.khem at 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 c3cf4f8..eb54b59 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -777,7 +777,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);

Looks sensible,

Reviewed-by: Andreas Färber <afaerber at suse.de>

Regards,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton; HRB 21284 (AG Nürnberg)


More information about the Freedreno mailing list