Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3298029rwa; Tue, 23 Aug 2022 02:14:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR5QOH82wt0RJ6qPSrld4re2DJfbQtlsojmPD4NatK2zAyDXj+gkkbzFsAyXMt+i3oahzMRf X-Received: by 2002:a17:907:86aa:b0:73d:670d:3f8f with SMTP id qa42-20020a17090786aa00b0073d670d3f8fmr9643518ejc.723.1661246040555; Tue, 23 Aug 2022 02:14:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661246040; cv=none; d=google.com; s=arc-20160816; b=qlYP8ylAgkudC9Wi0/FafCp29oq3d5S7kapdhsw92KEiNJTEbkBryHEprPfnHOG8G5 ymlw4m8p3ItoiAjK7iCTiovXBbMdxxHzqs/G5OLnujBuCc4uMUaxw7ubg20weQC9ls5p mDXZs2jLyyDNyAzS6KzBTGCCSrvJxfr53MiZWrOs5dT1q3hNylgO2T0R2FpjTMYp9zri LTDQBjSHLxdsIuHC0JgLC5jjCN6LXRP8gws6T0+hG0AVkDg+YXn+QfmQPS0YbBdkCjYa /iGGBSUarMFVr4ZFHuu2gJDHFvqSx5EHAAQBdC0iDS7MmMn1G/X4BLWQmveihI0yIijr xQlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cVV/kcbRmeKcNoSGw7n4PxdzLutRd/GQYNRgFdcuDv8=; b=dE2rmjr9lB1ulowXMmJDXfX126OHv0CIdMJMb4tCS1YViM8V65qzyzxpZ+ZPWNs5Bo r4TFmX6YL7EBXhNTOcKK7e3sTW6wmezbBUkM5TpJY6zESLZfKTwSafzxa+J+qlEtNkQH v5LVoaHu5zvFfKX/JSL7WRV4malV29OiVtAEi4IDs6xn+4FrcrjNimQKOIJzWh92avk5 0r8qzOX9DNCcyw+2JRbvjiG+hpB9wMAVdXHSqIZ48wn9Y5N+jbz4w0BDKiO5Nb0LcLzU OML12KXeSaV2N/faxT60RXg1g4I1K0TyWh/7z3M+7OLmuK6YrMwkYrrVZoS8QN8qypWj g6eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EFHMcusg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h17-20020a17090634d100b0073d68e62401si6215727ejb.176.2022.08.23.02.13.24; Tue, 23 Aug 2022 02:14:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EFHMcusg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348450AbiHWJKF (ORCPT + 99 others); Tue, 23 Aug 2022 05:10:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241064AbiHWJIj (ORCPT ); Tue, 23 Aug 2022 05:08:39 -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 2D1BC8607C; Tue, 23 Aug 2022 01:30:33 -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 A9712B81C29; Tue, 23 Aug 2022 08:29:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7398C433C1; Tue, 23 Aug 2022 08:29:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243385; bh=yE9fWldw1A/yimWhEY3mbNJSVwSaV5h/oFBu3KOkY9c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EFHMcusghHRYpQ8PlW/kZqe4iYYUxqhwf8yjFihzvVEYBMTf8OA5SxIpJCJPbiLB2 ElVMsD4Om7rRuhxOT9avKuvQdF3sNK6GRgER4ssPBZWbIiS7P+LKw/h4JINuSFg9Eb tBrw9nskUoPs+KIW6J4tN7xSaIKaznSLe7xofUYU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guenter Roeck , Tzung-Bi Shih , Sasha Levin Subject: [PATCH 5.19 260/365] platform/chrome: cros_ec_proto: dont show MKBP version if unsupported Date: Tue, 23 Aug 2022 10:02:41 +0200 Message-Id: <20220823080129.076152818@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080118.128342613@linuxfoundation.org> References: <20220823080118.128342613@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: Tzung-Bi Shih [ Upstream commit b36f0643ff14a2fb281b105418e4e73c9d7c11d0 ] It wrongly showed the following message when it doesn't support MKBP: "MKBP support version 4294967295". Fix it. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-14-tzungbi@kernel.org Signed-off-by: Sasha Levin --- drivers/platform/chrome/cros_ec_proto.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c index ff767dccdf0f..40dc048d18ad 100644 --- a/drivers/platform/chrome/cros_ec_proto.c +++ b/drivers/platform/chrome/cros_ec_proto.c @@ -509,13 +509,13 @@ int cros_ec_query_all(struct cros_ec_device *ec_dev) ret = cros_ec_get_host_command_version_mask(ec_dev, EC_CMD_GET_NEXT_EVENT, &ver_mask); - if (ret < 0 || ver_mask == 0) + if (ret < 0 || ver_mask == 0) { ec_dev->mkbp_event_supported = 0; - else + } else { ec_dev->mkbp_event_supported = fls(ver_mask); - dev_dbg(ec_dev->dev, "MKBP support version %u\n", - ec_dev->mkbp_event_supported - 1); + dev_dbg(ec_dev->dev, "MKBP support version %u\n", ec_dev->mkbp_event_supported - 1); + } /* Probe if host sleep v1 is supported for S0ix failure detection. */ ret = cros_ec_get_host_command_version_mask(ec_dev, -- 2.35.1