Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp882512pxk; Thu, 17 Sep 2020 20:14:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPNKg+72atZEdEKC16qpkrc8ZFsYG7VwqnwbHB8Jz+CzL2gCaxYGb8tY9IVBcUZUuh3mOd X-Received: by 2002:a17:906:ae8f:: with SMTP id md15mr32460308ejb.131.1600398891863; Thu, 17 Sep 2020 20:14:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600398891; cv=none; d=google.com; s=arc-20160816; b=SRgKOjmrj1nYhD+HmZTZ09waEQvMKxEJ+9uit9pKfN3HGQMqMp+KG77nPi2a09tmEa oFKgJNs+Ee8zjcJB8dYZy/thpkp3iiGG3eW1DWxCpipFNMWTdLmgA1BlnvLjf7Jbml88 OXV4zkox1tJ5YIt4xCaGftIcy26TN+f29k1KyPIbNoz8JNHIk4nSoUcn5HsHsudk8UVA 9J/vyk+3EVZpYq7lwkmBUJwhZlHEhkCK8moxGNLqy071TrbR9HcImgsRKcYdFpx3R/Nu VXKJvDEgFDMTvgUL6EZZanJZsRwerPFVporST71pDc3depIFjJh6yfaOxMAIgWoN1UM/ V6Tg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fGwG+OzsyAsN45g9p9ShYKNnPLC322vwN8FsvPkzXwU=; b=FFwb8hXfg0BPyjwYS+Ipkbn3ewD35yADcvE0BoQiu6PIXPANWejOCa+3Q1RExQ5ADX ODxokCDa2plg6o9u0IEZ1FTJaQlaxuwZE0IsvqZ/aNlLK9JFr7X9KpOARWR9QCvXwphC y1f+Dd7fzBZ94qS/Ti/V6YPDdPJnJK4FTHcHAybMwcWdRhhW4sxf0eI8aP3U5m3jSwmI UI4FFny0jkOAZXxJJZbFKMHIM2b55XLuFG94uwnwSeNppt6G5NEylqng7F/Pv0XX3yVC GWvKngrBNLKdDODIZ98IH14RvPe84kH2XgA01nVEUzl5NR2HKjGtpbzRdOqe/IsZIr9b HUtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=B9oJWY1S; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u11si1239697edb.155.2020.09.17.20.14.28; Thu, 17 Sep 2020 20:14:51 -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=B9oJWY1S; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726739AbgIRDL3 (ORCPT + 99 others); Thu, 17 Sep 2020 23:11:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:47694 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726749AbgIRCC3 (ORCPT ); Thu, 17 Sep 2020 22:02:29 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 193D323770; Fri, 18 Sep 2020 02:02:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394542; bh=xOd9QKWTSY2iyHQRA3tBBDFqWyLXobXanE1Ql2zUFvk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B9oJWY1ShEIR1aiSwKboSOLbyPWYpoa/36NqRETpK8uBxMMgvt7iQmdZsdn/MrZsY ACpJ/SoOtcrI0PlE4DP41gCQ3iD0OYN88IYq667PO5/jQBC4Py1Xxkm/sW5KZuV4B6 EzxgFckLAV+2AUMChN5lp/4/lb7sVpiFMh0xE5Kc= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Kusanagi Kouichi , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH AUTOSEL 5.4 060/330] debugfs: Fix !DEBUG_FS debugfs_create_automount Date: Thu, 17 Sep 2020 21:56:40 -0400 Message-Id: <20200918020110.2063155-60-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 58424eb3b3291..798f0b9b43aee 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); -- 2.25.1