RE: [PATCH 2/2] misc: Add iop driver for Sunplus SP7021
From: Tony Huang 黃懷厚 <hidden>
Date: 2021-11-17 09:17:39
Also in:
lkml
Dear greg k-h:
-----Original Message----- From: Greg KH <gregkh@linuxfoundation.org> Sent: Wednesday, November 17, 2021 4:53 PM To: Tony Huang <tonyhuang.sunplus@gmail.com> Cc: robh+dt@kernel.org; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; derek.kiernan@xilinx.com; dragan.cvetic@xilinx.com; arnd@arndb.de; Wells Lu 呂芳騰 [off-list ref]; Tony Huang 黃懷厚 [off-list ref] Subject: Re: [PATCH 2/2] misc: Add iop driver for Sunplus SP7021 On Wed, Nov 17, 2021 at 02:48:07PM +0800, Tony Huang wrote:quoted
Add iop driver for Sunplus SP7021 Signed-off-by: Tony Huang <redacted>Along with everything that Arnd said, one more thing:quoted
+#define IOP_KDBG_INFO +#define IOP_FUNC_DEBUG +#define IOP_KDBG_ERR +#ifdef IOP_KDBG_INFO + #define FUNC_DEBUG() pr_info("K_IOP: %s(%d)\n", __func__, __LINE__) +#else + #define FUNC_DEBUG() +#endifThis should just be deleted entirely, use ftrace if you want to see what your kernel driver is doing.
OK, I will delete it.
No single driver should have special debugging macros like this, use the kernel-wide system please. This driver code can get a lot smaller after you make these cleanups. Also be sure to use scripts/checkpatch.pl to remove the issues that it points out so we don't have to say the same thing. thanks, greg k-h