From patchwork Thu May 12 08:36:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 12847326 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E1CA17FB 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> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Guenter Roeck --- 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;