From patchwork Fri Jun 9 12:06:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 105588 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp903022vqr; Fri, 9 Jun 2023 05:18:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5p6cAvxGWOvm8wIg9m0LnZ5kCx93sopem1Gvj+qOuQ2XnHyTJ84beBPkmdOlzDAdQcwK6G X-Received: by 2002:a17:902:8e81:b0:1b2:1942:9117 with SMTP id bg1-20020a1709028e8100b001b219429117mr907071plb.45.1686313108629; Fri, 09 Jun 2023 05:18:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686313108; cv=none; d=google.com; s=arc-20160816; b=pKV34IK8+lyyZfQzaRMp4E53wL8N5GxKO4+xuKhqKKc30v9bB0lRF7jr//Ut5e3Lm9 2bE651XpsDOavDf7YaQj+tTTX3cFixQjVbw/X33hDc9IIxI72dyH7sScVv/L8qW0pvnR 07Wqzfv50qMiqgHOt6wdGm7XYwxVVxxed1LLVS5hNrpLmiriJ7qVs/m3YdZL8VDsWUt3 tmY7TZ/fiMU6t3FunM8En9z8BWRE3X4EMdXfqw7sLR5VlRq7wbp0tTHb7EY7z+lN55RI MuuCFzOsrmpaRBYNGU0vfzNzP0yEfMv3ui6CIXOpP4uIKMcy7qpsD7J8e7tIsiKtpRj7 BJ3w== 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=dwHeDd6jvRe+EQpprg/YZLB0n3KboJOGVGIeHYTSnXg=; b=uDv3Jeb/9bSxVyvdshnX5yXfIt1KnAGq17PsQ6u/jh7JcM2ULLnFm+OESgNnGBI+Az V7rxsejEBAoV/Zbvrfz35pSGrVFCX9K2+C6F5zsN7RMbDPDBkZ2DivHOueHBifxW+MIn CsPxaHXOF331tzpihrKCEtQ+bNP7liB/Um5Rk6Ams6zVC7qHpuhA5vap7hlkS5jRkws4 A9Fm5n74rGc0SujeRjAMf/5Vr1sucWAWVNpiBYv+iMVfFuWnSt2Var0Io0n2IEHsPLkX VMFLRCLAQ9qsi9VzFV2tKWsIzcYG3dNAW9s1YOoOvBqyM+M+DyNzyIOxuKiUfGGT9NLz yV2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IaDDEPyD; 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 la6-20020a170902fa0600b001b0f727bc35si2577687plb.157.2023.06.09.05.18.13; Fri, 09 Jun 2023 05:18:28 -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=IaDDEPyD; 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 S231286AbjFIMHf (ORCPT + 99 others); Fri, 9 Jun 2023 08:07:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231953AbjFIMHd (ORCPT ); Fri, 9 Jun 2023 08:07:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6A7A3C0E for ; Fri, 9 Jun 2023 05:06:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6B4B965546 for ; Fri, 9 Jun 2023 12:06:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02017C4339B; Fri, 9 Jun 2023 12:06:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686312401; bh=v6bBhjvR3wb5+zDe6fFJL1e6WRgLNxjq+2oxyd8st6Y=; h=From:To:Cc:Subject:Date:From; b=IaDDEPyDGRKU6NlO05JDn9LoTa7zqe31QHE4N8cTjytfZ25KdBh/JCOYo8W+8JUTu XelJjbZ7Ga6yJNqnlvkdggngIhSm9Co77MKLYBNNFwpO/DHqv9hkauc3yaCMLxIlr5 jnr+RXKU9nb2TX95kNMpk74Rq80n3ZKrZMfyYRa63hKFq0oGOJc9o3d5DG+trcxBzr wV2ugJk8lKARDu7M0r1DKF4j6dQTJgc5IIuWHkcO9KARo+n70IyJ6uyNZnv3Qk9khR XmRirtNoSFKEHL+sMhWkW/6JhW0zgJDGQ1w9vWib7rLSAl0KFIA5DZtcSVMJYvDTas f+ESmY7ADgARw== From: Arnd Bergmann To: Oded Gabbay , Tomer Tayar Cc: Arnd Bergmann , Ofir Bitton , Ohad Sharabi , Dafna Hirschfeld , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] accel/habanalabs: add more debugfs stub helpers Date: Fri, 9 Jun 2023 14:06:32 +0200 Message-Id: <20230609120636.3969045-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?1768227454529896199?= X-GMAIL-MSGID: =?utf-8?q?1768227454529896199?= From: Arnd Bergmann Two functions got added with normal prototypes for debugfs, but not alternative when building without it: drivers/accel/habanalabs/common/device.c: In function 'hl_device_init': drivers/accel/habanalabs/common/device.c:2177:14: error: implicit declaration of function 'hl_debugfs_device_init'; did you mean 'hl_debugfs_init'? [-Werror=implicit-function-declaration] drivers/accel/habanalabs/common/device.c:2305:9: error: implicit declaration of function 'hl_debugfs_device_fini'; did you mean 'hl_debugfs_remove_file'? [-Werror=implicit-function-declaration] Add stubs for these as well. Fixes: 553311fc7b76e ("accel/habanalabs: expose debugfs files later") Signed-off-by: Arnd Bergmann Reviewed-by: Tomer Tayar --- drivers/accel/habanalabs/common/habanalabs.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/accel/habanalabs/common/habanalabs.h b/drivers/accel/habanalabs/common/habanalabs.h index d92ba2e30e310..2f027d5a82064 100644 --- a/drivers/accel/habanalabs/common/habanalabs.h +++ b/drivers/accel/habanalabs/common/habanalabs.h @@ -3980,6 +3980,15 @@ static inline void hl_debugfs_fini(void) { } +static inline int hl_debugfs_device_init(struct hl_device *hdev) +{ + return 0; +} + +static inline void hl_debugfs_device_fini(struct hl_device *hdev) +{ +} + static inline void hl_debugfs_add_device(struct hl_device *hdev) { }