All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <natechancellor@gmail.com>
To: Manasi Navare <manasi.d.navare@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Subject: Clang warning in drivers/gpu/drm/i915/i915_debugfs.c
Date: Tue, 8 Jan 2019 12:13:14 -0700	[thread overview]
Message-ID: <20190108191314.GA25250@flashbox> (raw)

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

WARNING: multiple messages have this Message-ID (diff)
From: Nathan Chancellor <natechancellor@gmail.com>
To: Manasi Navare <manasi.d.navare@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Lyude Paul <lyude@redhat.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Clang warning in drivers/gpu/drm/i915/i915_debugfs.c
Date: Tue, 8 Jan 2019 12:13:14 -0700	[thread overview]
Message-ID: <20190108191314.GA25250@flashbox> (raw)

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

             reply	other threads:[~2019-01-08 19:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08 19:13 Nathan Chancellor [this message]
2019-01-08 19:13 ` Clang warning in drivers/gpu/drm/i915/i915_debugfs.c Nathan Chancellor
2019-01-15 10:53 ` Jani Nikula
2019-01-15 10:53   ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190108191314.GA25250@flashbox \
    --to=natechancellor@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manasi.d.navare@intel.com \
    --cc=rodrigo.vivi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.