From: Robert Foss <robert.foss@collabora.com>
To: Rob Herring <robh@kernel.org>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH hwc] drm_hwcomposer: fix warnings on unused variables and parameters
Date: Thu, 30 Nov 2017 15:33:42 +0100 [thread overview]
Message-ID: <1512052422.2107.14.camel@collabora.com> (raw)
In-Reply-To: <20171129162106.10541-1-robh@kernel.org>
[-- Attachment #1.1: Type: text/plain, Size: 5481 bytes --]
Hey Rob,
I applied and tested this patch, and it looks good to me.
Feel free to add my SB/TB.
Rob.
On Wed, 2017-11-29 at 10:21 -0600, Rob Herring wrote:
> AOSP master now builds by default with -Werror, so fix all the
> warnings.
> All the warnings are related to unused variables and parameters.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> drmcrtc.cpp | 7 +------
> drmcrtc.h | 6 ------
> drmdisplaycompositor.cpp | 3 ---
> drmencoder.cpp | 1 -
> drmencoder.h | 2 --
> drmhwctwo.cpp | 3 +--
> glworker.cpp | 1 -
> platform.cpp | 4 ++--
> 8 files changed, 4 insertions(+), 23 deletions(-)
>
> diff --git a/drmcrtc.cpp b/drmcrtc.cpp
> index c1398699d40d..1b354fe3db61 100644
> --- a/drmcrtc.cpp
> +++ b/drmcrtc.cpp
> @@ -31,12 +31,7 @@ DrmCrtc::DrmCrtc(DrmResources *drm, drmModeCrtcPtr
> c, unsigned pipe)
> id_(c->crtc_id),
> pipe_(pipe),
> display_(-1),
> - x_(c->x),
> - y_(c->y),
> - width_(c->width),
> - height_(c->height),
> - mode_(&c->mode),
> - mode_valid_(c->mode_valid) {
> + mode_(&c->mode) {
> }
>
> int DrmCrtc::Init() {
> diff --git a/drmcrtc.h b/drmcrtc.h
> index 2e8c8118a21d..c5a559968b87 100644
> --- a/drmcrtc.h
> +++ b/drmcrtc.h
> @@ -54,13 +54,7 @@ class DrmCrtc {
> unsigned pipe_;
> int display_;
>
> - uint32_t x_;
> - uint32_t y_;
> - uint32_t width_;
> - uint32_t height_;
> -
> DrmMode mode_;
> - bool mode_valid_;
>
> DrmProperty active_property_;
> DrmProperty mode_property_;
> diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp
> index dceb78d452c4..acd13b834e2a 100644
> --- a/drmdisplaycompositor.cpp
> +++ b/drmdisplaycompositor.cpp
> @@ -490,8 +490,6 @@ int
> DrmDisplayCompositor::CommitFrame(DrmDisplayComposition
> *display_comp,
> std::vector<DrmHwcLayer> &layers = display_comp->layers();
> std::vector<DrmCompositionPlane> &comp_planes =
> display_comp->composition_planes();
> - std::vector<DrmCompositionRegion> &pre_comp_regions =
> - display_comp->pre_comp_regions();
> uint64_t out_fences[drm_->crtcs().size()];
>
> DrmConnector *connector = drm_->GetConnectorForDisplay(display_);
> @@ -681,7 +679,6 @@ int
> DrmDisplayCompositor::CommitFrame(DrmDisplayComposition
> *display_comp,
> }
> }
>
> -out:
> if (!ret) {
> uint32_t flags = DRM_MODE_ATOMIC_ALLOW_MODESET;
> if (test_only)
> diff --git a/drmencoder.cpp b/drmencoder.cpp
> index 1d4ebdc591ad..3d762f34919d 100644
> --- a/drmencoder.cpp
> +++ b/drmencoder.cpp
> @@ -27,7 +27,6 @@ DrmEncoder::DrmEncoder(drmModeEncoderPtr e, DrmCrtc
> *current_crtc,
> const std::vector<DrmCrtc *> &possible_crtcs)
> : id_(e->encoder_id),
> crtc_(current_crtc),
> - type_(e->encoder_type),
> possible_crtcs_(possible_crtcs) {
> }
>
> diff --git a/drmencoder.h b/drmencoder.h
> index ed3c21e1923c..58ccbfbc5004 100644
> --- a/drmencoder.h
> +++ b/drmencoder.h
> @@ -45,8 +45,6 @@ class DrmEncoder {
> uint32_t id_;
> DrmCrtc *crtc_;
>
> - uint32_t type_;
> -
> std::vector<DrmCrtc *> possible_crtcs_;
> };
> }
> diff --git a/drmhwctwo.cpp b/drmhwctwo.cpp
> index 54824b8ce1af..5ab4595bce96 100644
> --- a/drmhwctwo.cpp
> +++ b/drmhwctwo.cpp
> @@ -242,7 +242,6 @@ HWC2::Error
> DrmHwcTwo::HwcDisplay::RegisterVsyncCallback(
>
> HWC2::Error DrmHwcTwo::HwcDisplay::AcceptDisplayChanges() {
> supported(__func__);
> - uint32_t num_changes = 0;
> for (std::pair<const hwc2_layer_t, DrmHwcTwo::HwcLayer> &l :
> layers_)
> l.second.accept_type_change();
> return HWC2::Error::None;
> @@ -614,7 +613,7 @@ HWC2::Error
> DrmHwcTwo::HwcDisplay::SetActiveConfig(hwc2_config_t config) {
> HWC2::Error DrmHwcTwo::HwcDisplay::SetClientTarget(buffer_handle_t
> target,
> int32_t
> acquire_fence,
> int32_t
> dataspace,
> - hwc_region_t
> damage) {
> + hwc_region_t
> /*damage*/) {
> supported(__func__);
> UniqueFd uf(acquire_fence);
>
> diff --git a/glworker.cpp b/glworker.cpp
> index e90576a75f1a..ca726bf573ba 100644
> --- a/glworker.cpp
> +++ b/glworker.cpp
> @@ -478,7 +478,6 @@ int GLWorkerCompositor::Init() {
> const char *egl_extensions;
> const char *gl_extensions;
> EGLint num_configs;
> - EGLint attribs[] = {EGL_WIDTH, 1, EGL_HEIGHT, 1, EGL_NONE,
> EGL_NONE};
> EGLConfig egl_config;
>
> // clang-format off
> diff --git a/platform.cpp b/platform.cpp
> index e920872fa180..56ab37e12d94 100644
> --- a/platform.cpp
> +++ b/platform.cpp
> @@ -142,8 +142,8 @@ int PlanStageProtected::ProvisionPlanes(
>
> int PlanStagePrecomp::ProvisionPlanes(
> std::vector<DrmCompositionPlane> *composition,
> - std::map<size_t, DrmHwcLayer *> &layers, DrmCrtc *crtc,
> - std::vector<DrmPlane *> *planes) {
> + std::map<size_t, DrmHwcLayer *> &layers, DrmCrtc * /*crtc*/,
> + std::vector<DrmPlane *> * /*planes*/) {
> DrmCompositionPlane *precomp = GetPrecomp(composition);
> if (!precomp || precomp->source_layers().empty())
> return 0;
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2017-11-30 14:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-29 16:21 [PATCH hwc] drm_hwcomposer: fix warnings on unused variables and parameters Rob Herring
2017-11-30 14:33 ` Robert Foss [this message]
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=1512052422.2107.14.camel@collabora.com \
--to=robert.foss@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=robh@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox