From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guilherme G. Piccoli Date: Mon, 16 May 2022 13:14:17 -0300 Subject: [PATCH 18/30] notifier: Show function names on notifier routines if DEBUG_NOTIFIERS is set In-Reply-To: <20220510132922.61883db0@gandalf.local.home> References: <20220427224924.592546-1-gpiccoli@igalia.com> <20220427224924.592546-19-gpiccoli@igalia.com> <9f44aae6-ec00-7ede-ec19-6e67ceb74510@huawei.com> <20220510132922.61883db0@gandalf.local.home> Message-ID: <90133fbb-2b5e-e7cd-e1fc-1f74e8bcd388@igalia.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kexec@lists.infradead.org On 10/05/2022 14:29, Steven Rostedt wrote: > [...] > Also, don't sprinkle #ifdef in C code. Instead: > > if (IS_ENABLED(CONFIG_DEBUG_NOTIFIERS)) > pr_info("notifers: regsiter %ps()\n", > n->notifer_call); > > > Or define a print macro at the start of the C file that is a nop if it is > not defined, and use the macro. Thanks, I'll go with the IS_ENABLED() idea in V2 - appreciate the hint. Cheers, Guilherme