Skip to contentSkip to conversation

misc: ibmasm: add parentheses around sizeof operand

PATCH New Batu Ada Tutkun 1 participant 1 message Jun 22 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 misc: ibmasm: add parentheses around sizeof operand

sizeof used without parentheses around its operand on two occasions in r_heartbeat.c. Add them to comply with the kernel coding style.

---
 drivers/misc/ibmasm/r_heartbeat.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/misc/ibmasm/r_heartbeat.c +2 -2
index 21c9b6a6f..8d3fa0ce4 100644
@@ -51,12 +51,12 @@ int ibmasm_start_reverse_heartbeat(struct service_processor *sp, struct reverse_
 	int times_failed = 0;
 	int result = 1;
 
-	cmd = ibmasm_new_command(sp, sizeof rhb_dot_cmd);
+	cmd = ibmasm_new_command(sp, sizeof(rhb_dot_cmd));
 	if (!cmd)
 		return -ENOMEM;
 
 	while (times_failed < 3) {
-		memcpy(cmd->buffer, (void *)&rhb_dot_cmd, sizeof rhb_dot_cmd);
+		memcpy(cmd->buffer, (void *)&rhb_dot_cmd, sizeof(rhb_dot_cmd));
 		cmd->status = IBMASM_CMD_PENDING;
 		ibmasm_exec_command(sp, cmd);
 		ibmasm_wait_for_response(cmd, IBMASM_CMD_TIMEOUT_NORMAL);
Signature · 1 line
2.53.0