Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp993261iob; Fri, 13 May 2022 18:55:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyY+wS05o1k0Wdb2ZS94rxdv5qd4UUEElveZdGX3sS2f4QxiRjMkRAYfwklrxvEkQ5X6Y1K X-Received: by 2002:a1c:19c3:0:b0:392:9cef:e32b with SMTP id 186-20020a1c19c3000000b003929cefe32bmr6839222wmz.116.1652493325922; Fri, 13 May 2022 18:55:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652493325; cv=none; d=google.com; s=arc-20160816; b=PhzDix1kUZ3YHpQ7kdJ2N7G42L8QWScRX+uvaqJ+RX7PGrLsqTcDDuedzMdijTO+O2 zTln6WctrBMJgFj1vFuvxo8ZNLAIl14l+u5rppQs2FNIx+bhIgGrKMwUDU378n++AppF xYA+u+tqOF9MpHXDPbj4UClZijq2oKL3R8R2ZFUkam6gvZGpGwpuGD4k50cFB4xNVTUx LVZ9xzlN3XozaMc0Yae9hXhLu6wN6wXn24MJjylW3ZE/n9lS8bUurgesnTDWsF/s5daO kgqWZZFJ01Wwy8jI3hC24HBa607IX4tNCjkTODhXI6C0GF3T03J0O5mxoSKppJQgskm6 Qn2Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gpcOQO6w43JIcbwXiWWYq0jj7ZAqXjpzh4vLp+g+VMA=; b=y8o4TfI2e3pFlg8i8MvNiNUGPv9nNhp1+VP3ljw9RIFZQ1P6XtxwqegOKMzHtv29OR 5C4xztfvu88rHFPgdJr7KX7hPG06QjdLZ313U05NkaW0JJL+R/QOE+b/N9jc3ToigXkZ vmEevFXoudSqQT91QkXcwW/v/hwbw4Qhj6qYjALRX6ROR7C2jnZgQPY9egOWdtSj5ITM w6rQXEBahTxGfFx59ENQtt+DbrxG5Eul+bbqvXZ4XtsjPeVlNCHHMPLdupLckeE+sjUd xJNiNFuV0LzQTZ9CF+Mp+U3I6F03wulxGCgKMnYt5VOEIc9f9XYid8hL524FdPGK0irs Irmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MyaYaNbV; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id k13-20020a5d6d4d000000b0020abc7564c6si3033279wri.109.2022.05.13.18.55.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 18:55:25 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MyaYaNbV; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 991F01181F; Fri, 13 May 2022 17:18:14 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351530AbiELIg6 (ORCPT + 99 others); Thu, 12 May 2022 04:36:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351514AbiELIgz (ORCPT ); Thu, 12 May 2022 04:36:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8E75B54 for ; Thu, 12 May 2022 01:36:52 -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 dfw.source.kernel.org (Postfix) with ESMTPS id CBF0860DF0 for ; Thu, 12 May 2022 08:36:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03922C34100; Thu, 12 May 2022 08:36:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652344611; bh=o5vc0t4cN3VhTt01w0WPWP/zm+4fUUK1vnIfe10Nm9M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MyaYaNbVLuBiuAlPwmvtAk9+7JA1Fwa8JX6DlmMvWp0HK3gwTH8AMLFraAh0OU57W yB3beK8dgeoj7LYXo1HOOx1qAXkKHhfNT3TYci3Wn0RdmqtTA9XM4J7x63kFD9iuLa uwRuCp6s76ykoaI2yLbMvJLaODfWluCY4/XD1mtv7XlWcC5I4ZnmiTYpv6rkKPD6bY z+sulTGmc3UM/kVYpp4erPcP8BWWxy/ytfIzWsOv11X0YM6YPJOpVmNzTM4nxjXF5D YtP5dQV+E26vuIsj4Z0RfYjDO6LA0sBeqW82AxYnIVReIwzZVF1vm9RdcQ044TCwQ8 7+7Soi0MAObqg== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org Cc: chrome-platform@lists.linux.dev, tzungbi@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/6] platform/chrome: cros_ec_proto: drop unneeded BUG_ON() in prepare_packet() Date: Thu, 12 May 2022 16:36:22 +0800 Message-Id: <20220512083627.885338-2-tzungbi@kernel.org> X-Mailer: git-send-email 2.36.0.512.ge40c2bad7a-goog In-Reply-To: <20220512083627.885338-1-tzungbi@kernel.org> References: <20220512083627.885338-1-tzungbi@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.9 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 prepare_packet() gets called if `ec_dev->proto_version` > 2. For now, it must be equivalent to EC_HOST_REQUEST_VERSION. Drop the BUG_ON(). Signed-off-by: Tzung-Bi Shih --- drivers/platform/chrome/cros_ec_proto.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c index ac1419881ff3..db1c8ba43171 100644 --- a/drivers/platform/chrome/cros_ec_proto.c +++ b/drivers/platform/chrome/cros_ec_proto.c @@ -60,7 +60,6 @@ static int prepare_packet(struct cros_ec_device *ec_dev, int i; u8 csum = 0; - BUG_ON(ec_dev->proto_version != EC_HOST_REQUEST_VERSION); BUG_ON(msg->outsize + sizeof(*request) > ec_dev->dout_size); out = ec_dev->dout; -- 2.36.0.512.ge40c2bad7a-goog