Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1474547imn; Sun, 31 Jul 2022 08:22:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uMHl/bnFRmfowPKc70Y7M9n6iLDHT+qWiNTzskCDJi5/HxQ9I6NLCt/EZ0lE6r6EpUpl/Q X-Received: by 2002:a63:504c:0:b0:419:d02e:f42a with SMTP id q12-20020a63504c000000b00419d02ef42amr9827780pgl.566.1659280932526; Sun, 31 Jul 2022 08:22:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659280932; cv=none; d=google.com; s=arc-20160816; b=h4fIQJ9Jw2JQ9tdBZF54zrxPY3iXlmxV9uCfdFz6gT4pkDfhBKCZQbIJx2b8MhbnQj 4UP6yDxBlgpHq44jeoDGbPgWWrlfNefbdn35+cZWDNDGB2uV8zdPCrnn4QPfEgZS+cWi GhbpuhuYrAjDnhSXkSePbl7w2kRvKfIRjcwOccg0zhsyE3GB2ADpH1HkbN5tR6qdP34E MmI4zqeuZHQAeC+gux8OpjEJVLvM7QqsLjyGN/w207bx+0XNQPNiQjyuw7YSWAUpF100 YVNHyx8LOt7bagi9L1VSD06CpvMX5gtygY1Sty/E4RELJqtWvA5CVpL8W1pA8G8OUaO6 SneQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=b02v1XH3P+9F45CvhEPqjJHQwOFxhbxcG3OZ5wGjyGI=; b=FdmcQscB//XGCm/DsT2WQahB7DJ0khbe+tmWfDGYk7vu4DwiGXA6A60Hcx23JpefkO tsrS09MVoq0SLo8whphZbcEAY41YR5PiBFbFdRlSZJ8CxqiiOndkV2CQYxX6fIhJfqQw BLqq29lwD2/LmCd/Q9EboX65vvlVu/bdx7UJvmnq1xBHlzkLxfLk23xcIGwyEmpXjVuJ hkY4L+mmfRqw0QiQENJowwE8K0FzMyHM+hrGkPxNiKT/lUBNIsZONbLST6vilkU9j7E8 KsqTceAmkuqrGtwzkqhS2SGsNwJ4ZxJqV50XoRu6dSIvwmuq4aVRB2PdEncKhVNJrkYB bwHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=gnbqC20N; 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=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n12-20020a63590c000000b004128ea1a97dsi10128425pgb.399.2022.07.31.08.21.58; Sun, 31 Jul 2022 08:22:12 -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=@linux.dev header.s=key1 header.b=gnbqC20N; 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=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233769AbiGaPN6 (ORCPT + 99 others); Sun, 31 Jul 2022 11:13:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232548AbiGaPN5 (ORCPT ); Sun, 31 Jul 2022 11:13:57 -0400 Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E494DF8F; Sun, 31 Jul 2022 08:13:56 -0700 (PDT) Date: Sun, 31 Jul 2022 23:13:42 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1659280434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b02v1XH3P+9F45CvhEPqjJHQwOFxhbxcG3OZ5wGjyGI=; b=gnbqC20NhelrvDLBnOx8VzIYg980Z4dNb2xWEYnlPyP/aWx2kn/aopOZat4ieAiZljt+Oj Ge2H2PEx+nL6QG3u/AeHnjKJplCEBK4QeONwaVqOe7nr1exPVwjRMWnJeLNxwn9CgyvNJy tMdWG1MQ3+8IzZEJuezNaYjwY0itCaw= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Tao Zhou To: Daniel Bristot de Oliveira Cc: Steven Rostedt , Wim Van Sebroeck , Guenter Roeck , Jonathan Corbet , Ingo Molnar , Thomas Gleixner , Peter Zijlstra , Will Deacon , Catalin Marinas , Marco Elver , Dmitry Vyukov , "Paul E. McKenney" , Shuah Khan , Gabriele Paoloni , Juri Lelli , Clark Williams , Randy Dunlap , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-devel@vger.kernel.org, Tao Zhou Subject: Re: [PATCH V9 03/16] rv/include: Add helper functions for deterministic automata Message-ID: References: <563234f2bfa84b540f60cf9e39c2d9f0eea95a55.1659052063.git.bristot@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <563234f2bfa84b540f60cf9e39c2d9f0eea95a55.1659052063.git.bristot@kernel.org> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS 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 On Fri, Jul 29, 2022 at 11:38:42AM +0200, Daniel Bristot de Oliveira wrote: [...] > +static inline type model_get_next_state_##name(enum states_##name curr_state, \ > + enum events_##name event) \ > +{ \ > + if ((curr_state < 0) || (curr_state >= state_max_##name)) \ > + return INVALID_STATE; \ > + \ > + if ((event < 0) || (event >= event_max_##name)) \ > + return INVALID_STATE; \ Should define the INVALID_EVENT corresponding to event invalid case.