From patchwork Fri Jun 16 09:31:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 108986 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1199479vqr; Fri, 16 Jun 2023 02:34:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5IS2c5gB/g0Z309u2NI/aZFZBlGCm8lXEMolEtCIBXzNcWOY+lN/aAjlkncq8UQ6t3EqHQ X-Received: by 2002:a17:90a:341:b0:25b:c53f:1468 with SMTP id 1-20020a17090a034100b0025bc53f1468mr923923pjf.29.1686908094091; Fri, 16 Jun 2023 02:34:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686908094; cv=none; d=google.com; s=arc-20160816; b=XAFn5oKN7Mw718v1pgwQnEdo5jVUumgslSNh+OZVeHAEL3D4Ju+v9HaZj18tqzqSzl M3Dq0YFxiiZKucnfeNPuXzOw6CrOARyxLrmFtqTIQ48lAdnFIzXWVU7GdlPJcaCzMR/L h+jGGC9bB1cwHwrBCuV5tGb9yW87lSlwIBYzDozVIRZ5JrpyGiLQcGF07jSM/N7gjhw/ in3cOhnKqWdmcWmCEucIDVFW7+9vlwJoKltLtmiDl4oXnFehH05+TmOtVr8dozfudpUO 8pd31YEhP3X8IlwCfBD1IL0GSGMqjHNdzmRo+cQv/Ts6kt6GaR/o9WkuwzNGAsH1dHRK DhiA== 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=E5V/ourQTqOpFDOeTxE6mHFSqT+bR3sP4FfWZXv2qT4=; b=HN54nkc8Zk+82PQmASNtmgOk3E2TyqbYg8dW470lhH/7GcBpWA5X0AqYediqdoKJHv T4QtGWboMArTHq6gR2lEEtlqOwqakranHB2Kxf4//u84fjfDhxRNSzy746fhRJsfn/AT FjMHv6qXpx73yt5f4EZnBvu7KI5jTgLmxCSeTi41bm6e/86fazKuzx+UxHmVt3jrPoeQ NYufqH/jD9XaxAnaWjj2axL9ey7A5I2ssI+RI7miCGNk9v9Nd9FOMfwLBd5EaCAiuEPV zTXiVAf3AjxRKbCbUGakLdFzXkg2VIsuFMgH9hmy9xyP/G+dq9z91TZ6QjlsBCiGEs8P /bIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="aql41gS/"; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o24-20020a17090aac1800b0025bf76fdad2si1165456pjq.98.2023.06.16.02.34.38; Fri, 16 Jun 2023 02:34:54 -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=@kernel.org header.s=k20201202 header.b="aql41gS/"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344497AbjFPJdl (ORCPT + 99 others); Fri, 16 Jun 2023 05:33:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344292AbjFPJdZ (ORCPT ); Fri, 16 Jun 2023 05:33:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A54F73C2B for ; Fri, 16 Jun 2023 02:32:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DA04C633B4 for ; Fri, 16 Jun 2023 09:32:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6C7BC433C0; Fri, 16 Jun 2023 09:32:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686907925; bh=RyvbZ8xLNLVCEWUqE0qfmWc1Llk+X9g8qHjmNGYKLVM=; h=From:To:Cc:Subject:Date:From; b=aql41gS/+jx94TAWvh8KlZ36Fle4QLGqn4B5xNnEimBQx7Cd3FU9uPP7Q/YRQ12ot 1AXM14STUqfR1eCiaTBhac+CKJXSwcBroJAVdoknmp5M2NHBhGE/SVVA7ykLMEGYHP HEyt50zxwBm8YNFGIcCJe+Mu26PCyZrRHm0spOjxcr3aOR1uLyy9tuh0nIJeCFlFIC NY1dTlUWtcNT9HZuKXS6xYKGaEqJedzVrRUWVtyo7M5EYvZAyYALT1vv+6UIp3g9gF 7XP69Nce6j7JGcbwivO1adEkkUXZ/vkS5w3cylg65qOsU+V2Sfvb+3lNDOvDiMic2m gtSCeuughd6Hg== From: Arnd Bergmann To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , Andi Shyti Cc: Arnd Bergmann , Matt Roper , Lucas De Marchi , Imre Deak , Alan Previn , Anshuman Gupta , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/i915: make i915_drm_client_fdinfo() reference conditional again Date: Fri, 16 Jun 2023 11:31:47 +0200 Message-Id: <20230616093158.3568480-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768851341837961277?= X-GMAIL-MSGID: =?utf-8?q?1768851341837961277?= From: Arnd Bergmann The function is only defined if CONFIG_PROC_FS is enabled: ld.lld: error: undefined symbol: i915_drm_client_fdinfo >>> referenced by i915_driver.c >>> drivers/gpu/drm/i915/i915_driver.o:(i915_drm_driver) in archive vmlinux.a Use the PTR_IF() helper to make the reference NULL otherwise. Fixes: e894b724c316d ("drm/i915: Use the fdinfo helper") Signed-off-by: Arnd Bergmann Reviewed-by: Andi Shyti Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested --- drivers/gpu/drm/i915/i915_driver.c | 2 +- drivers/gpu/drm/i915/i915_drm_client.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 75cbc43b326dd..0ad0c5885ec27 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -1816,7 +1816,7 @@ static const struct drm_driver i915_drm_driver = { .open = i915_driver_open, .lastclose = i915_driver_lastclose, .postclose = i915_driver_postclose, - .show_fdinfo = i915_drm_client_fdinfo, + .show_fdinfo = PTR_IF(IS_ENABLED(CONFIG_PROC_FS), i915_drm_client_fdinfo), .prime_handle_to_fd = drm_gem_prime_handle_to_fd, .prime_fd_to_handle = drm_gem_prime_fd_to_handle, diff --git a/drivers/gpu/drm/i915/i915_drm_client.h b/drivers/gpu/drm/i915/i915_drm_client.h index 4c18b99e10a4e..67816c912bca1 100644 --- a/drivers/gpu/drm/i915/i915_drm_client.h +++ b/drivers/gpu/drm/i915/i915_drm_client.h @@ -47,8 +47,6 @@ static inline void i915_drm_client_put(struct i915_drm_client *client) struct i915_drm_client *i915_drm_client_alloc(void); -#ifdef CONFIG_PROC_FS void i915_drm_client_fdinfo(struct drm_printer *p, struct drm_file *file); -#endif #endif /* !__I915_DRM_CLIENT_H__ */