From patchwork Thu Feb 15 14:55:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Max Kellermann X-Patchwork-Id: 201511 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp453507dyb; Thu, 15 Feb 2024 06:57:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXjcCHs+cPSh+CpTS5GjZzPfaNULd88fto4oDry+ZD06GFAbrd8IyahtH+7f13YXUp16gQ6XjJdOAxBnaHFaR4gEj+OgQ== X-Google-Smtp-Source: AGHT+IFT7ZBxOqHuRAAvxrXAz3K2dM82IhKOxdPqToo5DG4TuPNEcyMdO3pUGLBp/wF3YFnl8H2x X-Received: by 2002:a2e:331a:0:b0:2d0:e2aa:24d4 with SMTP id d26-20020a2e331a000000b002d0e2aa24d4mr1424441ljc.9.1708009044819; Thu, 15 Feb 2024 06:57:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708009044; cv=pass; d=google.com; s=arc-20160816; b=e5D4kc0qmo650pIp0cWmvos47wuyqzdCQC2D30EhUHwF/YLcLhEqcm3o2Fxc72nsDJ 417cIHBBQYMWyZ9bTA17rGePe4VVLghZ7DLcjq3TEp4bGjPqabSdPmJ/V8tFMUtypxev E8MTFFdlsCZLg1pkVvfB7c1GIO9/yaOaCPtHK+FggcHM+0QcWDVbWyyf0XpZ9imkL4g5 FWgwnKsGu5pLCrjuPhJJZmDBKFDRAalaMs0rOCY5RRNDErip3dGgbcx8VDlmD0S1QyrH SQarEOPed991ZhJfXS953t2n+YKVxvcbuVsCCWG9KC38/bIlA2C8g4H9EnQ7pVoZuoah FWWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=BL1pmIo7s1MX4N9LU8kIbt0i/wU5mZK2rTJkOzRk4Zc=; fh=x1zi76kuYqMnbFEG9Dt6+9P2nliv5Mpr9h9ZBLD1pys=; b=GMosL+wqMJYYTZArvrsMffcQdmZVHNcJTCg0lwgYp1/WbtNPsz1f3nRxMOYrOH7bLg 5uTKEYzmNowZyH6I6+35XZfwxNyANs4YsWGZW0mZX7H6AR2PP3ghUs76WyRlRJE2XffZ Ut3HWtPGabcFnWgtBI3lm/ZIiifEqdmy8qPGBaiBTzSAcmnm2pu7wBS/33txIRYYNyfR C44x+XYpn2uS5lGRtyp+e5Nq2DFBrNCA9h7qUpqRMCDGBI4Ke8WE7Nt3oKnqGOmyTArC G2Y/XjEhHs6nbgn+dd/o75oRlK1w7BFHtW2+E1+EBERsWDSIpGoGkPorjXRS5h2h4QcW LcVQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=Bhe1EYAG; arc=pass (i=1 spf=pass spfdomain=ionos.com dkim=pass dkdomain=ionos.com dmarc=pass fromdomain=ionos.com); spf=pass (google.com: domain of linux-kernel+bounces-67113-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67113-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x20-20020aa7dad4000000b00560d6e9cd4esi701940eds.335.2024.02.15.06.57.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 06:57:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67113-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=Bhe1EYAG; arc=pass (i=1 spf=pass spfdomain=ionos.com dkim=pass dkdomain=ionos.com dmarc=pass fromdomain=ionos.com); spf=pass (google.com: domain of linux-kernel+bounces-67113-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67113-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 728B11F24352 for ; Thu, 15 Feb 2024 14:57:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0BF72133286; Thu, 15 Feb 2024 14:56:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b="Bhe1EYAG" Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E715F132481 for ; Thu, 15 Feb 2024 14:56:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708008976; cv=none; b=VcDIuSWRaR+MM7GRLIfLE1haWKKAQZ7v1PaHYvgDE9bO/LPAAefjyWkmtLmNts3oMKURfaMyVPHOmna6O6jRejX8Q/B1GOeObTdp5ZlEOTIAfO+EobX915eywzeQtr31WZTRAJesoP0pVZi70Jpqc6es3NtGJgTrnEsZRykZSmo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708008976; c=relaxed/simple; bh=7E++P3NE3gX/uG8sJhez163L//hFb7dWE0h0h4Q6OTA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=kHLrdRnxI5nYr5duBlBlUTOy+eN+eFGhLX8ZtIauyI6utgqR23KTM9yQV+hPuLQZWaq+mlMs2oE6aA1SV9T9WxcGjpSujtzh8wbVKLfJ+i8qPN2VyBOIZ+3fVOht3V+xd71yfJnym+OIHh56HUc0y6Qv4AD+2Yb7Z3zsQFNuZE4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ionos.com; spf=pass smtp.mailfrom=ionos.com; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b=Bhe1EYAG; arc=none smtp.client-ip=209.85.218.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ionos.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ionos.com Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a3d484a58f6so121797766b.3 for ; Thu, 15 Feb 2024 06:56:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1708008972; x=1708613772; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BL1pmIo7s1MX4N9LU8kIbt0i/wU5mZK2rTJkOzRk4Zc=; b=Bhe1EYAG/YFEC6l9e6eDHNaQIM4E6E6brL7hYkz/QoGItPANmWPY/F4bLqNik2O+Qf +amDM8s7+GgzU2OvQp1ftfuNw85DD1Hy+6HGCq78mdGCRmx8td4wtDpstteV54gBfFIX VcJuXjBE4vyAJsUh4lTMeOZpWTRb3t9i4ksmZH47d76wbgxEWwzu9UXZ0UMgOc4Fkvpe NGSpEIDW2tJpcDw7meTyrqWfEcQnalXfTECXIePGb++CT7hf1FKVrqlk7ovgm5aJWqQN 5x29ci9hY8LYuRUJA3ZwMAcfG9BNwGlU17UZIOpwru8gBd7GE6Z9AmKfkl0DUVvgqRO/ aD2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708008972; x=1708613772; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BL1pmIo7s1MX4N9LU8kIbt0i/wU5mZK2rTJkOzRk4Zc=; b=i2wkKuxk/v7E81BuVK0QbP7qT7pomkqUbae1NlsXzySz4Ronobnu/6xz8eSimaV2Ec hx4fAX7Bxr8zTQO12i2u/RApb+XN/8Fb+QJNE1zEY3b+Bg3oQ1C3yOgTao27PceUgRy0 R3JICojrF8czUVecE7abLp+c7jn66ZQPptgpMpTC0naMPZbD7TGGFx+P/RZeO8l45jJ7 62Sadwa5N9w9H4gB38+vJmes67cElZKabS4UD5o8V89RjvAzvdMyAS/iBhQmBOJCbOjZ z0S0aYQO2MZ08CDiZOmuT6AZ+v6vaioDKagACYMlOzG88mur3J7okb/Rzw5LSY+wjHRo yedA== X-Forwarded-Encrypted: i=1; AJvYcCX0ukH9GWoJvPIN23ufdKtW4VwKCzSdOIwY2G+76fPW7LZ/fEJMxY6OkrdNsfBnk1veY556chQKX8XvZHfCN+/22oBOqXHUNLtE+VFz X-Gm-Message-State: AOJu0YytSviOHLezeIZc0qOBXvwOmq4CQ1D2Fth68ET5gYfncMkg7wxD QyRjtFDeblnkK4fJbSZn2QVGprqEGsylLg7cIaT5MSJP31p8iS0Vgi2reBTnFUQ= X-Received: by 2002:a17:906:4157:b0:a3d:7ca3:fbab with SMTP id l23-20020a170906415700b00a3d7ca3fbabmr1539833ejk.27.1708008972211; Thu, 15 Feb 2024 06:56:12 -0800 (PST) Received: from raven.intern.cm-ag (p200300dc6f267100023064fffe740809.dip0.t-ipconnect.de. [2003:dc:6f26:7100:230:64ff:fe74:809]) by smtp.gmail.com with ESMTPSA id s18-20020a170906169200b00a3d1897ab68sm631175ejd.113.2024.02.15.06.56.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 06:56:11 -0800 (PST) From: Max Kellermann To: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Max Kellermann Subject: [PATCH v1 02/14] include/drm/drm_gem.h: add poll_table_struct forward declaration Date: Thu, 15 Feb 2024 15:55:50 +0100 Message-Id: <20240215145602.1371274-3-max.kellermann@ionos.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240215145602.1371274-1-max.kellermann@ionos.com> References: <20240215145602.1371274-1-max.kellermann@ionos.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790977292300321873 X-GMAIL-MSGID: 1790977292300321873 After eliminating includes of linux/mm.h, the following build failure occurred: ./include/drm/drm_file.h:443:45: warning: ‘struct poll_table_struct’ declared inside parameter list will not be visible outside of this definition or declaration 443 | __poll_t drm_poll(struct file *filp, struct poll_table_struct *wait); | ^~~~~~~~~~~~~~~~~ In file included from drivers/gpu/drm/imagination/pvr_gem.h:12, from drivers/gpu/drm/imagination/pvr_fw.h:9: ./include/drm/drm_gem.h:447:27: error: initialization of ‘__poll_t (*)(struct file *, struct poll_table_struct *)’ {aka ‘unsigned int (*)(struct file *, struct poll_table_struct *)’} from incompatible pointer type ‘__poll_t (*)(struct file *, struct poll_table_struct *)’ {aka ‘unsigned int (*)(struct file *, struct poll_table_struct *)’} [-Werror=incompatible-pointer-types] 447 | .poll = drm_poll,\ | ^~~~~~~~ The compiler is confused, and that can be fixed easily by forward-declaring the struct expicitly. Signed-off-by: Max Kellermann --- include/drm/drm_file.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/drm/drm_file.h b/include/drm/drm_file.h index ab230d3af138..f24ade9f766f 100644 --- a/include/drm/drm_file.h +++ b/include/drm/drm_file.h @@ -44,6 +44,7 @@ struct drm_device; struct drm_printer; struct device; struct file; +struct poll_table_struct; /* * FIXME: Not sure we want to have drm_minor here in the end, but to avoid