mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers/accel/habanalabs: Remove unnecessary braces from if statement
@ 2023-12-28 21:08 Malkoot Khan
  2024-01-03 15:42 ` Oded Gabbay
  0 siblings, 1 reply; 2+ messages in thread
From: Malkoot Khan @ 2023-12-28 21:08 UTC (permalink / raw)
  To: ogabbay
  Cc: fkassabri, ttayar, stanislaw.gruszka, kelbaz, dri-devel,
	linux-kernel, Malkoot Khan

The coding style in the Linux kernel prefers not to use 
braces for single-statement if conditions. 
This patch removes the unnecessary braces from an if statement 
in the file drivers/accel/habanalabs/common/command_submission.c, 
which also resolves a coding style warning.

Signed-off-by: Malkoot Khan <engr.mkhan1990@gmail.com>
---
 drivers/accel/habanalabs/common/command_submission.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/accel/habanalabs/common/command_submission.c b/drivers/accel/habanalabs/common/command_submission.c
index 3aa6eeef443b..39e23d625a3c 100644
--- a/drivers/accel/habanalabs/common/command_submission.c
+++ b/drivers/accel/habanalabs/common/command_submission.c
@@ -1360,9 +1360,8 @@ static int hl_cs_sanity_checks(struct hl_fpriv *hpriv, union hl_cs_args *args)
 			return -EINVAL;
 		}
 
-	if (!hl_device_operational(hdev, &status)) {
+	if (!hl_device_operational(hdev, &status))
 		return -EBUSY;
-	}
 
 	if ((args->in.cs_flags & HL_CS_FLAGS_STAGED_SUBMISSION) &&
 			!hdev->supports_staged_submission) {
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-03 15:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-28 21:08 [PATCH] drivers/accel/habanalabs: Remove unnecessary braces from if statement Malkoot Khan
2024-01-03 15:42 ` Oded Gabbay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®