diff mbox series

[BlueZ,v4,1/9] log: Don't log __FILE__ and __func__ with DBG_IDX

Message ID 20220323224003.3736525-2-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Commit a3c9409035deb20ce9d5535ce421f2bd252b92d9
Headers show
Series [BlueZ,v4,1/9] log: Don't log __FILE__ and __func__ with DBG_IDX | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS
tedd_an/setupell success Setup ELL PASS
tedd_an/buildprep success Build Prep PASS
tedd_an/build success Build Configuration PASS
tedd_an/makecheck success Make Check PASS
tedd_an/makecheckvalgrind success Make Check PASS
tedd_an/makedistcheck success Make Distcheck PASS
tedd_an/build_extell success Build External ELL PASS
tedd_an/build_extell_make success Build Make with External ELL PASS

Commit Message

Luiz Augusto von Dentz March 23, 2022, 10:39 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This removes __FILE__ and __func__ from DBG_IDX since users of it may
already contain such information embedded in the format.
---
 src/log.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

bluez.test.bot@gmail.com March 23, 2022, 11:39 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=625873

---Test result---

Test Summary:
CheckPatch                    PASS      1.36 seconds
GitLint                       PASS      0.96 seconds
Prep - Setup ELL              PASS      42.81 seconds
Build - Prep                  PASS      0.72 seconds
Build - Configure             PASS      8.56 seconds
Build - Make                  PASS      1291.43 seconds
Make Check                    PASS      11.92 seconds
Make Check w/Valgrind         PASS      440.83 seconds
Make Distcheck                PASS      226.74 seconds
Build w/ext ELL - Configure   PASS      8.66 seconds
Build w/ext ELL - Make        PASS      1251.70 seconds
Incremental Build with patchesPASS      0.00 seconds



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org March 24, 2022, 7:50 p.m. UTC | #2
Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed, 23 Mar 2022 15:39:55 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> This removes __FILE__ and __func__ from DBG_IDX since users of it may
> already contain such information embedded in the format.
> ---
>  src/log.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Here is the summary with links:
  - [BlueZ,v4,1/9] log: Don't log __FILE__ and __func__ with DBG_IDX
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=a3c9409035de

You are awesome, thank you!
Luiz Augusto von Dentz March 24, 2022, 8:11 p.m. UTC | #3
Hi,

On Wed, Mar 23, 2022 at 4:39 PM <bluez.test.bot@gmail.com> wrote:
>
> This is automated email and please do not reply to this email!
>
> Dear submitter,
>
> Thank you for submitting the patches to the linux bluetooth mailing list.
> This is a CI test results with your patch series:
> PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=625873
>
> ---Test result---
>
> Test Summary:
> CheckPatch                    PASS      1.36 seconds
> GitLint                       PASS      0.96 seconds
> Prep - Setup ELL              PASS      42.81 seconds
> Build - Prep                  PASS      0.72 seconds
> Build - Configure             PASS      8.56 seconds
> Build - Make                  PASS      1291.43 seconds
> Make Check                    PASS      11.92 seconds
> Make Check w/Valgrind         PASS      440.83 seconds
> Make Distcheck                PASS      226.74 seconds
> Build w/ext ELL - Configure   PASS      8.66 seconds
> Build w/ext ELL - Make        PASS      1251.70 seconds
> Incremental Build with patchesPASS      0.00 seconds
>
>
>
> ---
> Regards,
> Linux Bluetooth
>

Pushed.
Marcel Holtmann March 25, 2022, 2:57 p.m. UTC | #4
Hi Luiz,

> This removes __FILE__ and __func__ from DBG_IDX since users of it may
> already contain such information embedded in the format.
> ---
> src/log.h | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/log.h b/src/log.h
> index 74941beb2..1ed742a0d 100644
> --- a/src/log.h
> +++ b/src/log.h
> @@ -9,6 +9,7 @@
>  */
> 
> #include <stdint.h>
> +#include <stdbool.h>

seems to have nothing to do with the change here.

> void info(const char *format, ...) __attribute__((format(printf, 1, 2)));
> 
> @@ -52,10 +53,11 @@ void __btd_enable_debug(struct btd_debug_desc *start,
> 		.file = __FILE__, .flags = BTD_DEBUG_FLAG_DEFAULT, \
> 	}; \
> 	if (__btd_debug_desc.flags & BTD_DEBUG_FLAG_PRINT) \
> -		btd_debug(idx, "%s:%s() " fmt, __FILE__, __func__ , ## arg); \
> +		btd_debug(idx, fmt, ## arg); \
> } while (0)
> 
> -#define DBG(fmt, arg...) DBG_IDX(0xffff, fmt, ## arg)
> +#define DBG(fmt, arg...) \
> +	DBG_IDX(0xffff, "%s:%s() " fmt, __FILE__, __func__, ## arg)
> #define error(fmt, arg...) \
> 	btd_error(0xffff, "%s:%s() " fmt, __FILE__, __func__, ## arg)
> #define warn(fmt, arg...) \

I am still failing to see why this is better.

Regards

Marcel
diff mbox series

Patch

diff --git a/src/log.h b/src/log.h
index 74941beb2..1ed742a0d 100644
--- a/src/log.h
+++ b/src/log.h
@@ -9,6 +9,7 @@ 
  */
 
 #include <stdint.h>
+#include <stdbool.h>
 
 void info(const char *format, ...) __attribute__((format(printf, 1, 2)));
 
@@ -52,10 +53,11 @@  void __btd_enable_debug(struct btd_debug_desc *start,
 		.file = __FILE__, .flags = BTD_DEBUG_FLAG_DEFAULT, \
 	}; \
 	if (__btd_debug_desc.flags & BTD_DEBUG_FLAG_PRINT) \
-		btd_debug(idx, "%s:%s() " fmt, __FILE__, __func__ , ## arg); \
+		btd_debug(idx, fmt, ## arg); \
 } while (0)
 
-#define DBG(fmt, arg...) DBG_IDX(0xffff, fmt, ## arg)
+#define DBG(fmt, arg...) \
+	DBG_IDX(0xffff, "%s:%s() " fmt, __FILE__, __func__, ## arg)
 #define error(fmt, arg...) \
 	btd_error(0xffff, "%s:%s() " fmt, __FILE__, __func__, ## arg)
 #define warn(fmt, arg...) \