Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2417433rdb; Fri, 8 Dec 2023 07:35:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IHVSOU51hYvs7L+9VRm7GWCx/D067BV1Zsmr0GZTm8ZfAqoHS+XPoOdw8O/ZKzxrGAJ5UQ+ X-Received: by 2002:a05:6e02:b26:b0:35d:59a2:1277 with SMTP id e6-20020a056e020b2600b0035d59a21277mr393161ilu.35.1702049727985; Fri, 08 Dec 2023 07:35:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702049727; cv=none; d=google.com; s=arc-20160816; b=bZR9HgwgmXmsHt2GY8WzscdxAju1LcsLz+KdjH7g6Ge1Xj9OPI9ea6U2UitwMez4Ia kPhAv3Kg+O8nDDV4qzqDvavOLasJ34h6KCqAOAyFZBduywWlYmyrWDRWssPLqmTukEIw GggQ1/oXZWUtA4DfNrWw7URIgfrLHxqCBEwWW1qR2LDdabLlmqFKPu/0mqQI918M60Oh iHORuc6X8IOTJHSGlo6ViAF6iOwGTSoB21wcrpbnoEGQ0fBb/S6QVsVi4GaiEzlPFlsU mKJSdWhy54mV4bfxBMRjh84PtpffSOZgc7jhdlPTvFVLKU44PVP4qQMC5rC00Xbo3ZuT bbIg== 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:date:dkim-signature; bh=WMnlzmKg9DyRCjTIo9NWw3OAfaXxDlGMMCmq8eYBwns=; fh=jQGzHUntbivgb1GCxZlR7ldWyMO0rVd8dgIotRjLXPY=; b=jHDeulNL3UaVQWF+HYUQZC+TJkSjohbrOzV3CzZ6oh1EtFC/FoPnQ4tyBAMur8Hl7W iJc+BNBHJhru9mFqhln1Wy7Qbtd9JbBzQXZhDNxo1Rg+3waJSL1+UTxSDB91SQ/X8j8z 2HDi/RXhpwLU4mnXjF+fVZ6T3lSwr9u0AK5ggLBW7KgufjHy55YAV1mm2mMQsI7Af553 SYpm1OFWbxjtz1oCnycWPBrkKBIwDOMBm2LpsVN+kTbsRpl3u308tzu3ryQkWtMutNrc c1ntPdFhOE9Io7WaJ4SnoNSlprlUnLr/hf8Yhbaqv+t/afrXvJBjCrS6uCGsuWDoteBV IJwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=4etOjFNb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id e1-20020a656881000000b005c278464e08si1654974pgt.275.2023.12.08.07.35.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 07:35:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=4etOjFNb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 9A27F85BF2DF; Fri, 8 Dec 2023 07:35:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1574359AbjLHPfK (ORCPT + 99 others); Fri, 8 Dec 2023 10:35:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1574357AbjLHPfI (ORCPT ); Fri, 8 Dec 2023 10:35:08 -0500 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5639C10F1 for ; Fri, 8 Dec 2023 07:35:14 -0800 (PST) Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6ce831cbba6so1414221b3a.2 for ; Fri, 08 Dec 2023 07:35:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1702049714; x=1702654514; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=WMnlzmKg9DyRCjTIo9NWw3OAfaXxDlGMMCmq8eYBwns=; b=4etOjFNbpPoHS28boUs7sYRfWkdQ2tCUS9pvXwumN8uZlSsec3Um/o/V9VEM3fUad+ g8T1idhFVN/aeHE4Os97MT2/pQb9kJCL19UweaZRH2fPU2mfhtOKuAlsogwOSYCxA41W dtpK/aedkwBbBCDUrOcJ0TS5/6PyjSDdSnTjv2Mv/q1WHKDtnsqcGa1ld3kVguDxzdPV kUU5K6BWS0M1M+n1HPRuvR5+iFhSO366VDvIOvOEO8pLP8KUaE0uDpOF2JGHy3sZLQ/l 1lvVpYOX/wFJv7qa9t5wvAXsGjR+/vZekeb0AuKtGaFkijbv9hQBV5WUzhn9ig6S8N4m zWQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702049714; x=1702654514; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=WMnlzmKg9DyRCjTIo9NWw3OAfaXxDlGMMCmq8eYBwns=; b=GwzWd85iUAJWeqdVrFEY8hhK/EzlKBgZK0aRqjmjx5U1s61F2721wTPKH5iU5NTcEk vJHuTLXzdL/R39D+SWVdwnIlO9ZlyXXKeOvuv4+VVp+sJPjAHEpT1kasLZkdm/yOq1F2 CfBoVVlsD/oWLkHwlwbyr7PlIpJAAzI21PAZRNYGCw0tVwVd6bYOka5rDpWqXMr/Pr1N L3Mg0DJ7vK3w5C8brjK8BVwTt3lVQu/qzTqfw6aZCgUfiexnY50FVFVBP+UIkF769Bo4 YN19dKwmZimnH0xPVAxRUwzekDkHQBIIYRaSNTjlLHPxOlxCRCimU+wCn0Nz4d18vMDD KRIA== X-Gm-Message-State: AOJu0Yy1iSBBqL2NEO+FJSBESAzjoEIK76LGM46Awwbh+wtN0Etf7It2 KKvnm5d0OHKfCV0YnjRzDlwEQQ== X-Received: by 2002:a05:6a20:f388:b0:18b:251d:d6fb with SMTP id qr8-20020a056a20f38800b0018b251dd6fbmr206420pzb.1.1702049713574; Fri, 08 Dec 2023 07:35:13 -0800 (PST) Received: from google.com (170.102.105.34.bc.googleusercontent.com. [34.105.102.170]) by smtp.gmail.com with ESMTPSA id r3-20020a655083000000b005aa800c149bsm1496119pgp.39.2023.12.08.07.35.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 07:35:12 -0800 (PST) Date: Fri, 8 Dec 2023 15:35:09 +0000 From: Carlos Llamas To: Alice Ryhl Cc: Greg Kroah-Hartman , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Christian Brauner , Suren Baghdasaryan , Li Li , linux-kernel@vger.kernel.org, kernel-team@android.com, rust-for-linux@vger.kernel.org Subject: Re: [PATCH] binder: use enum for binder ioctls Message-ID: References: <20231208152801.3425772-1-aliceryhl@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231208152801.3425772-1-aliceryhl@google.com> X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 08 Dec 2023 07:35:24 -0800 (PST) On Fri, Dec 08, 2023 at 03:28:01PM +0000, Alice Ryhl wrote: > All of the other constants in this file are defined using enums, so make > the constants more consistent by defining the ioctls in an enum as well. > > This is necessary for Rust Binder since the _IO macros are too > complicated for bindgen to see that they expand to integer constants. > Replacing the #defines with an enum forces bindgen to evaluate them > properly, which allows us to access them from Rust. > > I originally intended to include this change in the first patch of the > Rust Binder patchset [1], but at plumbers Carlos Llamas told me that > this change has been discussed previously [2] and suggested that I send > it upstream separately. > > Link: https://lore.kernel.org/rust-for-linux/20231101-rust-binder-v1-1-08ba9197f637@google.com/ [1] > Link: https://lore.kernel.org/all/YoIK2l6xbQMPGZHy@kroah.com/ [2] > Signed-off-by: Alice Ryhl > --- Acked-by: Carlos Llamas Thanks, -- Carlos Llamas