From patchwork Wed May 17 12:55:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 95234 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1125129vqo; Wed, 17 May 2023 06:12:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5HMguGWYA0TkHcx6iQolWaoeOFkB6pkJIy2R0bvWNSxDzijOcMXoytDHIiwIoVCn0MORFV X-Received: by 2002:a05:6a20:3d95:b0:106:57b9:6da1 with SMTP id s21-20020a056a203d9500b0010657b96da1mr10740458pzi.20.1684329146120; Wed, 17 May 2023 06:12:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684329146; cv=none; d=google.com; s=arc-20160816; b=fBqGoUJi/qP/3beX8+EY9GiifiGpGlWc1jFMa5gYEie8xinjeh/fhyeSOpb1yebzi8 +t++LgeZvdL1snzT6r/co351239DYykSAfWW9/S2K8OH0FOUHrEzksEn4CMk6i9vXco/ mt3UiRaX4WpGqahKB9RWnXWTax+m59QwBo6GGtAfrzDSUedObKFyfkQtcjX2jEby0HBn gkApx0V1LhtIHeCf5uUCsSwE5Bm+ohSvqj9v9IlsULmGGhpY027abCVzMgfjPS44nN82 eos/fVeFo9qBbUPrdGZi79XmDLLb1V5j7+eG6/wp7xhKZ5EI4IAHLEsjiPlZyx/2AHqj ElEQ== 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=LFZ6w3G5YiraOoN2Ajg3SLBhdenkED3u9LptwHxiabM=; b=uwSq+Wh1pFPJJ5odahIUdry7Powxk4378C6QiL2bxwnBxzDwL9i0EP951dTDnTitsF EupEL+ynuXWaD0ibJTnXSn3LdfzSGsS0PLUbDxqtkDystPFaPbWoUMa+iUXQD5tWTdGN 8Lg8AZkCnIh9KPxcQRQuCRiR7zXomSIsQWvFMLTvBH6U0cCSmOAjvZ2hUdYBpuV3x5jk El0YmU/dkpgFBlVBmNxFojZT5vHyrzezeehFoG5DDn4MvXxHLDmZI6LHctTprqZOBZxk 4ZqTgIk2+UKUUZ2Biz5eb3uzVfnBbGoHV1r/MIVhzsvfkY7hwxY1hcyeF0GddIqWactS ITGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rEDgMEQL; 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 y28-20020aa78f3c000000b0063d19a45a93si22036417pfr.280.2023.05.17.06.12.12; Wed, 17 May 2023 06:12:26 -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=rEDgMEQL; 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 S231817AbjEQMzl (ORCPT + 99 others); Wed, 17 May 2023 08:55:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230253AbjEQMzk (ORCPT ); Wed, 17 May 2023 08:55:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5921C2D68; Wed, 17 May 2023 05:55:39 -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 E185D6449E; Wed, 17 May 2023 12:55:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C1ABC433EF; Wed, 17 May 2023 12:55:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684328138; bh=xzTFDNsRybxFIhfNkT5pB/3ffJE+aIzn77Ij9JsNwhQ=; h=From:To:Cc:Subject:Date:From; b=rEDgMEQLFO1dHrTu7bk05PSagPHSLbTz1soCR9EqbVytR1qDw1CdCDpr1gTBIArLp 4Cw0/Ce9LHK5C0X9w9BavIkXm8rDgBeduEKjGPPyZ9FVgRUWbbSd0T1RKcpDwx8Rqg f75QcnNaqJn2rS+98JjDV2RveeLeB3EF8HAaLFhGPhBMJdwoI3QNA6/8xCuFjJJAk4 Ib+SHm+mYwlO33nBBfFnkCYn8wbzMirsE4hPYInVtidxX7Zx4tj1ZPPZqO94cpzHs8 pQYzRbnQMwJ4d5zNG9wnmNYRy7fFZ47xzC/cc3ZKSlwxzdHUZLCNgHHeZfDL6dE8KF wNPaEFdrVTzvw== From: Arnd Bergmann To: Dan Williams , Vishal Verma , Dave Jiang , Jane Chu , Dave Hansen Cc: Arnd Bergmann , Gregory Price , nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dax: fix missing-prototype warnings Date: Wed, 17 May 2023 14:55:09 +0200 Message-Id: <20230517125532.931157-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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?1766147118671813137?= X-GMAIL-MSGID: =?utf-8?q?1766147118671813137?= From: Arnd Bergmann dev_dax_probe declaration for this function was removed with the only caller outside of device.c. Mark it static to avoid a W=1 warning: drivers/dax/device.c:399:5: error: no previous prototype for 'dev_dax_probe' Similarly, run_dax() causes a warning, but this one is because the declaration needs to be included: drivers/dax/super.c:337:6: error: no previous prototype for 'run_dax' Fixes: 83762cb5c7c4 ("dax: Kill DEV_DAX_PMEM_COMPAT") Signed-off-by: Arnd Bergmann --- drivers/dax/device.c | 3 +-- drivers/dax/super.c | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dax/device.c b/drivers/dax/device.c index af9930c03c9c..30665a3ff6ea 100644 --- a/drivers/dax/device.c +++ b/drivers/dax/device.c @@ -396,7 +396,7 @@ static void dev_dax_kill(void *dev_dax) kill_dev_dax(dev_dax); } -int dev_dax_probe(struct dev_dax *dev_dax) +static int dev_dax_probe(struct dev_dax *dev_dax) { struct dax_device *dax_dev = dev_dax->dax_dev; struct device *dev = &dev_dax->dev; @@ -471,7 +471,6 @@ int dev_dax_probe(struct dev_dax *dev_dax) run_dax(dax_dev); return devm_add_action_or_reset(dev, dev_dax_kill, dev_dax); } -EXPORT_SYMBOL_GPL(dev_dax_probe); static struct dax_device_driver device_dax_driver = { .probe = dev_dax_probe, diff --git a/drivers/dax/super.c b/drivers/dax/super.c index c4c4728a36e4..8c05dae19bfe 100644 --- a/drivers/dax/super.c +++ b/drivers/dax/super.c @@ -14,6 +14,7 @@ #include #include #include "dax-private.h" +#include "bus.h" /** * struct dax_device - anchor object for dax services