Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp853402lqj; Mon, 3 Jun 2024 02:52:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVn87TqvnaHEigx3frUprYIMschauqOElKyZ2sdrO1RZo8soAuBQmLVz8KzaQiEE9j1NOfj8UVgZmjFuYwn220A6v3tHbkS0rCqLuGCuQ== X-Google-Smtp-Source: AGHT+IFWNU00mu2qpBnZRRonMy3CDci12vduuZ424ckZp4SLjB+y6TPTHF6/GZGT4pdudO9UNGOr X-Received: by 2002:a17:902:e851:b0:1f4:947b:b7b6 with SMTP id d9443c01a7336-1f6370320c1mr99751415ad.39.1717408355441; Mon, 03 Jun 2024 02:52:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717408355; cv=pass; d=google.com; s=arc-20160816; b=hkoByAAapKO7d5CSq+twYszHkqRJchnrGYK4Fcf+xcsQ0nYD2P44DjPDWKRcvmqNwF Yvj+rCoO7NETeO7oKB9c2jPclXHToZkvZjwxPmbIwS6kLDBF7R5tntbLsHG+gsfTuAL9 4JETo6QCTPaxfaPNnSk+KLBJk97VgjMMSaLYPSJ3UfcVrgzLTL/P0B1okQdsbFHy0lzo YqPFRVFF32QKYB4OH0YzBSYfxpDmFmc0rF8R/3y/CFKMIqNDfSX/aeqWGcZHsfAtMGIQ 90u6ErHghg++fqbnAt0D+nj37ozElMbJwpfj3aHZj83QlcD3krTvuzDxYoHuUQYC5rbA jsbA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+O4NF2Z8/uvtl0S5unuKt+AxQXHU5iVDy/zPOl9sv2c=; fh=O7W32hzrxLioy2lU7cq0myUffGADZNPHRUPmOpshY3A=; b=PP9OyCcNuKabO7uOrGZMMNg1gpA7PGFbHngB5wjCPKfTooCs5c0ZI1bZvSjkjtbil8 OEfcBbvCqDIVCUVUp0ecBA4worxBsOxn3mMb9c2Fsp29Wt90FrfqjX4nlRO6F0+SYlOa nZEchUjrzmOntBaMFs1bFB1I2eJ//J3ZNIG9z3brSESa+PNjHkJHzSIGDLe9916Xv2iA aCp1HyoB6fbmxPW4UJRcy1hYPCp/U33mC2/5mN+IidFNDmFRfYjdRXHggrZwn08MH+QB 4m+Ro9GluixlDAsHsKQsLnnBB2g+a0BuiD7d3spU/lj2FgCZnDL3h66aSHBxNmwinG1u Rxaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YtODyGZQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-198895-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198895-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6323dd93asi62476455ad.288.2024.06.03.02.52.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 02:52:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198895-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YtODyGZQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-198895-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198895-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8CD75289566 for ; Mon, 3 Jun 2024 09:36:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D56BD129E7B; Mon, 3 Jun 2024 09:30:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YtODyGZQ" 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 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.