Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp994269imw; Wed, 13 Jul 2022 11:47:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t2zPqiYoxIBCdOHSDqe0iCelUdY+VwgU7DhfOYEe4ocY5n//h6kFpcsFWt4XSO/aFKdLVv X-Received: by 2002:a05:6402:354b:b0:43a:b180:7a22 with SMTP id f11-20020a056402354b00b0043ab1807a22mr6838717edd.225.1657738031230; Wed, 13 Jul 2022 11:47:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657738031; cv=none; d=google.com; s=arc-20160816; b=dA10lvJU6c23TIy/M+Ab/WeKb+4WWHkOaAy5l+4rezy0qbr3F67z6BUnp5Cx2Ks4BL ONxpOXRSNGfj2sU9BlOyOvWWfAtV/licQ1gzoqZ5K/KLIVvDwYiS8GwS+okKlQkVdIJY px61499yd7k1pMavU2r9+VbJyfNzmBx5qIlixzGPJaflnIGc6/PZyYJus/akc5d+GwPu uEHabEU1O8yi/bZusCLaIoE7rrFcD9bH4PXflDggIqs5jja7EWMURmnoIF6cXvYzSFCe 3n+KXbZ67CH+dVMdhiPevOand3KFt3RxpyAQQN7J4D2Yn0Ywui7ygUvZoBH7SbOkLYI5 rH2A== 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=qbVnuy8RXZ1aL1Z20fz1dAS5zBDZoN0R101nBeUZeZE=; b=AlbewxYQW2vmJOzjfUn0nv6vB5hL3SazCT/8wzBuiCQ4SYs3jqWqAAET1lMNo/pdl8 LpBr9Q25y/Kof3TFvcZ9zXWN/0wh34lyqLVXHZsF+R3S6D0dHYihUljvfh5lzjiHl4JV rp4iQW7j4ixUwxCDF6IudAnPzxj1/SMxRW+wMXdpIpM46JF+Pp5D62HNrEai/SL2HuWu R70JyewvJ5Rddt6EmIQ4XDVw/gjOFy6ltuggEeVLuS3F/AjxJWtYp5rTiEPkG4q50P7o Q0obJnpcF/3R3YtBCdiCdfNcvRpvm4v+P+oX4e3HRkrcoupbjYeD0rblArtIl2mUjDZ+ jL4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=T0+BJJKU; 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 sa32-20020a1709076d2000b0072b4bdafff7si13170604ejc.740.2022.07.13.11.46.40; Wed, 13 Jul 2022 11:47:11 -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=T0+BJJKU; 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 S236792AbiGMSlT (ORCPT + 99 others); Wed, 13 Jul 2022 14:41:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235042AbiGMSlS (ORCPT ); Wed, 13 Jul 2022 14:41:18 -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 E6CB8252B8; Wed, 13 Jul 2022 11:41:17 -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 83BC561DA9; Wed, 13 Jul 2022 18:41:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73F0EC34114; Wed, 13 Jul 2022 18:41:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657737676; bh=5U9/KEb7MalgDSPmKpw2nAxd6A28C8lrKL2zdH6PIfk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=T0+BJJKUKolniQMIaObnkvGYO6pZ1JRMigZZebFNIOVs3wAtO4DI1iwtn0af3xFyM Ad3ukheFeZbAB0o/XfkOeUy5SpXR2We5UyZInrNRP1Fndn5GLjjai7y9SFqLwtTBMH gY2gknOf+aPK5+4NFXmBxhsVHU9wXfTRm4Krv9COC/ER42yCxPXd7XwGcde9cXiH9W 04Tlz1BS2caCZ5cM+LTv8abc1eveVbcintzvtJux0/ybXeyMEULda9btSyCDR2qtjk mUMU3YeNhwc5IgE1/8MiINXslMxWNY1ysakGuohgyGC9e3ib2cX8c1vu1RQQdV1MMl vUw+Inizf5rcw== Message-ID: Date: Wed, 13 Jul 2022 20:41:10 +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 V4 06/20] tools/rv: Add dot2c Content-Language: en-US To: Steven Rostedt Cc: 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 , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-devel@vger.kernel.org References: <5b1e664b0c33f4da0430922718adc71a5d58d86c.1655368610.git.bristot@kernel.org> <20220628141659.309ec0fb@gandalf.local.home> From: Daniel Bristot de Oliveira In-Reply-To: <20220628141659.309ec0fb@gandalf.local.home> 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,T_SCC_BODY_TEXT_LINE 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 6/28/22 20:16, Steven Rostedt wrote: > On Thu, 16 Jun 2022 10:44:48 +0200 > Daniel Bristot de Oliveira wrote: > >> + def get_minimun_type(self): >> + min_type="char" >> + >> + if self.states.__len__() > 255: >> + min_type="short" >> + >> + if self.states.__len__() > 65535: >> + min_type="int" > Should these be "unsigned"? As char goes from -128 <-> 127 > and short goes from -32768 <-> 32767 > > And are you sure you're not going to have more than 2,147,483,647 states ;-) > (or 4,294,967,296 if it's unsigned). Fixed! now I am using the "state_max" as the invalid state, so I can use unsigned. I also revisited all python code for consistency. -- Daniel