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 05D8A13792B; Thu, 12 Dec 2024 15:42:47 +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=1734018167; cv=none; b=OOP184tzIUj7BAyPTof/2R78EE9vyla+mcCnwCUD8Z+xuSK3h8VzMUG+sRniet70ZUcCl+4r/ypCqnV/L+hBT0/0P/sB5vXx/TMkEkGK1oFYASdd506wa1qUfpMla8AKzp3NfCAoPpGvfhWnmgTAeH0iBCuexJI3pMHXsN3eyIs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734018167; c=relaxed/simple; bh=juCf3V5jNKH2i65w1BOO16JWtlj5wZtNA0weqIht9ec=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=epdTD+znZnuzm9yDpHDCIBHQxXGRwOUZ6EwKVz6wiYRrsfjQD2rXmyZQfeWJ4iUkayD+96n+GPndLWlkdD2ft7SrI0RYChEip7ufRGo+whGPrqS4T1cLnJtS5PBVlxizUgY0FGLrDz7US0CVqPWjieMf5NqOnnGKhrVFwKStD1I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=e2c4oYbr; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="e2c4oYbr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77D2EC4CECE; Thu, 12 Dec 2024 15:42:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1734018166; bh=juCf3V5jNKH2i65w1BOO16JWtlj5wZtNA0weqIht9ec=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e2c4oYbrW20UQ+ixJkf6gbpOO8S8d9vb8vnP060QtEyvblD9bipH2QOTaj5rsHygv 57SVZXuWYKozXaxwI2uepWBLP+Rz8bQN8PZ0lMBhzBBNOC9BQISC9OrOE7fTaUbP3C yTc/5pds4kP0ts+f4QxLdfWHy6VKwMvBhUkR7bwE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Brahmajit Das , Jani Nikula , Sasha Levin Subject: [PATCH 6.6 216/356] drm/display: Fix building with GCC 15 Date: Thu, 12 Dec 2024 15:58:55 +0100 Message-ID: <20241212144253.153982963@linuxfoundation.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241212144244.601729511@linuxfoundation.org> References: <20241212144244.601729511@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ 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