From patchwork Fri Apr 29 19:55:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffrey Hugo X-Patchwork-Id: 12832670 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 DF017C433F5 for ; Fri, 29 Apr 2022 19:55:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3264710EF2D; Fri, 29 Apr 2022 19:55:30 +0000 (UTC) Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by gabe.freedesktop.org (Postfix) with ESMTPS id C591810EF2D for ; Fri, 29 Apr 2022 19:55:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1651262128; x=1682798128; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=L+bB5VG7en+mvHiYzW/hL0EPJC9CFmfyr3aZpk0g7F0=; b=fA9tXvinwJV1Uh4H6O1QBlnVnVEwNGvgnLxHWsutMeNZBMXSJvJ2qLAf WD8RuP3/950TF4Z1098/XZFmdXRzRKxDXbKqqJ/sCLblGLB2kjtRQnRlb KAwoAcg2lQc30fo57O77VWxxVzzqUhMBs0U49cyQ7yFAXtF+KUMiFpVSr E=; Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-02.qualcomm.com with ESMTP; 29 Apr 2022 12:55:27 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg02-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2022 12:55:27 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 29 Apr 2022 12:55:26 -0700 Received: from jhugo-lnx.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 29 Apr 2022 12:55:25 -0700 From: Jeffrey Hugo To: , , , , Subject: [PATCH] drm: drm_gem.h: Add explicit includes for DEFINE_DRM_GEM_FOPS Date: Fri, 29 Apr 2022 13:55:12 -0600 Message-ID: <1651262112-29664-1-git-send-email-quic_jhugo@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) 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: , Cc: Jeffrey Hugo , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" DEFINE_DRM_GEM_FOPS() references drm functions from other headers. For example drm_open() is defined in drm_file.h and drm_ioctl() is defined in drm_ioctl.h. Since drm_gem.h doesn't include these headers, it relies on an implicit include from the .c file to have included these required headers before DEFINE_DRM_GEM_FOPS() gets used. Relying on these implicit includes can cause build failures for new code that doesn't know about these requirements, and can lead to future problems if the headers ever get restructured as there will be a need to update every downstream file that includes drm_gem.h. Lets fix this explicitly including the required headers in drm_gem.h so that code that includes drm_gem.h does not need to worry about these implicit dependencies. Signed-off-by: Jeffrey Hugo --- include/drm/drm_gem.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h index 9d7c61a..1cbe3d8 100644 --- a/include/drm/drm_gem.h +++ b/include/drm/drm_gem.h @@ -37,6 +37,8 @@ #include #include +#include +#include #include struct iosys_map;