Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3901440ybc; Thu, 21 Nov 2019 15:57:13 -0800 (PST) X-Google-Smtp-Source: APXvYqxLwTZAuG2AsdpNZPnNDZqXrEEI2+v3ZoX8NJE1gcwkY50pYkZh+AeNbRCBxAlyLnWNKyaX X-Received: by 2002:a17:906:1611:: with SMTP id m17mr17799893ejd.281.1574380632932; Thu, 21 Nov 2019 15:57:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574380632; cv=none; d=google.com; s=arc-20160816; b=NuxvEtkj9oHTW78JLdlZVM58XSL0hUwANzOfimqGfXaBH//GI2IRKBL++t33lB/7Eb sRekJcKBGQHhQ07FoUoucqd9nb2xVd2/WFU72Skcoe4SPFhXDFt8Eq0MXc17IMbdw4R7 f9JLQijFlA4sf0jgZajJtXT3iwbpGPoybeeaiRsahQmzKWmp7bH1fDLaO6cRgpY5KCPt alo2Xbg5CPnAZFmdmPvL/aVKfrNYvz1giuuSfk/BpTeZMIEqAmYDSuIzMGF0BFLt9L5a wfp5j+BFBbYyLeGiYuBTN+CQhWeJNXyDb21tDC0rtW/QjbMIY/Z3j4L7eE4tjbzMEqOM rSaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=5SUq38Wg5GDJ3aX8CMmEOB2q75X2RKJ36npVt2G9LXU=; b=OjX2PGqFzcXNk6hURtd84ysq+cYMXGvSN1EqnjBSpoMdyoOJ58vCiKDfRITVGiDhcH BYP7UnSq7m9mVljtSv9Xr/4zM99/S2lsg+q8RXdfIep6upzAjj9M8yiKYP66HauFjFtz +9PnXe61jNnMmmS0KREAsrN9syzdokIQOCZoCBIxT1n+n8ZKGNxtwRcKepSADBoUnjTC MlJS7zg9wcI7RmDnOKE1wM6bOLbbLjWo1P445//iCylqSfn9k5qgfLKFJXtNG0EaN/GU 2Y9cYAi1YBYlkTN5R+rSUwYBuNzNQGBChnR7ognj8JH4DytAw6xoqum/7VuhasK6DAt+ 3r4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u20si2981869ejr.168.2019.11.21.15.56.49; Thu, 21 Nov 2019 15:57:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726573AbfKUXxm (ORCPT + 99 others); Thu, 21 Nov 2019 18:53:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:48740 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725956AbfKUXxl (ORCPT ); Thu, 21 Nov 2019 18:53:41 -0500 Received: from oasis.local.home (unknown [66.170.99.95]) (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 E7CE3206C2; Thu, 21 Nov 2019 23:53:40 +0000 (UTC) Date: Thu, 21 Nov 2019 18:53:39 -0500 From: Steven Rostedt To: Kusanagi Kouichi Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH] debugfs: Fix !DEBUG_FS debugfs_create_automount Message-ID: <20191121185339.4ef626df@oasis.local.home> In-Reply-To: <20191121102021787.MLMY.25002.ppp.dion.ne.jp@dmta0003.auone-net.jp> References: <20191121102021787.MLMY.25002.ppp.dion.ne.jp@dmta0003.auone-net.jp> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 21 Nov 2019 19:20:21 +0900 Kusanagi Kouichi wrote: > 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 *), > | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ > Please add the tag: Reported-by: kbuild test robot You can also add: Link: https://lore.kernel.org/lkml/201911211354.zYtbB4MD%25lkp@intel.com/ -- Steve > Signed-off-by: Kusanagi Kouichi > --- > 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 58424eb3b329..798f0b9b43ae 100644 > --- a/include/linux/debugfs.h > +++ b/include/linux/debugfs.h > @@ -54,6 +54,8 @@ static const struct file_operations __fops = { \ > .llseek = no_llseek, \ > } > > +typedef struct vfsmount *(*debugfs_automount_t)(struct dentry *, void *); > + > #if defined(CONFIG_DEBUG_FS) > > struct dentry *debugfs_lookup(const char *name, struct dentry *parent); > @@ -75,7 +77,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, > @@ -203,7 +204,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);