From patchwork Sun Aug 18 10:43:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13767370 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 9A7BEC5321D for ; Sun, 18 Aug 2024 10:43:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B4C9F10E030; Sun, 18 Aug 2024 10:43:45 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=weissschuh.net header.i=@weissschuh.net header.b="ZMB10MJH"; dkim-atps=neutral Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2F82410E021; Sun, 18 Aug 2024 10:43:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1723977821; bh=LIhDXO/vt61k9fDXb4us5vdCDXJKik9UE+Gw+d4EsFY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ZMB10MJHVTsbEAgJsPd/WoBVbaAt6cEqCBm1JInvuDej99GJMxLVZIq+HAwJIQDSG bfSzFtp9SanQU1/JdSebwMsjIJqmJhhZm7tCXNPvBj47xLO9QdXwAXWi13qttLKRfM 4W/OShkMj2gPHkFvi+bxvsQ/iWpNgSyGVT+E5KN4= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sun, 18 Aug 2024 12:43:27 +0200 Subject: [PATCH 03/12] drm/edid: constify argument of drm_edid_is_valid() MIME-Version: 1.0 Message-Id: <20240818-amdgpu-drm_edid-v1-3-aea66c1f7cf4@weissschuh.net> References: <20240818-amdgpu-drm_edid-v1-0-aea66c1f7cf4@weissschuh.net> In-Reply-To: <20240818-amdgpu-drm_edid-v1-0-aea66c1f7cf4@weissschuh.net> To: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , Xinhui Pan , David Airlie , Daniel Vetter , jinzh , Aric Cyr , Alan Liu , Tony Cheng , Andrey Grodzovsky , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Harry Wentland , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1723977820; l=1353; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=LIhDXO/vt61k9fDXb4us5vdCDXJKik9UE+Gw+d4EsFY=; b=1rBJN1vkIMxT+m2KRWFgnD882q/vGNU3J9DzDazmvd0Q9rpLOmUAECU5yqqlfUgOvLr9zcegN 39k1x2tRzx4CntHpKLI1NRy/DB3fB+PBg4H37POxzpYGpXHM5Kx48TM X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= 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" drm_edid_is_valid() does not modify its argument, so mark it as const. Signed-off-by: Thomas Weißschuh --- drivers/gpu/drm/drm_edid.c | 2 +- include/drm/drm_edid.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index f68a41eeb1fa..69fb11741abd 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -2034,7 +2034,7 @@ EXPORT_SYMBOL(drm_edid_block_valid); * * Return: True if the EDID data is valid, false otherwise. */ -bool drm_edid_is_valid(struct edid *edid) +bool drm_edid_is_valid(const struct edid *edid) { int i; diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index 6bdfa254a1c1..a5b377c4a342 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h @@ -442,7 +442,7 @@ int drm_add_modes_noedid(struct drm_connector *connector, int drm_edid_header_is_valid(const void *edid); bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid, bool *edid_corrupt); -bool drm_edid_is_valid(struct edid *edid); +bool drm_edid_is_valid(const struct edid *edid); void drm_edid_get_monitor_name(const struct edid *edid, char *name, int buflen); struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev,