diff mbox series

[BlueZ,1/2] client/player: Fix checkpatch warning

Message ID 20220830214215.1137276-1-luiz.dentz@gmail.com
State New
Headers show
Series [BlueZ,1/2] client/player: Fix checkpatch warning | expand

Commit Message

Luiz Augusto von Dentz Aug. 30, 2022, 9:42 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This fixes the following checkpatch warning:

WARNING:LINE_SPACING: Missing a blank line after declarations
216: FILE: client/player.c:625:
+               GDBusProxy *proxy = l->data;
+               print_player(proxy, NULL);
---
 client/player.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

Comments

bluez.test.bot@gmail.com Aug. 30, 2022, 11:14 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=672614

---Test result---

Test Summary:
CheckPatch                    FAIL      1.39 seconds
GitLint                       PASS      0.96 seconds
Prep - Setup ELL              PASS      32.15 seconds
Build - Prep                  PASS      0.65 seconds
Build - Configure             PASS      10.33 seconds
Build - Make                  PASS      980.25 seconds
Make Check                    PASS      12.90 seconds
Make Check w/Valgrind         PASS      347.96 seconds
Make Distcheck                PASS      300.51 seconds
Build w/ext ELL - Configure   PASS      10.48 seconds
Build w/ext ELL - Make        PASS      101.00 seconds
Incremental Build w/ patches  PASS      242.98 seconds
Scan Build                    WARNING   684.12 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script with rule in .checkpatch.conf
Output:
[BlueZ,1/2] client/player: Fix checkpatch warning
WARNING:EMAIL_SUBJECT: A patch subject line should describe the change not the tool that found it
#69: 
Subject: [PATCH BlueZ 1/2] client/player: Fix checkpatch warning

/github/workspace/src/12959894.patch total: 0 errors, 1 warnings, 24 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/12959894.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


##############################
Test: Scan Build - WARNING
Desc: Run Scan Build with patches
Output:
*****************************************************************************
The bugs reported by the scan-build may or may not be caused by your patches.
Please check the list and fix the bugs if they are caused by your patch.
*****************************************************************************
client/player.c:1755:25: warning: Dereference of null pointer
        iov_append(&cfg->caps, preset->data.iov_base, preset->data.iov_len);
                               ^~~~~~~~~~~~~~~~~~~~~
1 warning generated.
src/shared/shell.c:1136:19: warning: Null pointer passed to 1st parameter expecting 'nonnull'
                        data.timeout = strtol(optarg, &endptr, 0);
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/shell.c:1158:13: warning: Access to field 'options' results in a dereference of a null pointer (loaded from variable 'opt')
                        if (c != opt->options[index - offset].val) {
                                 ^~~~~~~~~~~~
2 warnings generated.




---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Aug. 31, 2022, 11:10 p.m. UTC | #2
Hello:

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

On Tue, 30 Aug 2022 14:42:14 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> This fixes the following checkpatch warning:
> 
> WARNING:LINE_SPACING: Missing a blank line after declarations
> 216: FILE: client/player.c:625:
> +               GDBusProxy *proxy = l->data;
> +               print_player(proxy, NULL);
> 
> [...]

Here is the summary with links:
  - [BlueZ,1/2] client/player: Fix checkpatch warning
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=d8febc76a43f
  - [BlueZ,2/2] shared/shell: Fix scan-build error
    (no matching commit)

You are awesome, thank you!
diff mbox series

Patch

diff --git a/client/player.c b/client/player.c
index 3d2f41cb3666..0daacabf3c27 100644
--- a/client/player.c
+++ b/client/player.c
@@ -604,8 +604,10 @@  static void print_media(GDBusProxy *proxy, const char *description)
 	g_free(str);
 }
 
-static void print_player(GDBusProxy *proxy, const char *description)
+static void print_player(void *data, void *user_data)
 {
+	GDBusProxy *proxy = data;
+	const char *description = user_data;
 	char *str;
 
 	str = proxy_description(proxy, "Player", description);
@@ -618,12 +620,7 @@  static void print_player(GDBusProxy *proxy, const char *description)
 
 static void cmd_list(int argc, char *arg[])
 {
-	GList *l;
-
-	for (l = players; l; l = g_list_next(l)) {
-		GDBusProxy *proxy = l->data;
-		print_player(proxy, NULL);
-	}
+	g_list_foreach(players, print_player, NULL);
 
 	return bt_shell_noninteractive_quit(EXIT_SUCCESS);
 }