From mboxrd@z Thu Jan 1 00:00:00 1970 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 D2F47C3F6B0 for ; Sun, 31 Jul 2022 15:13:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233290AbiGaPN6 (ORCPT ); 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 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@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.