2022-03-24 06:53:54

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: [PATCH BlueZ v4 1/9] log: Don't log __FILE__ and __func__ with DBG_IDX

From: Luiz Augusto von Dentz <[email protected]>

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>

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...) \
--
2.35.1


2022-03-24 19:47:40

by bluez.test.bot

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

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

2022-03-24 21:05:04

by Luiz Augusto von Dentz

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

Hi,

On Wed, Mar 23, 2022 at 4:39 PM <[email protected]> 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.

--
Luiz Augusto von Dentz

2022-03-25 13:50:28

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH BlueZ v4 1/9] log: Don't log __FILE__ and __func__ with DBG_IDX

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <[email protected]>:

On Wed, 23 Mar 2022 15:39:55 -0700 you wrote:
> From: Luiz Augusto von Dentz <[email protected]>
>
> 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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html


2022-03-25 19:56:11

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH BlueZ v4 1/9] log: Don't log __FILE__ and __func__ with DBG_IDX

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