Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp937457ybh; Wed, 22 Jul 2020 17:52:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUSKVKAGhE8WxxgYr1XIdwrj3e1ET0oK/DCCIl2xqLPaP7x+aYpKDjjpmuqCHP8ZkCrgbs X-Received: by 2002:a05:6402:a43:: with SMTP id bt3mr1881229edb.332.1595465526294; Wed, 22 Jul 2020 17:52:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595465526; cv=none; d=google.com; s=arc-20160816; b=u4O9eK4+OMi6//DN0PXaq56LxSefXnzbMz1TtA5sFXVhMtoHC5CbyGe3hjEqdgR6NM FNU9ZpiOEoXkh4mELZFefE0qgQKkcTYoUbl9i4iE31hp1ymZg1Ny1kagHOuEB3c9rUEz O8B83D1+KAGGVdC2q2HIrLRE701zG4J4AQ8tbmTA3cjxjkWG9brvDSieHWe8OTdJVL/S edebzgGH7bgQ0FblWZ8WBi2YMHk60tFCfOc9aFOV70MK8nkO2b/oZBRehlEbCnXgBPkC Bd1lSYS1L1WqFu8A64dzypsY38Lx/ta/gk7PWpyUXhXuWwaAZa5hImjO7NhYsuDqw2Mf qvlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=tfIoTfjDp/a91mgOibnM3a9UrKcF4+o+S2eOslmkg8E=; b=dAwiwm6TT74SvgPvZ5/qPW6PxAGwNEmdOl6fkoXWb4zRoOuKqSnxYUBmb+MqNDWszS Ni2uYS1A/9X/Ck9rSQDXHAVPfRj0Dj0F2bhlYdy73axqx8u+CyzJRFvGM0y9xrsrM9Fb OazmtYKPMNOgP9+n8BzV+KYzXV+TO3X8SvvK691WzKM6VX/0UEVUkIBnhdsXdeh3MpAv 7ZM69BWsPDjjXMMjKKN3oK2nbZr+kEyLW7oYlxv6CdIQCXF31ojIB+ykuaTt5ataC/Zj xKkT/lO69VKCaOPC/3MNfteItFe/EJweFZkfJjMpei4Drnl2rtQhMRvnuRcnzOZWkeyG 5FOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=OEO3pmmE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z14si971245ejw.332.2020.07.22.17.51.43; Wed, 22 Jul 2020 17:52:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=OEO3pmmE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733295AbgGWAum (ORCPT + 99 others); Wed, 22 Jul 2020 20:50:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728607AbgGWAul (ORCPT ); Wed, 22 Jul 2020 20:50:41 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89357C0619DC for ; Wed, 22 Jul 2020 17:50:41 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id a32so3290224qtb.5 for ; Wed, 22 Jul 2020 17:50:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tfIoTfjDp/a91mgOibnM3a9UrKcF4+o+S2eOslmkg8E=; b=OEO3pmmEfq4/SKd0FWCE7+iZPd4LVACjD478+0w6qx1vQLHw2eJbiBlUl1ku0MMAZ/ 2s6MiITA/m/lSINCALdyo8abHhuZMtqKZMo6WUh2QeHECmTo25xIHamXmOICzzkZuASA WoyzSzQwI7wr7nmBONpQ0D51bYrLaI69bhAlI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tfIoTfjDp/a91mgOibnM3a9UrKcF4+o+S2eOslmkg8E=; b=IoI5tv4zOg20ctYirNiPtwmYT7pftRqRlv87Z1De8l6jabTtlgaYhXpR58CODOVaO9 3ASkpaS/71zSTlTga/bONOBqyV7oZYYIFT1KYzOm3zOhFuKl910FDGW36vf+3FYMtFs0 Eg0isXOf9KaLp/Ab7Fa1pajn2Jl2wfYlY8omTIV8TapY4pAiDWO88tYiqvm9w9bMAdaa cSMX4C+r27hzcRt1lgi+AftRtoHnODXadqLMZ91inBSViMFPZs3UI2/pKgZeQfWZ8TRJ B/8Ho8cIcUpBkoajIJdjyLQMu1Vm3A04ZtaiEnt7wsyk8GDRr8RyubhxtBxBYDkBRvVp PWrg== X-Gm-Message-State: AOAM533Vf6ZeA5LVoUAFA8beey3CQnybhWt2c3j+NhmALbQ/buzT/MeN JV71i225UeTiAUMmj8VAmbs/rDNvq2Q= X-Received: by 2002:ac8:51d3:: with SMTP id d19mr2004001qtn.151.1595465440338; Wed, 22 Jul 2020 17:50:40 -0700 (PDT) Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com. [209.85.222.182]) by smtp.gmail.com with ESMTPSA id c133sm1405319qkb.111.2020.07.22.17.50.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Jul 2020 17:50:39 -0700 (PDT) Received: by mail-qk1-f182.google.com with SMTP id x69so3931850qkb.1 for ; Wed, 22 Jul 2020 17:50:39 -0700 (PDT) X-Received: by 2002:a37:68c1:: with SMTP id d184mr2806642qkc.62.1595465438712; Wed, 22 Jul 2020 17:50:38 -0700 (PDT) MIME-Version: 1.0 References: <20200722015732.1720840-1-briannorris@chromium.org> <20200722015732.1720840-2-briannorris@chromium.org> <5ebf1534-8045-9894-9c1c-b92b9c6d8479@collabora.com> In-Reply-To: From: Brian Norris Date: Wed, 22 Jul 2020 17:50:26 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] platform/chrome: cros_ec_proto: check for missing EC_CMD_HOST_EVENT_GET_WAKE_MASK To: Guenter Roeck Cc: Enric Balletbo i Serra , Benson Leung , Guenter Roeck , Linux Kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 22, 2020 at 5:43 PM Brian Norris wrote: > unless I got > refactor cros_ec_get_host_event_wake_mask() to use > cros_ec_cmd_xfer_status() instead of send_command(). I'm actually not > sure why we don't do that, now that I think about it... Ah, that would appear to be recursion (cros_ec_query_all() -> cros_ec_get_host_event_wake_mask() -> cros_ec_cmd_xfer_status() -> ... cros_ec_query_all()), although that could only happen if the first cros_ec_query_all() doesn't initialize 'proto_version' to something besides EC_PROTO_VERSION_UNKNOWN. That is only possible if the EC reports '0' back to us. I might skip out on that particular refactor for the moment. Brian