From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 34C39227B82; Sun, 24 Nov 2024 13:46:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732456018; cv=none; b=Mb0eOa2gkdLqq+hexGTtAZDV8nfi8G9dLz3tbrkRN3WrbA3qtvUQTGlpjup13C44t9WmuOSpF9UZGiZ+P7jUlj1cg7N/p0cpJgs45nK66xp6rIZFbXTEWWrbfKZ1j5rb4qPJUrWhjxoIRVsc0a1P0ZErajtfBivKMJHQ/j87H+A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732456018; c=relaxed/simple; bh=v2AETwvszsaxg3r7uA01/4mHUF0zeFnmwO/A5luv1MM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kYMdMdeCDe/xqfHl5MoUNa1r5KX7jeDJxsYFheuPxXSE1Zvi63W4xeM1/PnzwaSsPqfhPZVqlyPLbdq0G1t29tfAYDj4wbt1guwjEaPy8583jkrzvxgexhuu8Y++FOc1zqSumkCgumodmKX/XNXIps0GxBnIWKaG5U3dmtrdKgI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OChDbG/u; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OChDbG/u" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99A70C4CECC; Sun, 24 Nov 2024 13:46:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1732456018; bh=v2AETwvszsaxg3r7uA01/4mHUF0zeFnmwO/A5luv1MM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OChDbG/uJxVg+14tq/Lp8stFN19DRwN88qNLVvdBjAr1xXxs46AYmwFZj3+MfBIae jYu2NyXSXNZU9rmk7hZ7objjzb+eMCUM0hw5lXtUPPUBhEmdzW8YRdAjDl8f5kB6xq fN7dFhBysCihDhCPJqJN0OAVK/1cI3aVvVIDQbKzjsC1t4ElxgMfpX10U8U2NZaxfV z7PzEkONuow6aZqRfHZmNkzRe/vZIZ4POlOY4xoyE4L/j9KOZVeKUhXq1lqgMvfxVg xIMc5BwHUmQl5lCEU3bYAyCD8sYE9RjOPKLBARzAWU3nG/z2C9R2fwLcqxto4QowtD dnvgKqDw7urSw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Brahmajit Das , Jani Nikula , Sasha Levin , maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, dmitry.baryshkov@linaro.org, rdunlap@infradead.org, oleksandr@natalenko.name, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 6.6 11/61] drm/display: Fix building with GCC 15 Date: Sun, 24 Nov 2024 08:44:46 -0500 Message-ID: <20241124134637.3346391-11-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241124134637.3346391-1-sashal@kernel.org> References: <20241124134637.3346391-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.6.63 Content-Transfer-Encoding: 8bit From: Brahmajit Das [ Upstream commit a500f3751d3c861be7e4463c933cf467240cca5d ] GCC 15 enables -Werror=unterminated-string-initialization by default. This results in the following build error drivers/gpu/drm/display/drm_dp_dual_mode_helper.c: In function ‘is_hdmi_adaptor’: drivers/gpu/drm/display/drm_dp_dual_mode_helper.c:164:17: error: initializer-string for array of ‘char’ is too long [-Werror=unterminated-string-initialization] 164 | "DP-HDMI ADAPTOR\x04"; | ^~~~~~~~~~~~~~~~~~~~~ After discussion with Ville, the fix was to increase the size of dp_dual_mode_hdmi_id array by one, so that it can accommodate the NULL line character. This should let us build the kernel with GCC 15. Signed-off-by: Brahmajit Das Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20241002092311.942822-1-brahmajit.xyz@gmail.com Signed-off-by: Jani Nikula Signed-off-by: Sasha Levin --- drivers/gpu/drm/display/drm_dp_dual_mode_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c b/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c index bd61e20770a5b..719da3610310f 100644 --- a/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c +++ b/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c @@ -160,11 +160,11 @@ EXPORT_SYMBOL(drm_dp_dual_mode_write); static bool is_hdmi_adaptor(const char hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN]) { - static const char dp_dual_mode_hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN] = + static const char dp_dual_mode_hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN + 1] = "DP-HDMI ADAPTOR\x04"; return memcmp(hdmi_id, dp_dual_mode_hdmi_id, - sizeof(dp_dual_mode_hdmi_id)) == 0; + DP_DUAL_MODE_HDMI_ID_LEN) == 0; } static bool is_type1_adaptor(uint8_t adaptor_id) -- 2.43.0