Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1508368imn; Sun, 31 Jul 2022 09:43:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR4hWNxwFlWnXH/zHYaugywB42q1tgITpkLwjc4Ago4isza9F2RtCyD/emYJCesORi98fP5U X-Received: by 2002:a17:903:110c:b0:16c:cfae:e492 with SMTP id n12-20020a170903110c00b0016ccfaee492mr12998442plh.162.1659285781652; Sun, 31 Jul 2022 09:43:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659285781; cv=none; d=google.com; s=arc-20160816; b=d1QUZrh9ynfE/xUnVnk4UxuPGuTWxaten0BvjR2bgnvsCH84kWQkai+ueJVuau3VBh 4om1R5kUuygPU/YD0pwvXdEI5UsJ4yeuNa93KJkxScM68Ote8W3uoYv4661PKlFRg2mA 9WfOwUIiP5XyDJTnJ5qmVRAfEFgMMGRt55oZXBqHYPVeI4CSCSPWF7ZiP6TpGNf8eqiW mjz0MwGqDUWkjWZejMpn+1iFxmFiyqLDN05c8SCbfR6x27hhDhLqmkMz2PSZgqPkpg8D zvAsb6lTtAM1abdtv6JZOYnkqWiFCr7JwTpEX8DovSNmhr2PH8k69AdgFBB52TG2vna7 A3NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=wS3VQjhG19X2namk5oWD3+kVlFsAPosyQmzEqi+0NjM=; b=fyQ/CaGRzTLCNw2toa51l7ltm9ErANQXc3aYZUuRnZSQNvjrbSOJhCroH7cfRGqxhM TmYTwUOXe/TnQwSGgP9+HBOYAZdGyMYjVr7oh5wxCbtBZHUjV+tJUR9m3IX0vqflDCZc cUtXkm/Ue4CCRMkdlaLMWrjsWm9+NNTnGGvBCBoGFiT9vpKYQc9rh/h/dMGBCm5g1Bz+ NTh5tMsWSP4Gu3Buqmwu3Pp+OOGovqtGF7CiNDjoDPr2Ejzti0YmmoFYPvJCAdVeaRUx h6TwozZkjJmKs4wNej7e2NjpEYYeatkixFjmxmQuHOcdOUEFK+skHbLxS+SHQGhVxWPt DaCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Gf80Anxn; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lb7-20020a17090b4a4700b001f009957280si15715222pjb.114.2022.07.31.09.42.47; Sun, 31 Jul 2022 09:43:01 -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=@kernel.org header.s=k20201202 header.b=Gf80Anxn; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237479AbiGaQC7 (ORCPT + 99 others); Sun, 31 Jul 2022 12:02:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231424AbiGaQC6 (ORCPT ); Sun, 31 Jul 2022 12:02:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DF44F5BC; Sun, 31 Jul 2022 09:02:57 -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 5DEEDB80D86; Sun, 31 Jul 2022 16:02:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE0BEC433D6; Sun, 31 Jul 2022 16:02:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659283375; bh=JnzgGcVBp807cZAqx6W/5ioAlDkM6Mambx7xHyw/NGw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Gf80AnxnSXZmm4AIyKASiuPlDUxT/SDON7V0hl3ALuFUujbzgo2YFxTbuYxL+39Bd 8jGaY18welZMgukxZExsknB+zoFnuiujyTmRQXI5bH2OxkQ53U9S+TusP8Tpvia98z 9GDt4KdopGWTxHh7YcdNqKzM1dr6LR6Plqr5owuqROgfVzcVlwJIun3xqVsmSWzTlc wmGWlQBQvFQT3XrVCEBZAOqRQ4LBBpIx1qvOLDX1XyosrODH0xsAOqkpeRwwvgUG64 VIGVEL8DDnLG+M9JDi+o51wijEb4E3+CIxM2qTER1qz/qa3xGvrL8kYuEkz3iVM/3j l3eaIo3ZLOtmA== Message-ID: <7b3f7ec1-a479-f3ed-42b3-ddead0f9b427@kernel.org> Date: Sun, 31 Jul 2022 18:02:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH V9 03/16] rv/include: Add helper functions for deterministic automata Content-Language: en-US To: Tao Zhou 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 References: <563234f2bfa84b540f60cf9e39c2d9f0eea95a55.1659052063.git.bristot@kernel.org> From: Daniel Bristot de Oliveira In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,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 7/31/22 17:13, Tao Zhou wrote: > 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. no. -- Daniel