Skip to contentSkip to conversation

net: qrtr: fix coding style issues flagged by checkpatch

PATCH In review Murali Krishna 2 participants 3 messages Sep 13 – Sep 14

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover net: qrtr: fix coding style issues flagged by checkpatch

Hello,

This is my first patch to the kernel and I am still learning the process, so please forgive any mistakes in formatting or etiquette.

This patch addresses a few minor coding style issues in net/qrtr/ that I found by running checkpatch --strict:

- Fix missing space in a pointer cast (ERROR)
- Move trailing "*/" to its own line in two block comments (WARNING)
- Add parameter names to a function pointer declaration (WARNING)
- Remove an unnecessary return at the end of a void function (WARNING)

After applying, both af_qrtr.c and ns.c pass checkpatch --strict with zero errors, warnings, and checks.

I would be very grateful for any feedback or suggestions, even if the patch is accepted as-is. I am happy to send a v2 if anything needs to be changed.

Thank you for your time.

Kind regards,
Murali Krishna

Murali Krishna (1):
net: qrtr: fix coding style issues flagged by checkpatch

 net/qrtr/af_qrtr.c | 12 +++++++-----
 net/qrtr/ns.c      |  2 --
 2 files changed, 7 insertions(+), 7 deletions(-)

--
2.43.0

#1 lore raw

PATCH 1/1 net: qrtr: fix coding style issues flagged by checkpatch

Fix several coding style issues in the QRTR subsystem detected by checkpatch --strict:

- af_qrtr.c: fix missing space in pointer cast, "(u8*)" should be "(u8 *)" (ERROR)
- af_qrtr.c: move trailing "*/" to a separate line in two multi-line block comments to match kernel comment style (WARNING)
- af_qrtr.c: add missing parameter names to the enqueue_fn function pointer declaration in qrtr_sendmsg() (WARNING)
- ns.c: remove unnecessary return statement at end of void function service_announce_del() (WARNING)

No functional change.

---
 net/qrtr/af_qrtr.c | 12 +++++++-----
 net/qrtr/ns.c      |  2 --
 2 files changed, 7 insertions(+), 7 deletions(-)
net/qrtr/af_qrtr.c +7 -5
index 78347c937..3f4e56a39 100644
@@ -393,7 +393,8 @@ static int qrtr_node_enqueue(struct qrtr_node *node, struct sk_buff *skb,
 		mutex_unlock(&node->ep_lock);
 	}
 	/* Need to ensure that a subsequent message carries the otherwise lost
-	 * confirm_rx flag if we dropped this one */
+	 * confirm_rx flag if we dropped this one
+	 */
 	if (rc && confirm_rx)
 		qrtr_tx_flow_failed(node, to->sq_node, to->sq_port);
 
@@ -471,7 +472,7 @@ int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len)
 	cb = (struct qrtr_cb *)skb->cb;
 
 	/* Version field in v1 is little endian, so this works for both cases */
-	ver = *(u8*)data;
+	ver = *(u8 *)data;
 
 	switch (ver) {
 	case QRTR_PROTO_VER_1:
@@ -769,7 +770,8 @@ static void qrtr_port_remove(struct qrtr_sock *ipc)
 	xa_erase(&qrtr_ports, port);
 
 	/* Ensure that if qrtr_port_lookup() did enter the RCU read section we
-	 * wait for it to up increment the refcount */
+	 * wait for it to up increment the refcount
+	 */
 	synchronize_rcu();
 
 	__sock_put(&ipc->sk);
@@ -957,8 +959,8 @@ static int qrtr_bcast_enqueue(struct qrtr_node *node, struct sk_buff *skb,
 static int qrtr_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
 {
 	DECLARE_SOCKADDR(struct sockaddr_qrtr *, addr, msg->msg_name);
-	int (*enqueue_fn)(struct qrtr_node *, struct sk_buff *, int,
-			  struct sockaddr_qrtr *, struct sockaddr_qrtr *);
+	int (*enqueue_fn)(struct qrtr_node *node, struct sk_buff *skb, int type,
+			  struct sockaddr_qrtr *from, struct sockaddr_qrtr *to);
 	__le32 qrtr_type = cpu_to_le32(QRTR_TYPE_DATA);
 	struct qrtr_sock *ipc = qrtr_sk(sock->sk);
 	struct sock *sk = sock->sk;
net/qrtr/ns.c +0 -2
index bcb090ee7..aaf77c7f5 100644
@@ -179,8 +179,6 @@ static void service_announce_del(struct sockaddr_qrtr *dest,
 	ret = kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt));
 	if (ret < 0 && ret != -ENODEV)
 		pr_err("failed to announce del service\n");
-
-	return;
 }
 
 static void lookup_notify(struct sockaddr_qrtr *to, struct qrtr_server *srv,
Signature · 1 line
2.43.0
maintainer
#2 lore raw
Quoted 11 lines · On Sun, 13 Sep 2026 23:33:42 +0530 Murali Krishna wrote:

Fix several coding style issues in the QRTR subsystem detected by checkpatch --strict:

- af_qrtr.c: fix missing space in pointer cast, "(u8*)" should be "(u8 *)" (ERROR)
- af_qrtr.c: move trailing "*/" to a separate line in two multi-line block comments to match kernel comment style (WARNING)
- af_qrtr.c: add missing parameter names to the enqueue_fn function pointer declaration in qrtr_sendmsg() (WARNING)
- ns.c: remove unnecessary return statement at end of void function service_announce_del() (WARNING)

You seem to have ignored all the automated messages telling you to slow down. And we do not accept checkpatch fixes, please see below.

Please do not send any more patches to networking for a month.

Quoting documentation:

Clean-up patches
~~~~~~~~~~~~~~~~

Netdev discourages patches which perform simple clean-ups, which are not in the context of other work. For example:

* Addressing ``checkpatch.pl``, and other trivial coding style warnings
* Addressing :ref:Local variable ordering<rcs> issues
* Conversions to device-managed APIs (``devm_`` helpers)

This is because it is felt that the churn that such changes produce comes at a greater cost than the value of such clean-ups.

Conversely, spelling and grammar fixes are not discouraged.

See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#clean-up-patches