All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] platform/chrome: cros_ec_lpc: Use DEFINE_MUTEX() for mutex lock
@ 2021-04-09  9:51 Ye Bin
  2021-04-23  6:57 ` Enric Balletbo i Serra
  0 siblings, 1 reply; 2+ messages in thread
From: Ye Bin @ 2021-04-09  9:51 UTC (permalink / raw)
  To: yebin10, Benson Leung, Enric Balletbo i Serra
  Cc: linux-kernel, kernel-janitors, Hulk Robot

mutex lock can be initialized automatically with DEFINE_MUTEX()
rather than explicitly calling mutex_init().

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
 drivers/platform/chrome/cros_ec_lpc_mec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/platform/chrome/cros_ec_lpc_mec.c b/drivers/platform/chrome/cros_ec_lpc_mec.c
index 9035b17e8c86..bbc2884f5e2f 100644
--- a/drivers/platform/chrome/cros_ec_lpc_mec.c
+++ b/drivers/platform/chrome/cros_ec_lpc_mec.c
@@ -14,7 +14,7 @@
  * This mutex must be held while accessing the EMI unit. We can't rely on the
  * EC mutex because memmap data may be accessed without it being held.
  */
-static struct mutex io_mutex;
+static DEFINE_MUTEX(io_mutex);
 static u16 mec_emi_base, mec_emi_end;
 
 /**
@@ -142,7 +142,6 @@ EXPORT_SYMBOL(cros_ec_lpc_io_bytes_mec);
 
 void cros_ec_lpc_mec_init(unsigned int base, unsigned int end)
 {
-	mutex_init(&io_mutex);
 	mec_emi_base = base;
 	mec_emi_end = end;
 }


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

* Re: [PATCH -next] platform/chrome: cros_ec_lpc: Use DEFINE_MUTEX() for mutex lock
  2021-04-09  9:51 [PATCH -next] platform/chrome: cros_ec_lpc: Use DEFINE_MUTEX() for mutex lock Ye Bin
@ 2021-04-23  6:57 ` Enric Balletbo i Serra
  0 siblings, 0 replies; 2+ messages in thread
From: Enric Balletbo i Serra @ 2021-04-23  6:57 UTC (permalink / raw)
  To: Benson Leung, Ye Bin; +Cc: linux-kernel, Hulk Robot, kernel-janitors

On Fri, 9 Apr 2021 17:51:38 +0800, Ye Bin wrote:
> mutex lock can be initialized automatically with DEFINE_MUTEX()
> rather than explicitly calling mutex_init().

Applied, thanks!

[1/1] platform/chrome: cros_ec_lpc: Use DEFINE_MUTEX() for mutex lock
      commit: d61b3f9b91be32f714b218377ab5081932e3ebc2

Best regards,
-- 
Enric Balletbo i Serra <enric.balletbo@collabora.com>

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

end of thread, other threads:[~2021-04-23  6:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09  9:51 [PATCH -next] platform/chrome: cros_ec_lpc: Use DEFINE_MUTEX() for mutex lock Ye Bin
2021-04-23  6:57 ` Enric Balletbo i Serra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.