Received: by 2002:a19:651b:0:0:0:0:0 with SMTP id z27csp22448lfb; Mon, 2 May 2022 11:24:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2ri1CoZtf1fGTLrMUpQ8SgjB25o1AxWf/AT3O9SW8ge65oOVQ8w+utQzAw1SrFit4qCxY X-Received: by 2002:a17:903:244d:b0:15e:a3a2:5a6f with SMTP id l13-20020a170903244d00b0015ea3a25a6fmr6359979pls.72.1651515876759; Mon, 02 May 2022 11:24:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651515876; cv=none; d=google.com; s=arc-20160816; b=bFVeHWegjlPjKWMHAdclAfz8/PpvZc8LLXjhZIqrMctitdgUHJg3iRja+cBrlZvp3x m/IfAg+X/az9xigVCniyeZKq285dcMZI31umA9gmQWS0VA2EL1NBlGp1scZOTOTHWf4e Scm8ErLbK25P1WG2EI1D21b5KM91zrcj2iSYvQOixfilGXDAi4YTsXQEnoVFZX0G7Eve s0nZDuCTvJOlUQt8WpSTSzrAZllFgwg5l/sUMYDC1tQKVlZyG1a++IqZhOlk3SnzQGc7 aarogcw8K1CZA6eC+YUC8of8LZZkRitQ4mfGE7mUqV50AkMq7awZ0Zlo5iw9ji4ulww5 DSuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=L+bB5VG7en+mvHiYzW/hL0EPJC9CFmfyr3aZpk0g7F0=; b=piVx4/FaFQrISKe8P3wcqwP64WCVaTUdhDKq+1DFcq70CsqZXcxZBJAlbLPoIz3Rus qs87h1Pmosge8K8Zrc4cX/jRvQg+KNl0stxqCnceaysIcNea0A8CjnG2O9H4cM7JhLdo yWWbCIkWD2tyLFkGX4arku3IkqfRd6CIhJ5SR6gyO/eJiU+0PdO6ZenoJkAtbU5s8yu+ B4NBm30qDu/4jGa7+/c2oNby6F9MakfbcGEAYYeRUDRzAcGfgA2Pczj/5UT2do4vWYSU WI7EUxTD0VcceRet4BrgTNk0B+3il/Ni4mD6DXwIn1jp9enpNvYiIpFvFkNczsMDF/QM wFrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=fA9tXvin; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u22-20020a056a00125600b005056fd7c13fsi2128520pfi.174.2022.05.02.11.24.15; Mon, 02 May 2022 11:24:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=fA9tXvin; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380433AbiD2T7A (ORCPT + 99 others); Fri, 29 Apr 2022 15:59:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232481AbiD2T6r (ORCPT ); Fri, 29 Apr 2022 15:58:47 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14F8F13F5E for ; Fri, 29 Apr 2022 12:55:27 -0700 (PDT) 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-01.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: , , , , CC: , , Jeffrey Hugo 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain 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-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- 2.7.4