Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3412406rwa; Tue, 23 Aug 2022 04:28:38 -0700 (PDT) X-Google-Smtp-Source: AA6agR79kWCM8zfRx5/+MZSZnBnjpjgbylK7x2iLMS9pqR/IXNuSgME0A9Jos1bTAiflKV1c8bQ6 X-Received: by 2002:a17:90b:3d91:b0:1fb:49ed:a5c3 with SMTP id pq17-20020a17090b3d9100b001fb49eda5c3mr2833961pjb.187.1661254117782; Tue, 23 Aug 2022 04:28:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661254117; cv=none; d=google.com; s=arc-20160816; b=aUsWGkyvLEkfqbrI4S4HeH1aBan/n38RKx0QSHKnZKMaAVqktJD7W3pXqKRsmfpSQl 3DXVaxL6N68aSzQPg+yZsZNBqe28ENWQWATn1y5nw8IIrl2YUobDDlY1ZYEPJKCDXMyL 7H7yGA0BcvAVaAqcYX52xKMmbl3j+mzVkasQc8I+U5wycEC4193RgLfLuXVjRYv2cRHW QX49uCl5tNHaCbeUy5ta4ZQcopLZFgEpWx4ou1kU25ug/PDQMSr9bGxbtFdEV1pv8ZVX AmWtqoHqFT6hnzbA1oXvjAqJPOk0NFq47s+cJrf22Q7b/G/vyN83CiSIOI/CgKh3ahyu 3Etg== 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=f6IUgAiLVTCpSulIYR4qpVTKXJymuqbZpOWXvzvjqqE=; b=mIb6A0x+wb0VRfHMZG5fPo5rTkjMnP3S2LJhFRTYLLqTJ9qe8qdYeNMAbyl0hJ37Vc TRLHPr7jt1Se0BemYUal2oEGmvlOhEzf4JrlUDyl5L/OAP3/9hz8F/f/K+ka9mibSvNp FGOXBFVUSJOCcF7W3DbqPvBRF+WLiJKyjHZm7ggD/10ZZ7TdHeemqGpWUlXUvPmlqbKI bp1P3cAiOMm8TU7QFUaHCvnQoiNcUAnawAlbIbJnjx4KtEOYqcq2qykn+3bPWNn3DiLl gnaNGJ158b5cV4cJAgi7xx2qz5Zri1M0m0ghiWgjDW/QZLwejhvRT7mu55mlVBKDmmV5 euFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="NDEONu/N"; 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 v3-20020a654603000000b0041c366a4341si16241247pgq.522.2022.08.23.04.28.26; Tue, 23 Aug 2022 04:28:37 -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="NDEONu/N"; 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 S1353767AbiHWKSs (ORCPT + 99 others); Tue, 23 Aug 2022 06:18:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352571AbiHWKIG (ORCPT ); Tue, 23 Aug 2022 06:08:06 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAA625AC6D; Tue, 23 Aug 2022 01:54:28 -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 975B7B81C28; Tue, 23 Aug 2022 08:54:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC9EDC433C1; Tue, 23 Aug 2022 08:54:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661244866; bh=dS3oUX565XXqWz6LAky5wfcvCoNURNos/Hxa/WUf87o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NDEONu/NZp5fFAYTP4rRYIRqcMS39hAvwopWdg78v2yc64s7X13vNCjq1bwajL+pa Nn3nriLvFhOpOjb0m0bHxNVou1FvpcLybxk5HnYtGNDvTme+XqEIaCnu+ShiFBFWdX THlMHPolGpSwlc5wTMaRyNBYgxhOW0P0Gq4yPawU= 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.15 164/244] platform/chrome: cros_ec_proto: dont show MKBP version if unsupported Date: Tue, 23 Aug 2022 10:25:23 +0200 Message-Id: <20220823080104.692056989@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080059.091088642@linuxfoundation.org> References: <20220823080059.091088642@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 ed2b4807328d..1575d603d3ff 100644 --- a/drivers/platform/chrome/cros_ec_proto.c +++ b/drivers/platform/chrome/cros_ec_proto.c @@ -507,13 +507,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