From patchwork Thu Dec 5 15:02:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13895504 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9712EE7716C for ; Thu, 5 Dec 2024 15:03:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1229410EEB6; Thu, 5 Dec 2024 15:03:14 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="L2puFw7n"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id B416110EEB5; Thu, 5 Dec 2024 15:03:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733410993; x=1764946993; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DsikNBXCdIZVTSilpDpoAhdCiGGe96pPxGezOXGgMVc=; b=L2puFw7nGjCLnX7FcVRxUxlgM3rQsUGIAtRtaRVWwQH34cVYx6QpZw1L 7YtO5OKmiiVqSEEJY+0kuXQngaiCZ2fvrB1mVUBAyEdh7INtw6aJdZ5TB HZoTnVGB6TV51s9CtbaAFV4B8aLAtuvhnMoQTO6367IKIDbA/iOd3nsmD P83fQXlqABoALdaWWXVKeQVM/1RX/R72Op7RlvCso7qZYZEYffuVymxIh a31COqJineFR+cEfBO12/5nTuyf7rcZt32e0ZAS+wg+jpl4sbJZtUBSua 8Hng5yzBGiMvfE10fOcMJtpYbXUtLpfZhs/WEmr6Xo04K1kCXDigShuSD Q==; X-CSE-ConnectionGUID: w3E1osdvSFiRgTxpyTVyZQ== X-CSE-MsgGUID: XGWnCY5JSn6DzlzLKhdpKw== X-IronPort-AV: E=McAfee;i="6700,10204,11277"; a="51142022" X-IronPort-AV: E=Sophos;i="6.12,210,1728975600"; d="scan'208";a="51142022" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2024 07:03:13 -0800 X-CSE-ConnectionGUID: Bm3q89BjTy6NKii8yXc0lg== X-CSE-MsgGUID: 2GBOgD3XRXCtATKithSe5g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,210,1728975600"; d="scan'208";a="93983008" Received: from unknown (HELO localhost) ([10.237.66.160]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2024 07:03:09 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, jani.nikula@intel.com, Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Nathan Chancellor Subject: [PATCH v2 1/3] drm/bridge: dw-hdmi-i2s: annotate hdmi_read() with __maybe_unused Date: Thu, 5 Dec 2024 17:02:59 +0200 Message-Id: X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Building with clang and and W=1 leads to warning about unused hdmi_read(). Fix by annotating it with __maybe_unused. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Signed-off-by: Jani Nikula --- Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Robert Foss Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: Nathan Chancellor --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c index 26c187d20d97..4377f9d89a82 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c @@ -27,7 +27,7 @@ static inline void hdmi_write(struct dw_hdmi_i2s_audio_data *audio, audio->write(hdmi, val, offset); } -static inline u8 hdmi_read(struct dw_hdmi_i2s_audio_data *audio, int offset) +static inline __maybe_unused u8 hdmi_read(struct dw_hdmi_i2s_audio_data *audio, int offset) { struct dw_hdmi *hdmi = audio->hdmi; From patchwork Thu Dec 5 15:03:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13895505 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 179A7E7716D for ; Thu, 5 Dec 2024 15:03:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8710F10EEB7; Thu, 5 Dec 2024 15:03:18 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="kW+aEkOt"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id A154510EEAF; Thu, 5 Dec 2024 15:03:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733410998; x=1764946998; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xdm2W9G4tud+fGwnz4XctuLIlKhDZgs4DypnCRwNcTg=; b=kW+aEkOtWl+xlAWXXb1rDU2ViLqVQ9vRRFDxH6Kp8PB6Cv3CS7pyBCU3 K4sZnNtWYDhY3wVDujFfxkooNguecaKtoC2wX6gGNQCI3UPvhjnX1PcaR TE5+86XIf4xY+a3wGSARAYsqj+I6KgeH4ukG7LEZTZ2KQ8Y/7HjuYabwX 8YxuHstXie+rE7+vXDE6xzneQooihp+5FWjFugNxahwChePVOxG0qS3iY BqYcSpOVWTpxOdI+mozz1CJv3K5rxW4D+hvgD5aFYBKaSuXC7VMAIfsbc 6Wth853l36Jtu5EV9sR3Lc2oIvJgGKoAa5Pbfdw6s/zYmI0CEp5AlKyeR Q==; X-CSE-ConnectionGUID: 7/SuJSwLRUKJI0ZSunsrbQ== X-CSE-MsgGUID: 3C0IEP0PQSeG7BlRKW25qw== X-IronPort-AV: E=McAfee;i="6700,10204,11277"; a="51142040" X-IronPort-AV: E=Sophos;i="6.12,210,1728975600"; d="scan'208";a="51142040" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2024 07:03:17 -0800 X-CSE-ConnectionGUID: R3T1NA7uQtyxhlI2jqefzg== X-CSE-MsgGUID: VKyJbwVCSi2deNFrfogdIg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,210,1728975600"; d="scan'208";a="93983037" Received: from unknown (HELO localhost) ([10.237.66.160]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2024 07:03:15 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, jani.nikula@intel.com, Laurent Pinchart , Kieran Bingham , linux-renesas-soc@vger.kernel.org, Nathan Chancellor Subject: [PATCH v2 2/3] drm: renesas: rcar-du: annotate rcar_cmm_read() with __maybe_unused Date: Thu, 5 Dec 2024 17:03:00 +0200 Message-Id: <5b0df175e8b86e5d8746ee32e63bb633bc2765b1.1733410889.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Building with clang and and W=1 leads to warning about unused rcar_cmm_read(). Fix by annotating it with __maybe_unused. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Signed-off-by: Jani Nikula --- Cc: Laurent Pinchart Cc: Kieran Bingham Cc: linux-renesas-soc@vger.kernel.org Cc: Nathan Chancellor --- drivers/gpu/drm/renesas/rcar-du/rcar_cmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_cmm.c b/drivers/gpu/drm/renesas/rcar-du/rcar_cmm.c index 26a2f5ad8ee5..ea52b0af9226 100644 --- a/drivers/gpu/drm/renesas/rcar-du/rcar_cmm.c +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_cmm.c @@ -32,7 +32,7 @@ struct rcar_cmm { } lut; }; -static inline int rcar_cmm_read(struct rcar_cmm *rcmm, u32 reg) +static inline __maybe_unused int rcar_cmm_read(struct rcar_cmm *rcmm, u32 reg) { return ioread32(rcmm->base + reg); } From patchwork Thu Dec 5 15:03:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13895506 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DE85DE7716C for ; Thu, 5 Dec 2024 15:03:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5C32010EEC0; Thu, 5 Dec 2024 15:03:22 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="HxOwknsQ"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5AE4110EEBD; Thu, 5 Dec 2024 15:03:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733411002; x=1764947002; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VgB16SUwB40D8pkmq2AAKF+KX6DylHdsVIYJ2Jcst9w=; b=HxOwknsQsoClxoHCdWbCbBzwPWLofOk8rCE5duXqqdZ92PmjgCQaawon PqsMHkS21dOil/zirudH1uyftoD8nOTjcpkYhRAOevR7GUUebHFkhyd3g QFnxDlWhHbjgzaet7KqGtLWOVeJKNLY/ci9ZZhDJYNVu4vCmLU5qYq+Cm 6B0kI4skzTzxQmTFaRs5+QsOB0rzpD59MaJYK+q8cUM6LHxf+b5h83Tdq aCRxRszlS9giVJqSH9Ro5UCYNTePfqhfQJi0NxLACmAmmvpPg8k1gDT8p 1onuAJvnmh6/IcuzfnlGDuRTgLumG4Fat59RtGV1HAIepPT3532LIyoxE w==; X-CSE-ConnectionGUID: WjcQsUu9Tg65a1HaOs5wGg== X-CSE-MsgGUID: lFbi7Ve2Qha6CRvlxj6INg== X-IronPort-AV: E=McAfee;i="6700,10204,11277"; a="51142054" X-IronPort-AV: E=Sophos;i="6.12,210,1728975600"; d="scan'208";a="51142054" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2024 07:03:21 -0800 X-CSE-ConnectionGUID: JpaeEYL3Tz+ZJj1vRBb2jw== X-CSE-MsgGUID: QfWzWlMsQAuD3QtDMv8u9g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,210,1728975600"; d="scan'208";a="93983058" Received: from unknown (HELO localhost) ([10.237.66.160]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2024 07:03:19 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, jani.nikula@intel.com, Nathan Chancellor Subject: [PATCH v2 3/3] drm: enable warnings on unused static inlines Date: Thu, 5 Dec 2024 17:03:01 +0200 Message-Id: <4b57ede9724befc59fbe8c9b142c2cf5e30a48e5.1733410889.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" We enable most W=1 warnings by default subsystem wide. Also enable warnings on unused static inlines when building with clang. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Cc: Nathan Chancellor Tested-by: Nathan Chancellor # build Signed-off-by: Jani Nikula --- drivers/gpu/drm/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 1677c1f335fb..73b3b3dbc27e 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -19,6 +19,9 @@ subdir-ccflags-y += $(call cc-option, -Wformat-overflow) # FIXME: fix -Wformat-truncation warnings and uncomment #subdir-ccflags-y += $(call cc-option, -Wformat-truncation) subdir-ccflags-y += $(call cc-option, -Wstringop-truncation) + +subdir-ccflags-y += -DKBUILD_EXTRA_WARN1 + # The following turn off the warnings enabled by -Wextra ifeq ($(findstring 2, $(KBUILD_EXTRA_WARN)),) subdir-ccflags-y += -Wno-missing-field-initializers