Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1232074pxk; Thu, 10 Sep 2020 10:09:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/J0CJVT64dzryhdOSUtk7PuKQjShZdqebbKZKY9xG14B/q8eL206+iEQoELGKBl2v4lMl X-Received: by 2002:a50:84e8:: with SMTP id 95mr10081615edq.99.1599757751725; Thu, 10 Sep 2020 10:09:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599757751; cv=none; d=google.com; s=arc-20160816; b=yutk7+5kshesAlBwnpaBtd3JmJ504Q3RrWfbiKUen9NlK40L/ZgZb0TuGKe56etadJ hp7+vJFohzyvB/BTaXCEWGMTRlkmuU1y7ghbH3Db176bbKtmb+IC47H1UkqO07ytAVfB IBrHtdaYnXjHcQ/DVwPIY6n8EiAZM3sAVSnMl2aBmlyPqnKWWQuV7iN1/hFGc/U/yAlV hkLJdAUbPURIGYiKpGOWkXJ8W2788AqNyZZfQyClTv/oLTvaSgcxEmuNBEfBqm9465NU a0MqVOZAG8hFrH0ZIyt0eHmjGjItjhRhmyp+iQeQ2TJ2O4pyAXfm1bZK/rvw/ruivSx7 CJoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=kX63D1UHED1kS8hbCxUzu+mEWg7ZHS1VFvzltaxjL10=; b=d0ghTa5qFxo/IOrF3xjia+OOWlyu5ua4WoSpNAaE265o31i2wNMx7su2deJe7qHkQC QXuiQnA+tdLF0p3uMIVpKq0mU4FX03PttFEJEAFF2UintsllTGcjbU2qO6UOQg82zQwO 4vjjU+gskYobJtN+wmYtLHYSShKy1Yc9H5ce/1vUi6G5coSPM1LLbOjI4N1ts7hwmAyo V+DjzmHTuiqtcRpKb92w3c1S3a7RIecwyYgmecBT7w1z4uTnuT84psZVx2c4ybQmgvfN cgrbcgOGICn0huZS88mSvIu2XkY3En3SDVWdj611Fc8d7xKzJBTTXAId7eLQkBQLhwey lVxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KFEjsz6d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ci4si4162881ejb.290.2020.09.10.10.08.48; Thu, 10 Sep 2020 10:09:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KFEjsz6d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726612AbgIJRGP (ORCPT + 99 others); Thu, 10 Sep 2020 13:06:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726980AbgIJRFw (ORCPT ); Thu, 10 Sep 2020 13:05:52 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C793C061573 for ; Thu, 10 Sep 2020 10:05:52 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id w12so6803432qki.6 for ; Thu, 10 Sep 2020 10:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kX63D1UHED1kS8hbCxUzu+mEWg7ZHS1VFvzltaxjL10=; b=KFEjsz6dsif7THN645xuBX/Te4+yd6MQ/TqEo10SYpgYzr6PqmPiUvOnofhZTm8pLJ i1MSGyiUENF2fRYa4g7GQyXxK3QGxk0ORzFvLkYrquAF92ONVfZSpirXIun2NYHPJjA/ SklQ2A5KYMnTEbIBXPvILYPo87Bh4Mtyif+RUApWr4mGX9fMK0BgMEh72V8C35BkVVhZ k6gq97Fv/tAkKyUTFXItuHq5Xp4FrAITe3pZgmcixtymxAzJAZFpbtyXIUMfeWKHaCmU GUojq/Qd0HEpx0bdDj14qXy97BfhZsdn85u6NEhuJddW8wrCVxfshFetMeUfhMjEgqlG 43Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kX63D1UHED1kS8hbCxUzu+mEWg7ZHS1VFvzltaxjL10=; b=UV9sEMZPWjcV0k0OAh1vW4A6EOHJcH8hQmqfqukBpbrOJ+XK/H6f/ml5YcosuNihtb hTTLo0rfB5VzzYVoewhPoZEjnvFV6hKkECiYAbqP22oNoYPxZny0Rlgh+EJtOHaOKeHp CNIK68uSRrfftXpO/yYaH51ZDR0vVX33kG+CX8mKHqq9pLvurNbH206xuRSQ7RWipB+3 UQlbwmtOgQJm33sRhTcSpykuSkEciRYTslQe3/ibi0NrZpEuF/ytD5s4kmaG3Ikwyrn8 OWnzSgtclJRdaHZKw53AkKlNV7IMN2+5cTBt6lfpdloggIw/V1b+t28j0wQ5RmrRN7dS R9Tg== X-Gm-Message-State: AOAM5315UxRe50XZK9/tgRPnsvWJAoFzUaYDmS2iaYWBTOOo7QUWtWqi ymsAZF/dbIRFjmn+Xowuz3k= X-Received: by 2002:a05:620a:8c8:: with SMTP id z8mr8748406qkz.63.1599757551410; Thu, 10 Sep 2020 10:05:51 -0700 (PDT) Received: from localhost.localdomain ([2604:1380:45d1:2600::1]) by smtp.gmail.com with ESMTPSA id j11sm6924193qko.111.2020.09.10.10.05.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 10:05:50 -0700 (PDT) From: Nathan Chancellor To: Eric Anholt , Maxime Ripard Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH] drm/vc4: Update type of reg parameter in vc4_hdmi_{read,write} Date: Thu, 10 Sep 2020 10:04:02 -0700 Message-Id: <20200910170401.3857250-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang warns 100+ times in the vc4 driver along the lines of: drivers/gpu/drm/vc4/vc4_hdmi_phy.c:518:13: warning: implicit conversion from enumeration type 'enum vc4_hdmi_field' to different enumeration type 'enum vc4_hdmi_regs' [-Wenum-conversion] HDMI_WRITE(HDMI_TX_PHY_POWERDOWN_CTL, ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ The HDMI_READ and HDMI_WRITE macros pass in enumerators of type vc4_hdmi_field but vc4_hdmi_write and vc4_hdmi_read expect a enumerator of type vc4_hdmi_regs, causing a warning for every instance of this. Update the parameter type so there is no more mismatch. Fixes: 311e305fdb4e ("drm/vc4: hdmi: Implement a register layout abstraction") Link: https://github.com/ClangBuiltLinux/linux/issues/1149 Signed-off-by: Nathan Chancellor --- Note, the variable names in these functions do not really make much sense after this patch but attempting to flip the variable names made everything feel even weirder. Feel free to rewrite this in whatever way you prefer, I just don't want my builds to be chalk full of warnings :) drivers/gpu/drm/vc4/vc4_hdmi_regs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi_regs.h b/drivers/gpu/drm/vc4/vc4_hdmi_regs.h index 47364bd3960d..7c6b4818f245 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi_regs.h +++ b/drivers/gpu/drm/vc4/vc4_hdmi_regs.h @@ -392,7 +392,7 @@ void __iomem *__vc4_hdmi_get_field_base(struct vc4_hdmi *hdmi, } static inline u32 vc4_hdmi_read(struct vc4_hdmi *hdmi, - enum vc4_hdmi_regs reg) + enum vc4_hdmi_field reg) { const struct vc4_hdmi_register *field; const struct vc4_hdmi_variant *variant = hdmi->variant; @@ -417,7 +417,7 @@ static inline u32 vc4_hdmi_read(struct vc4_hdmi *hdmi, #define HDMI_READ(reg) vc4_hdmi_read(vc4_hdmi, reg) static inline void vc4_hdmi_write(struct vc4_hdmi *hdmi, - enum vc4_hdmi_regs reg, + enum vc4_hdmi_field reg, u32 value) { const struct vc4_hdmi_register *field; base-commit: 8c3c818c23a5bbce6ff180dd2ee04415241df77c -- 2.28.0