From nobody Thu Dec 18 12:59:21 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54B78C32772 for ; Tue, 23 Aug 2022 09:10:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241701AbiHWJKJ (ORCPT ); Tue, 23 Aug 2022 05:10:09 -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-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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/chr= ome/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 =3D cros_ec_get_host_command_version_mask(ec_dev, EC_CMD_GET_NEXT_EVENT, &ver_mask); - if (ret < 0 || ver_mask =3D=3D 0) + if (ret < 0 || ver_mask =3D=3D 0) { ec_dev->mkbp_event_supported =3D 0; - else + } else { ec_dev->mkbp_event_supported =3D fls(ver_mask); =20 - 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_sup= ported - 1); + } =20 /* Probe if host sleep v1 is supported for S0ix failure detection. */ ret =3D cros_ec_get_host_command_version_mask(ec_dev, --=20 2.35.1