[PATCH] drbd: fix pointer cast spacing

Richard Lyu posted 1 patch 4 weeks ago
drivers/block/drbd/drbd_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] drbd: fix pointer cast spacing
Posted by Richard Lyu 4 weeks ago
Checkpatch.pl reports the following coding style issue:
ERROR: "(foo*)" should be "(foo *)"
+		struct p_trim *t = (struct p_trim*)p;

Place '*' next to the variable in the cast expression to follow
the kernel coding style. No functional change.

Signed-off-by: Richard Lyu <richard.lyu@suse.com>
---
 drivers/block/drbd/drbd_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index b8f0eddf7e87..978023e969f8 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -1681,7 +1681,7 @@ int drbd_send_dblock(struct drbd_peer_device *peer_device, struct drbd_request *
 
 	if (dp_flags & (DP_DISCARD|DP_ZEROES)) {
 		enum drbd_packet cmd = (dp_flags & DP_ZEROES) ? P_ZEROES : P_TRIM;
-		struct p_trim *t = (struct p_trim*)p;
+		struct p_trim *t = (struct p_trim *)p;
 		t->size = cpu_to_be32(req->i.size);
 		err = __send_command(peer_device->connection, device->vnr, sock, cmd, sizeof(*t), NULL, 0);
 		goto out;
-- 
2.51.0
Re: [PATCH] drbd: fix pointer cast spacing
Posted by Bart Van Assche 4 weeks ago
On 3/11/26 1:35 AM, Richard Lyu wrote:
> Checkpatch.pl reports the following coding style issue:
> ERROR: "(foo*)" should be "(foo *)"
> +		struct p_trim *t = (struct p_trim*)p;
Checkpatch is for checking patches before these are posted on a Linux
kernel mailing list and should not be used on code that has already
been merged into the Linux kernel tree.

Thanks,

Bart.