[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240624203218.2428475-9-xi.pardee@linux.intel.com>
Date: Mon, 24 Jun 2024 13:32:17 -0700
From: Xi Pardee <xi.pardee@...ux.intel.com>
To: xi.pardee@...ux.intel.com,
irenic.rajneesh@...il.com,
david.e.box@...ux.intel.com,
hdegoede@...hat.com,
ilpo.jarvinen@...ux.intel.com,
platform-driver-x86@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 8/9] platform/x86:intel/pmc: Use the Elvis operator
Replace ternary operator with Elvis operator in
pmc_core_ltr_ignore_write() for better readability
of the code.
Signed-off-by: Xi Pardee <xi.pardee@...ux.intel.com>
---
drivers/platform/x86/intel/pmc/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
index e75c56ee54e6..cfdacb04ff8d 100644
--- a/drivers/platform/x86/intel/pmc/core.c
+++ b/drivers/platform/x86/intel/pmc/core.c
@@ -522,7 +522,7 @@ static ssize_t pmc_core_ltr_ignore_write(struct file *file,
err = pmc_core_send_ltr_ignore(pmcdev, value, 1);
- return err == 0 ? count : err;
+ return err ?: count;
}
static int pmc_core_ltr_ignore_show(struct seq_file *s, void *unused)
--
2.34.1
Powered by blists - more mailing lists