All of lore.kernel.org
 help / color / mirror / Atom feed
* Clang warning in drivers/gpu/drm/i915/i915_debugfs.c
@ 2019-01-08 19:13 ` Nathan Chancellor
  0 siblings, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2019-01-08 19:13 UTC (permalink / raw)
  To: Manasi Navare, Rodrigo Vivi; +Cc: intel-gfx, linux-kernel, dri-devel

Hi all,

Commit e845f099f1c6 ("drm/i915/dsc: Add Per connector debugfs node for
DSC support/enable") causes a Clang warning:

drivers/gpu/drm/i915/i915_debugfs.c:4961:17: warning: address of array 'intel_dp->dsc_dpcd' will always evaluate to 'true' [-Wpointer-bool-conversion]
                if (intel_dp->dsc_dpcd)
                ~~  ~~~~~~~~~~^~~~~~~~
1 warning generated.

Did you mean to dereference it or should that print statement just
always show? I normally would send a patch myself but since I'm not
familiar with this code, I'd rather not shoot in the dark :) especially
since it's for a trivial logging statement.

Thanks,
Nathan
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Clang warning in drivers/gpu/drm/i915/i915_debugfs.c
@ 2019-01-08 19:13 ` Nathan Chancellor
  0 siblings, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2019-01-08 19:13 UTC (permalink / raw)
  To: Manasi Navare, Rodrigo Vivi
  Cc: Lyude Paul, Jani Nikula, Joonas Lahtinen, intel-gfx, dri-devel,
	linux-kernel

Hi all,

Commit e845f099f1c6 ("drm/i915/dsc: Add Per connector debugfs node for
DSC support/enable") causes a Clang warning:

drivers/gpu/drm/i915/i915_debugfs.c:4961:17: warning: address of array 'intel_dp->dsc_dpcd' will always evaluate to 'true' [-Wpointer-bool-conversion]
                if (intel_dp->dsc_dpcd)
                ~~  ~~~~~~~~~~^~~~~~~~
1 warning generated.

Did you mean to dereference it or should that print statement just
always show? I normally would send a patch myself but since I'm not
familiar with this code, I'd rather not shoot in the dark :) especially
since it's for a trivial logging statement.

Thanks,
Nathan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Clang warning in drivers/gpu/drm/i915/i915_debugfs.c
  2019-01-08 19:13 ` Nathan Chancellor
@ 2019-01-15 10:53   ` Jani Nikula
  -1 siblings, 0 replies; 4+ messages in thread
From: Jani Nikula @ 2019-01-15 10:53 UTC (permalink / raw)
  To: Nathan Chancellor, Manasi Navare, Rodrigo Vivi
  Cc: intel-gfx, linux-kernel, dri-devel

On Tue, 08 Jan 2019, Nathan Chancellor <natechancellor@gmail.com> wrote:
> Hi all,
>
> Commit e845f099f1c6 ("drm/i915/dsc: Add Per connector debugfs node for
> DSC support/enable") causes a Clang warning:
>
> drivers/gpu/drm/i915/i915_debugfs.c:4961:17: warning: address of array 'intel_dp->dsc_dpcd' will always evaluate to 'true' [-Wpointer-bool-conversion]
>                 if (intel_dp->dsc_dpcd)
>                 ~~  ~~~~~~~~~~^~~~~~~~
> 1 warning generated.
>
> Did you mean to dereference it or should that print statement just
> always show? I normally would send a patch myself but since I'm not
> familiar with this code, I'd rather not shoot in the dark :) especially
> since it's for a trivial logging statement.

Fixed by fed85691b408 ("drm/i915: Fix the static code analysis warning
in debugfs"), thanks for the report & review on that one.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Clang warning in drivers/gpu/drm/i915/i915_debugfs.c
@ 2019-01-15 10:53   ` Jani Nikula
  0 siblings, 0 replies; 4+ messages in thread
From: Jani Nikula @ 2019-01-15 10:53 UTC (permalink / raw)
  To: Nathan Chancellor, Manasi Navare, Rodrigo Vivi
  Cc: Lyude Paul, Joonas Lahtinen, intel-gfx, dri-devel, linux-kernel

On Tue, 08 Jan 2019, Nathan Chancellor <natechancellor@gmail.com> wrote:
> Hi all,
>
> Commit e845f099f1c6 ("drm/i915/dsc: Add Per connector debugfs node for
> DSC support/enable") causes a Clang warning:
>
> drivers/gpu/drm/i915/i915_debugfs.c:4961:17: warning: address of array 'intel_dp->dsc_dpcd' will always evaluate to 'true' [-Wpointer-bool-conversion]
>                 if (intel_dp->dsc_dpcd)
>                 ~~  ~~~~~~~~~~^~~~~~~~
> 1 warning generated.
>
> Did you mean to dereference it or should that print statement just
> always show? I normally would send a patch myself but since I'm not
> familiar with this code, I'd rather not shoot in the dark :) especially
> since it's for a trivial logging statement.

Fixed by fed85691b408 ("drm/i915: Fix the static code analysis warning
in debugfs"), thanks for the report & review on that one.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-15 10:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-08 19:13 Clang warning in drivers/gpu/drm/i915/i915_debugfs.c Nathan Chancellor
2019-01-08 19:13 ` Nathan Chancellor
2019-01-15 10:53 ` Jani Nikula
2019-01-15 10:53   ` 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.