mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 18:14:07 +08:00
92aff5b467
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Because we don't care about the individual files, we can remove the stored dentry for the files, as they are not needed to be kept track of at all. Cc: Ioana Radulescu <ruxandra.radulescu@nxp.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
29 lines
774 B
C
29 lines
774 B
C
/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
|
|
/* Copyright 2015 Freescale Semiconductor Inc.
|
|
* Copyright 2018-2019 NXP
|
|
*/
|
|
#ifndef DPAA2_ETH_DEBUGFS_H
|
|
#define DPAA2_ETH_DEBUGFS_H
|
|
|
|
#include <linux/dcache.h>
|
|
|
|
struct dpaa2_eth_priv;
|
|
|
|
struct dpaa2_debugfs {
|
|
struct dentry *dir;
|
|
};
|
|
|
|
#ifdef CONFIG_DEBUG_FS
|
|
void dpaa2_eth_dbg_init(void);
|
|
void dpaa2_eth_dbg_exit(void);
|
|
void dpaa2_dbg_add(struct dpaa2_eth_priv *priv);
|
|
void dpaa2_dbg_remove(struct dpaa2_eth_priv *priv);
|
|
#else
|
|
static inline void dpaa2_eth_dbg_init(void) {}
|
|
static inline void dpaa2_eth_dbg_exit(void) {}
|
|
static inline void dpaa2_dbg_add(struct dpaa2_eth_priv *priv) {}
|
|
static inline void dpaa2_dbg_remove(struct dpaa2_eth_priv *priv) {}
|
|
#endif /* CONFIG_DEBUG_FS */
|
|
|
|
#endif /* DPAA2_ETH_DEBUGFS_H */
|