Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3360921iob; Mon, 16 May 2022 20:39:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPxzeNtdIm5v6Ky97edD5UYkW+KDuR/7UWUIHcX4pF3mdBR6DupAkyzkSZ0c8L8IBZfSlJ X-Received: by 2002:a17:907:9706:b0:6f4:ab1a:9198 with SMTP id jg6-20020a170907970600b006f4ab1a9198mr17883146ejc.494.1652758778479; Mon, 16 May 2022 20:39:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652758778; cv=none; d=google.com; s=arc-20160816; b=yriPu9dF7Vyroyyuro1lVRfJnaknOHIvy5pd53lvTqlDPkVIoNsMCLQ9yqhwXWuUap BrxPDxsBLIM20fjcE2ZkS2UZtGctY+osH7LYMy5ZFtoD+yJgrM5Nkw0xE9oaFeXIrbQJ m3ms7t1aaZ1o1g77ro0Kg8jW2XT95L60Hr/vzUDf5NfHku26t8FfeOf3ujaOfQDDZaSe Nmn1zms44mRK2k0h+JhqFPHEa4ZyxxfS/HwUOho/KJ8LMI6CWxzmiqArIy/RBW62AM2V WJDK76PQ+IgnAV5c0hu0Tf9WAzKVc2w/bkBXpvh3kmTds9FU1nj41AWYqLb04/IEVhix PEQA== 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=QRJ9WHCCMc6zAj/db0IFUxE2Yu1MUYYAfC67+1L/5NE=; b=Gpyh+ulD6h6eVuHQjnxu8l52+8GARyvL8LeXgGwCOYMa6s408KSMoTsxVL46l0LymV PY+ce1lSmWrHQGIko0EzJM/MZuqIOsJHqEkMssVMpzIRezYHJKBAzvyPP6fwx42FwnbY GXpNphH8MtfCJRpM+y58l5yUWZwYeufZocgmyNiewmNJ81UPDTbyIARUq5hHMd59HH60 A2QUaSftjbIz0+3Acoy0B/f5vfVLemIqBLXwfStpwdEJTztIRBmzY9XOy3WSbuB2DSJV +sjV/vlfe7tcW2WDnoFYfpq8xhE+CmtY+FbfgHAxnTzqqVmmFTPtPM5V/m0Fekp3XYCC r9OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="2wNhp/Rj"; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gx7-20020a170906f1c700b006f85eb81da0si1359879ejb.265.2022.05.16.20.39.13; Mon, 16 May 2022 20:39:38 -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=@linuxfoundation.org header.s=korg header.b="2wNhp/Rj"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344210AbiEPQ62 (ORCPT + 99 others); Mon, 16 May 2022 12:58:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344132AbiEPQ6Q (ORCPT ); Mon, 16 May 2022 12:58:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90D502A73E; Mon, 16 May 2022 09:56:54 -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 4BAD1B81544; Mon, 16 May 2022 16:56:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A043EC34113; Mon, 16 May 2022 16:56:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652720212; bh=OX8Lhwf0tAzODnumDj4GdfrqfSfR+PGuBYa4nSOfujk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=2wNhp/RjUnWOHv62mY/PaMLBzWj2C91Iws2xBmyR/QnC/4Dnqo4IiH7pY5ICvXx27 jzYDW6HcN+aQvXp04to7Pau4DELeHeH/IC60a6ObWA6X/0oF6YNz1HBlubMoHV34Qr o/Uwi0bTqbWlBxAbCU2XFieWFJRLcPM1uMFB8jBw= Date: Mon, 16 May 2022 18:56:49 +0200 From: Greg Kroah-Hartman To: Miguel Ojeda Cc: rust-for-linux@vger.kernel.org, Arnd Bergmann , Masahiro Yamada , Li Li , linux-kernel@vger.kernel.org, Wedson Almeida Filho Subject: Re: [PATCH v1] binder: convert `BINDER_*` ioctl `#define`s into an `enum` Message-ID: References: <20220516100401.7639-1-ojeda@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220516100401.7639-1-ojeda@kernel.org> X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Mon, May 16, 2022 at 12:04:01PM +0200, Miguel Ojeda wrote: > bindgen (a tool which generates the "raw" C bindings for Rust) only > works (so far) with "simple" C `#define`s. In order to avoid having > to manually maintain these constants in the (potential) Rust side, > this patch converts them into an `enum`. > > There may be support in the future for expanding macros that end up in > a "numeric" one: https://github.com/rust-lang/rust-bindgen/issues/753. > > Co-developed-by: Wedson Almeida Filho > Signed-off-by: Wedson Almeida Filho > Signed-off-by: Miguel Ojeda > --- > Two notes: > - Let me know if you prefer that I base this on top of a binder branch. Yes, this does not apply to my char-misc.git tree in the char-misc-next branch on git.kernel.org as I think we have added some new binder ioctls recently. Or you can make it against linux-next with the rust stuff removed, that also would work as well. But as-is, this patch does not work. thanks, greg k-h