Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3762259pxk; Tue, 29 Sep 2020 05:47:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYs9gSjXGoWoHtUoU1QDh0RHyLmlmhLWtBw2TZAovVfVTFnbmKoWj6UXwl3JnEUFz/gdm+ X-Received: by 2002:a05:6402:17da:: with SMTP id s26mr3056227edy.221.1601383629709; Tue, 29 Sep 2020 05:47:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601383629; cv=none; d=google.com; s=arc-20160816; b=jZY4wS11MFo0PQ/z9+PlOwGRc+XahHOo78E/H4+AdadBbQ8OsD7jGRFh2Erq8AqOgX W9xa4aiaWzHEkEPKmpw+JjlLBiFRi+7/9mSKAILfVVeN3iTUxdPr+MfqM0eJcSlBbv1T epueg8rnSjhkrzZskqxBhCOJYG6FnHj2jEbGTKja5JgmZGAYejlbz9cPuLwm8rHc3CQL eZFWdR1bmIbQhNEkIrtB/QWc1cynnLr/AmJDz+V871u0QoyqaHciyRPdnRUSq7BSLSrx +dvgdx0TPGnbIhZYPQmmIUERy+Jo75gs5HvfVJ8NMbHBNNQFYYXy6bs5mwrsleKRCm3k pKXA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mTMIOaAtCJgA/YYTk5wMHZKae4qamcW8n4JmPxgDNTY=; b=gSFwWG9p6M3kfRTBpiKZyGzFtLzTDH3CcavSRnlhTHL+flYtH00l+LySzRxblHZnv+ lboZnrrMmHlmKq8LQg4rWFX74JhWHL25BUr7Ed/evGiIDhrPO93Wn6391Co92+Btwn0H ylTQ3W/8tT3qLuzqTK/4/NkeXK3tfwZxbIAAMbh5VzLAHg9vTaAvlPAS8jAxn5HOpepE zh8W1V5AJu3Du9vj9rjGp3vnH+8YPEGYFH89yu9IfTvmAQCd7l8EAG5ki0aHgwGhiI6i rCwW7QQlMwgtWjCd2Ipx9tyUN6vN9fG+US8drzU+RFSDMvUUYf3CPbSCMbj/iHhlJOZY LjZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oZitgiCz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a12si2647542edt.557.2020.09.29.05.46.46; Tue, 29 Sep 2020 05:47:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oZitgiCz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727495AbgI2Mpq (ORCPT + 99 others); Tue, 29 Sep 2020 08:45:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:46372 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728959AbgI2LHq (ORCPT ); Tue, 29 Sep 2020 07:07:46 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9FE7E21D43; Tue, 29 Sep 2020 11:07:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601377666; bh=DvGv0QXojID4DR377cA1DHoRb2cdFnCZLzGnAUpJlMc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oZitgiCzz31FD2TZmkEJcV9isKGjZZBJE74gCLP5mNPlITAQsUfim0YvYqCbiGLuY hHqNqC7L+ZfCgsaySVJsruTWB/dgBGlwAPIJVRzn3D8rYAjTNonKEAf+cbCwPo0A1Q bKu3Zch4CKxA+JmA5kHv1TzE4ZnF8j2szJW6H6kk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kusanagi Kouichi , Sasha Levin Subject: [PATCH 4.9 028/121] debugfs: Fix !DEBUG_FS debugfs_create_automount Date: Tue, 29 Sep 2020 12:59:32 +0200 Message-Id: <20200929105931.580404726@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929105930.172747117@linuxfoundation.org> References: <20200929105930.172747117@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kusanagi Kouichi [ Upstream commit 4250b047039d324e0ff65267c8beb5bad5052a86 ] If DEBUG_FS=n, compile fails with the following error: kernel/trace/trace.c: In function 'tracing_init_dentry': kernel/trace/trace.c:8658:9: error: passing argument 3 of 'debugfs_create_automount' from incompatible pointer type [-Werror=incompatible-pointer-types] 8658 | trace_automount, NULL); | ^~~~~~~~~~~~~~~ | | | struct vfsmount * (*)(struct dentry *, void *) In file included from kernel/trace/trace.c:24: ./include/linux/debugfs.h:206:25: note: expected 'struct vfsmount * (*)(void *)' but argument is of type 'struct vfsmount * (*)(struct dentry *, void *)' 206 | struct vfsmount *(*f)(void *), | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ Signed-off-by: Kusanagi Kouichi Link: https://lore.kernel.org/r/20191121102021787.MLMY.25002.ppp.dion.ne.jp@dmta0003.auone-net.jp Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- include/linux/debugfs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index b20a0945b5500..7aea750538840 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h @@ -77,6 +77,8 @@ static const struct file_operations __fops = { \ .llseek = generic_file_llseek, \ } +typedef struct vfsmount *(*debugfs_automount_t)(struct dentry *, void *); + #if defined(CONFIG_DEBUG_FS) struct dentry *debugfs_create_file(const char *name, umode_t mode, @@ -96,7 +98,6 @@ struct dentry *debugfs_create_dir(const char *name, struct dentry *parent); struct dentry *debugfs_create_symlink(const char *name, struct dentry *parent, const char *dest); -typedef struct vfsmount *(*debugfs_automount_t)(struct dentry *, void *); struct dentry *debugfs_create_automount(const char *name, struct dentry *parent, debugfs_automount_t f, @@ -211,7 +212,7 @@ static inline struct dentry *debugfs_create_symlink(const char *name, static inline struct dentry *debugfs_create_automount(const char *name, struct dentry *parent, - struct vfsmount *(*f)(void *), + debugfs_automount_t f, void *data) { return ERR_PTR(-ENODEV); -- 2.25.1