From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09E56495CC; Mon, 3 Jun 2024 09:30:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717407043; cv=none; b=AwHmmg5KUbg9MHwQp9vTh5Jdo7WwJgqpG7OwpNZoZuACcWoUNJhV3l4WiSjZf6FqHPX3p8zfhXeQtk3+C7GFeU5FQJLmpLONL4IrzQG2aKobHOMqhhW2fmKccEwoDw683Fn2kT37vjM1WOMkRsizPuDVF55fNmlks2cHPTIERJg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717407043; c=relaxed/simple; bh=aCGmBQnn9jMgxSZQN1wU1R72pqs7jsx6KoIKykMgu/8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bG2j106V9f6Qwq/uOiRvUgPml+mCBF19q9zUusiC7tRLvTQx+BMHiUgdZavKQTNhhxhmzytOAQ+G37qtszIpf0+mkMh05iWbmfYlof75SUdNQ3qhj5+B4M3QEN0VqTezkE+bY6LTOQoIWP5ND4UHIjN39Hd5hTq821a5Hguw6JM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YtODyGZQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YtODyGZQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D726C2BD10; Mon, 3 Jun 2024 09:30:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717407042; bh=aCGmBQnn9jMgxSZQN1wU1R72pqs7jsx6KoIKykMgu/8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YtODyGZQxKGzr1cEYY8M9WJlBRx+T2hidXuOzT0+QrXSTe7ub7fuhPZbbOWb0e3ee bmTg/gboJiyNWHFy5wjKYZr7HHOdRtsHJUyCLi7p2E6Bi4TbpA+c7GmTP9pXHlDNy4 mViza5URWH9RPz9wQe/GKMg+h1VChmSFfJJfbBmYRac3Ii80TRzc2B+K8rJLG6Kdsw ypUzQY+0IN4H0fZz0xJagYMuT3yjtdwrYCZwwYiu9swKEGOqb804sx+JtZSBLa8+LY HB/TcaTmLDsaOHgrjemCACwTaOg1M+JhdrHzweEH4nsvKg68IeAjbGhevFDnTmDCOf WT8283ptzJ9jA== Date: Mon, 3 Jun 2024 09:30:39 +0000 From: Tzung-Bi Shih To: Ben Walsh Cc: Benson Leung , Guenter Roeck , "Dustin L. Howett" , Kieran Levin , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Mario Limonciello , chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/5] platform/chrome: cros_ec_lpc: MEC access can use an AML mutex Message-ID: References: <20240603063834.5580-1-ben@jubnut.com> <20240603063834.5580-3-ben@jubnut.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240603063834.5580-3-ben@jubnut.com> On Mon, Jun 03, 2024 at 07:38:31AM +0100, Ben Walsh wrote: > +static int cros_ec_lpc_mec_lock(void) > +{ > + bool success; > + > + if (!aml_mutex) { > + mutex_lock(&io_mutex); > + return 0; > + } > + > + success = ACPI_SUCCESS(acpi_acquire_mutex(aml_mutex, > + NULL, ACPI_LOCK_DELAY_MS)); > + The blank line can be dropped. It's up to you. > +static int cros_ec_lpc_mec_unlock(void) > +{ > + bool success; > + > + if (!aml_mutex) { > + mutex_unlock(&io_mutex); > + return 0; > + } > + > + success = ACPI_SUCCESS(acpi_release_mutex(aml_mutex, NULL)); > + Same here.