Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2300630iof; Wed, 8 Jun 2022 01:53:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzERuEpR5PqKaYW8XBqCn66KEaFgkrUZRaIr9bOnru1xRIgo2zHXNBcaZHk5iqsO/FyKL5w X-Received: by 2002:a17:90b:3805:b0:1e6:85aa:51b with SMTP id mq5-20020a17090b380500b001e685aa051bmr34431130pjb.182.1654678389835; Wed, 08 Jun 2022 01:53:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654678389; cv=none; d=google.com; s=arc-20160816; b=QYlr9xU1tlmytl6FDZ/ICxFXtpOVHioSLYe5bphT9ClobOFxVROIHuQQbe2LPtEovV zWtsK5dQ2EfEh0XcmeDULb1W+gXdFNIV6DYorEffPKE3lpDbZbYNGJu3ug1lt3BsdJ0Z RfwxFGEik0X599J1CwxKRoxx4exnoD0nnhDj69IftOWdFB7cia7YInpIUqHkWm66S0Xb bXhLKSqDn+AXl7RYLsdO/m3tEJSF8v05m2D4rB/y+VxDbOeQwimkA0Ds0brDDx9chPU2 2nNRbZxGhvaUuV76eSdnfCQalPWULfOO0PbvRBIrR1dgyePw3aaZOvQRlfeHjRRruWzN qobQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pF2GH//YZWNS7AyLNShaZYct3st64NCEhyoQlVFdTi8=; b=KON/VSGCI7NDtX6jkPyFAqY1Oq/Tk0hk738bDXRWxcQ7q7A33I1sErvDbDdtAQbUez xBX+5Fixagfydn47kJ6ZkhYutwowqIf1Q7NbUm5dK1wzmBLlmt+e1JlnSMdfZXPTEiJ2 PATUdOYGDPIksmYZAxIdY3p275N73hHKxmvxxPRjVDa5Jx1/AFF2vUIIUdSgxX/2VN0N Q0lUeduy5+Y7WVFzqzRc8XxkztueVfeyYo8No6Sf9grVGE2K1t2pB33dgwlXS1vmHrQR KTMF8G46oBLCJs5av/7l4f1aIyl7vkZdF14tCXuf7KJ94rz49Qbo9105XftfEcD45gF4 vKag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m97Lj18U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 16-20020a056a00073000b005193d5d2054si23592241pfm.188.2022.06.08.01.53.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 01:53:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m97Lj18U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 596923C0790; Wed, 8 Jun 2022 01:15:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233007AbiFHFNm (ORCPT + 99 others); Wed, 8 Jun 2022 01:13:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232709AbiFHFNU (ORCPT ); Wed, 8 Jun 2022 01:13:20 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A2B83BE108 for ; Tue, 7 Jun 2022 19:19:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 12C1DB823D2 for ; Wed, 8 Jun 2022 02:17:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3602C34114; Wed, 8 Jun 2022 02:17:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654654656; bh=JbX9uyByw0LnSxHvXxEqaqP/lr8AVeM95L2qB/4wUp8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=m97Lj18UPzw6bhgJ2Rskd450+GImKwwmJBkIC+Zqc7evsb4wVe/WL6Xnln7XHmsqd jCzV5/+bCtCSqjzFFI/AAla4sT4xjxF0G6+KQJmr+jovIX/IqTOUASVkVFXeu3pQyK IxMz7nxy+Y5yrIcdbCqvap2uKpiHdVg4Te/dE8JEUArADTkahQoPNMSmujiO/mbHC2 LH8UsBnywNOm1bq5suQEZb73pN4hw1EMW+p9kO9WEm/0/tUODRNQn3DjR/kRBFgYZd vgwWm9KvqYJy7XVmFeCnhzLAFItjmEzcsW/NR0dkvYYpEfT3uqdXY7pX7nsWNeq4P0 rt3N6tcZgpVxg== Date: Wed, 8 Jun 2022 02:17:33 +0000 From: Tzung-Bi Shih To: Guenter Roeck Cc: bleung@chromium.org, groeck@chromium.org, chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 15/15] platform/chrome: cros_ec_proto: return 0 on getting wake mask success Message-ID: References: <20220607145639.2362750-1-tzungbi@kernel.org> <20220607145639.2362750-16-tzungbi@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 07, 2022 at 12:12:25PM -0700, Guenter Roeck wrote: > On Tue, Jun 7, 2022 at 7:57 AM Tzung-Bi Shih wrote: > > > > cros_ec_get_host_event_wake_mask() used to return value from > > send_command() which is number of bytes for input payload on success > > (i.e. sizeof(struct ec_response_host_event_mask)). > > > > However, the callers don't need to know how many bytes are available. > > > > - Fix cros_ec_get_host_event_wake_mask() to return 0 on success; > > negative integers on error. > > > > - Add a Kunit test for guarding if send_command() returns 0 in > > get_host_event_wake_mask(). > > > Please split into two patches. Ack.