* [PATCH] drivers/nfc: remove obsolete setting of DEBUG @ 2015-04-28 9:08 Valentin Rothberg 2015-04-29 8:27 ` Paul Bolle 2015-06-08 21:26 ` Samuel Ortiz 0 siblings, 2 replies; 5+ messages in thread From: Valentin Rothberg @ 2015-04-28 9:08 UTC (permalink / raw) To: lauro.venancio, aloisio.almeida, sameo, clement.perrochaud, charles.gorand, linux-wireless, linux-kernel Cc: pebolle, rupran, stefan.hengelein, Valentin Rothberg The CPP identifier 'DEBUG' is not used in the source code of nfc at all, so we can safely remove setting it in both Makefiles. Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com> --- I detected this issue with ./scripts/checkkconfigsymbols.py since CONFIG_NFC_DEBUG is not defined in Kconfig. --- drivers/nfc/Makefile | 2 -- drivers/nfc/nxp-nci/Makefile | 2 -- 2 files changed, 4 deletions(-) diff --git a/drivers/nfc/Makefile b/drivers/nfc/Makefile index a4292d790f9b..13b648baf175 100644 --- a/drivers/nfc/Makefile +++ b/drivers/nfc/Makefile @@ -14,5 +14,3 @@ obj-$(CONFIG_NFC_TRF7970A) += trf7970a.o obj-$(CONFIG_NFC_ST21NFCA) += st21nfca/ obj-$(CONFIG_NFC_ST21NFCB) += st21nfcb/ obj-$(CONFIG_NFC_NXP_NCI) += nxp-nci/ - -ccflags-$(CONFIG_NFC_DEBUG) := -DDEBUG diff --git a/drivers/nfc/nxp-nci/Makefile b/drivers/nfc/nxp-nci/Makefile index c008be30bb18..c9ec7869dbd2 100644 --- a/drivers/nfc/nxp-nci/Makefile +++ b/drivers/nfc/nxp-nci/Makefile @@ -7,5 +7,3 @@ nxp-nci_i2c-objs = i2c.o obj-$(CONFIG_NFC_NXP_NCI) += nxp-nci.o obj-$(CONFIG_NFC_NXP_NCI_I2C) += nxp-nci_i2c.o - -ccflags-$(CONFIG_NFC_DEBUG) := -DDEBUG -- 2.1.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/nfc: remove obsolete setting of DEBUG 2015-04-28 9:08 [PATCH] drivers/nfc: remove obsolete setting of DEBUG Valentin Rothberg @ 2015-04-29 8:27 ` Paul Bolle 2015-04-29 8:45 ` Valentin Rothberg 2015-06-08 21:26 ` Samuel Ortiz 1 sibling, 1 reply; 5+ messages in thread From: Paul Bolle @ 2015-04-29 8:27 UTC (permalink / raw) To: Valentin Rothberg Cc: Joe Perches, lauro.venancio, aloisio.almeida, sameo, clement.perrochaud, charles.gorand, linux-wireless, linux-kernel, rupran, stefan.hengelein [Added Joe.] On Tue, 2015-04-28 at 11:08 +0200, Valentin Rothberg wrote: > The CPP identifier 'DEBUG' is not used in the source code of nfc at all, > so we can safely remove setting it in both Makefiles. > > Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com> > --- > I detected this issue with ./scripts/checkkconfigsymbols.py since > CONFIG_NFC_DEBUG is not defined in Kconfig. The patch should be fine, as there is no NFC_DEBUG Kconfig symbol, but I'm not sure whether the commit explanation is correct. As it turns out I submitted a very similar patch two years ago (see https://lkml.kernel.org/r/1365179481.1830.69.camel@x61.thuisdomein ). And it was pointed out to me that the DEBUG macro is used by the pr_debug() macro and friends. I already forgot the details but, in short, DEBUG is a bit of a gotcha: you can't say whether or not it's used by just grepping for it. > --- > drivers/nfc/Makefile | 2 -- > drivers/nfc/nxp-nci/Makefile | 2 -- > 2 files changed, 4 deletions(-) > > diff --git a/drivers/nfc/Makefile b/drivers/nfc/Makefile > index a4292d790f9b..13b648baf175 100644 > --- a/drivers/nfc/Makefile > +++ b/drivers/nfc/Makefile > @@ -14,5 +14,3 @@ obj-$(CONFIG_NFC_TRF7970A) += trf7970a.o > obj-$(CONFIG_NFC_ST21NFCA) += st21nfca/ > obj-$(CONFIG_NFC_ST21NFCB) += st21nfcb/ > obj-$(CONFIG_NFC_NXP_NCI) += nxp-nci/ > - > -ccflags-$(CONFIG_NFC_DEBUG) := -DDEBUG > diff --git a/drivers/nfc/nxp-nci/Makefile b/drivers/nfc/nxp-nci/Makefile > index c008be30bb18..c9ec7869dbd2 100644 > --- a/drivers/nfc/nxp-nci/Makefile > +++ b/drivers/nfc/nxp-nci/Makefile > @@ -7,5 +7,3 @@ nxp-nci_i2c-objs = i2c.o > > obj-$(CONFIG_NFC_NXP_NCI) += nxp-nci.o > obj-$(CONFIG_NFC_NXP_NCI_I2C) += nxp-nci_i2c.o > - > -ccflags-$(CONFIG_NFC_DEBUG) := -DDEBUG Thanks, Paul Bolle ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/nfc: remove obsolete setting of DEBUG 2015-04-29 8:27 ` Paul Bolle @ 2015-04-29 8:45 ` Valentin Rothberg 2015-04-29 8:58 ` Paul Bolle 0 siblings, 1 reply; 5+ messages in thread From: Valentin Rothberg @ 2015-04-29 8:45 UTC (permalink / raw) To: Paul Bolle Cc: Joe Perches, lauro.venancio, aloisio.almeida, sameo, clement.perrochaud, charles.gorand, linux-wireless, linux-kernel, Andreas Ruprecht, hengelein Stefan Hi Paul, On Wed, Apr 29, 2015 at 10:27 AM, Paul Bolle <pebolle@tiscali.nl> wrote: > [Added Joe.] > > On Tue, 2015-04-28 at 11:08 +0200, Valentin Rothberg wrote: >> The CPP identifier 'DEBUG' is not used in the source code of nfc at all, >> so we can safely remove setting it in both Makefiles. >> >> Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com> >> --- >> I detected this issue with ./scripts/checkkconfigsymbols.py since >> CONFIG_NFC_DEBUG is not defined in Kconfig. > > The patch should be fine, as there is no NFC_DEBUG Kconfig symbol, but > I'm not sure whether the commit explanation is correct. > > As it turns out I submitted a very similar patch two years ago (see > https://lkml.kernel.org/r/1365179481.1830.69.camel@x61.thuisdomein ). > And it was pointed out to me that the DEBUG macro is used by the > pr_debug() macro and friends. I already forgot the details but, in > short, DEBUG is a bit of a gotcha: you can't say whether or not it's > used by just grepping for it. Thanks, I was not aware of it at all. I read the code and it seems that if neither DYNAMIC_DEBUG nor DEBUG is defined, pr_debug() does nothing more than to return 0. I am not sure what to do in this case. Somehow it seems reasonable to me to add NFC_DEBUG to Kconfig since a considerable amount of code in nfc seems to depend on DEBUG. Kind regards, Valentin >> --- >> drivers/nfc/Makefile | 2 -- >> drivers/nfc/nxp-nci/Makefile | 2 -- >> 2 files changed, 4 deletions(-) >> >> diff --git a/drivers/nfc/Makefile b/drivers/nfc/Makefile >> index a4292d790f9b..13b648baf175 100644 >> --- a/drivers/nfc/Makefile >> +++ b/drivers/nfc/Makefile >> @@ -14,5 +14,3 @@ obj-$(CONFIG_NFC_TRF7970A) += trf7970a.o >> obj-$(CONFIG_NFC_ST21NFCA) += st21nfca/ >> obj-$(CONFIG_NFC_ST21NFCB) += st21nfcb/ >> obj-$(CONFIG_NFC_NXP_NCI) += nxp-nci/ >> - >> -ccflags-$(CONFIG_NFC_DEBUG) := -DDEBUG >> diff --git a/drivers/nfc/nxp-nci/Makefile b/drivers/nfc/nxp-nci/Makefile >> index c008be30bb18..c9ec7869dbd2 100644 >> --- a/drivers/nfc/nxp-nci/Makefile >> +++ b/drivers/nfc/nxp-nci/Makefile >> @@ -7,5 +7,3 @@ nxp-nci_i2c-objs = i2c.o >> >> obj-$(CONFIG_NFC_NXP_NCI) += nxp-nci.o >> obj-$(CONFIG_NFC_NXP_NCI_I2C) += nxp-nci_i2c.o >> - >> -ccflags-$(CONFIG_NFC_DEBUG) := -DDEBUG > > Thanks, > > > Paul Bolle > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/nfc: remove obsolete setting of DEBUG 2015-04-29 8:45 ` Valentin Rothberg @ 2015-04-29 8:58 ` Paul Bolle 0 siblings, 0 replies; 5+ messages in thread From: Paul Bolle @ 2015-04-29 8:58 UTC (permalink / raw) To: Valentin Rothberg Cc: Joe Perches, lauro.venancio, aloisio.almeida, sameo, clement.perrochaud, charles.gorand, linux-wireless, linux-kernel, Andreas Ruprecht, hengelein Stefan On Wed, 2015-04-29 at 10:45 +0200, Valentin Rothberg wrote: > Thanks, I was not aware of it at all. I read the code and it seems > that if neither DYNAMIC_DEBUG nor DEBUG is defined, pr_debug() does > nothing more than to return 0. > > I am not sure what to do in this case. Somehow it seems reasonable to > me to add NFC_DEBUG to Kconfig since a considerable amount of code in > nfc seems to depend on DEBUG. A few greps tell me the first pointless reference to CONFIG_NFC_DEBUG was added in v3.1. So clearly the people actually building and using the nfc code don't need the DEBUG flag. Apparently using pr_debug() by setting CONFIG_DYNAMIC_DEBUG works for them. (I trust Joe will shout when that statement is incorrect.) So, as I said, the patch should be fine, and only the commit explanation needs work. Paul Bolle ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/nfc: remove obsolete setting of DEBUG 2015-04-28 9:08 [PATCH] drivers/nfc: remove obsolete setting of DEBUG Valentin Rothberg 2015-04-29 8:27 ` Paul Bolle @ 2015-06-08 21:26 ` Samuel Ortiz 1 sibling, 0 replies; 5+ messages in thread From: Samuel Ortiz @ 2015-06-08 21:26 UTC (permalink / raw) To: Valentin Rothberg Cc: lauro.venancio, aloisio.almeida, clement.perrochaud, charles.gorand, linux-wireless, linux-kernel, pebolle, rupran, stefan.hengelein Hi Valentin, On Tue, Apr 28, 2015 at 11:08:47AM +0200, Valentin Rothberg wrote: > The CPP identifier 'DEBUG' is not used in the source code of nfc at all, > so we can safely remove setting it in both Makefiles. > > Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com> > --- > I detected this issue with ./scripts/checkkconfigsymbols.py since > CONFIG_NFC_DEBUG is not defined in Kconfig. > --- > drivers/nfc/Makefile | 2 -- > drivers/nfc/nxp-nci/Makefile | 2 -- > 2 files changed, 4 deletions(-) Applied, with a massaged commit message. Cheers, Samuel. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-06-08 21:27 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-04-28 9:08 [PATCH] drivers/nfc: remove obsolete setting of DEBUG Valentin Rothberg 2015-04-29 8:27 ` Paul Bolle 2015-04-29 8:45 ` Valentin Rothberg 2015-04-29 8:58 ` Paul Bolle 2015-06-08 21:26 ` Samuel Ortiz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).