[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAC5umyhX0peGYyh49rb9TPHK4=+s_UT6WFSTVv0cXpycAuu4kw@mail.gmail.com>
Date: Thu, 12 Feb 2015 22:53:44 +0900
From: Akinobu Mita <akinobu.mita@...il.com>
To: Gilad Broner <gbroner@...eaurora.org>
Cc: Jej B <James.Bottomley@...senpartnership.com>,
LKML <linux-kernel@...r.kernel.org>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
linux-arm-msm@...r.kernel.org, Santosh Y <santoshsy@...il.com>,
linux-scsi-owner@...r.kernel.org,
Subhash Jadavani <subhashj@...eaurora.org>,
Yaniv Gardi <ygardi@...eaurora.org>,
Dolev Raviv <draviv@...eaurora.org>,
Lee Susman <lsusman@...eaurora.org>,
Raviv Shvili <rshvili@...eaurora.org>,
Vinayak Holikatti <vinholikatti@...il.com>,
"James E.J. Bottomley" <JBottomley@...allels.com>
Subject: Re: [PATCH v2 2/4] scsi: ufs: add debugfs for ufs
2015-02-10 22:58 GMT+09:00 Gilad Broner <gbroner@...eaurora.org>:
> @@ -5760,6 +5963,8 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
>
> async_schedule(ufshcd_async_scan, hba);
>
> + UFSDBG_ADD_DEBUGFS(hba);
> +
> return 0;
>
> out_remove_scsi_host:
> @@ -5769,6 +5974,7 @@ exit_gating:
> out_disable:
> hba->is_irq_enabled = false;
> scsi_host_put(host);
> + UFSDBG_REMOVE_DEBUGFS(hba);
> ufshcd_hba_exit(hba);
> out_error:
> return err;
UFSDBG_REMOVE_DEBUGFS() is not called in the driver unloading path.
So ufs debugfs directory is not removed when unloading driver. It
should be called in ufshcd_remove().
BTW, do we really need UFSDBG_ADD_DEBUGFS() and UFSDBG_REMOVE_DEBUGFS()
macros?
We can use static inline functions in ufs-debugfs.h when !CONFIG_DEBUG_FS.
#ifdef CONFIG_DEBUG_FS
void ufsdbg_add_debugfs(struct ufs_hba *hba);
void ufsdbg_remove_debugfs(struct ufs_hba *hba);
#else
static inline void ufsdbg_add_debugfs(struct ufs_hba *hba)
{
}
static inline void ufsdbg_remove_debugfs(struct ufs_hba *hba)
{
}
#endif
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists