From patchwork Thu Mar 2 14:16:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 63428 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp4262446wrd; Thu, 2 Mar 2023 06:29:01 -0800 (PST) X-Google-Smtp-Source: AK7set/cHJ9TwCVLl/QKuLbVIpgmw4JFXh8lcjmKmw0GN94OQzYf+2AoVOC3/sFsyGNKWA6jqcYG X-Received: by 2002:a17:906:cec9:b0:8a9:e330:3a23 with SMTP id si9-20020a170906cec900b008a9e3303a23mr9462756ejb.26.1677767340884; Thu, 02 Mar 2023 06:29:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677767340; cv=none; d=google.com; s=arc-20160816; b=Yj8ouQjtzB2IvrIxx/Yuea4VEM20Z/ix3nXRKb/y/hEKRMYi7R9vsozoTdUcspPPgP gTOoIFzjy06yZ/TTx4ljYAy/twEIRok/xsADd48Ms+C2I+tNuu896zGgrPuj6J9TERIH hJDlHvorv/z4DBKqG78PfiXM4mKimHPsYEMS23dNQ8I7rEpJUcALN+AQoZYR05hyGBYD H3v6CGVNvquTD9Q1xz/Z/HHuf/cHXyAvFuwtzsJklZ0sS6RALc5ukljAsG3H9GdbpQUd GY7lansgUU1Xje0XSDPB5z2jKZhnUPppoHAFICSuSp8cwHLnFwj6vYX0fdrVX25BsGas o6dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=8UznDhGVV7whZQp3sLQQ5b64WOKUIbH2VMZ2XmB7M4w=; b=s0erPKb5ehv57Lcx61pqyqxxcdjDeZSWN5SRYLZcITtcXf76jvn5V8tleJVx2AbDjV bv3jyKRDKLdyCtI9cliIEKihPOUKqVM4gHTHmGCB9X1RQ9s//OQiGsKrOXizT2MNPp// qTibSW7yJA+Ivn8oKL5/orvQpovCxZBXfQlM4s2zVg59P8jz3NoD8RVD4zyBT/oOJyNT kdj9nDwZyuHCRa3Q0JBsbFT87dJxG5f37XFF7+32YnfAb2g3o6eS6oWAhQeMKQIoU7jP 0Dto6f50/AoDY5jHhTAuBqibIOuBlXjEb+sYZot8TzQPqccA+V2oYLhU4RWZFntCry3e w5TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HIGFwEaq; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n11-20020a1709061d0b00b008ccc0274102si5711726ejh.455.2023.03.02.06.28.38; Thu, 02 Mar 2023 06:29:00 -0800 (PST) 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=HIGFwEaq; 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 S229833AbjCBOQq (ORCPT + 99 others); Thu, 2 Mar 2023 09:16:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjCBOQo (ORCPT ); Thu, 2 Mar 2023 09:16:44 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 845333252E; Thu, 2 Mar 2023 06:16:40 -0800 (PST) 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 C3AA1615B3; Thu, 2 Mar 2023 14:16:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDFE4C433EF; Thu, 2 Mar 2023 14:16:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677766598; bh=OEBZAjntrzt45cN/wrw8P1FyBTzRzs8XJnWRa3aAwdE=; h=Date:From:To:Cc:Subject:From; b=HIGFwEaq+JSHzpiCLw0ppfq/bRH0TUocrrYcfarwp1zZoLiKOg+jbK7DzkVxZPDbE Ppg4UbmdGv676SLkMShGKkW69hc1X8nJdt35oWnb/7dMKt3KwEkRXa1/xYJeItP7M4 E7YP7YMqwd/gQPTcuPAEh+ahTN1YmFcZzUr0dwTTyg2/N0ryQlUykxCr0V3USF3O3C eaO9kfUjrkU8F4Seq6Lt2ZP2BxL1mNjpmFIuetfw4aBvjp0y9LmaYkTTJuPrJLeETx O7Ho6Ok3lMOao9W/DSCpImoiLceHqs6V08aD4O/5hCCV2OPa3CjSjwesB/0N/51wZA /Tb9Gi5DLJ0VQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 19ABA4049F; Thu, 2 Mar 2023 11:16:36 -0300 (-03) Date: Thu, 2 Mar 2023 11:16:36 -0300 From: Arnaldo Carvalho de Melo To: Miguel Ojeda Cc: Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?iso-8859-1?q?Bj=F6rn?= Roy Baron , Derek Barbosa , rust-for-linux@vger.kernel.org, Linux Kernel Mailing List Subject: [PATCH 1/1] rust: bindgen: Add `alt_instr` as opaque type Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-7.1 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759266567165449888?= X-GMAIL-MSGID: =?utf-8?q?1759266567165449888?= To address this build error: BINDGEN rust/bindings/bindings_generated.rs BINDGEN rust/bindings/bindings_helpers_generated.rs EXPORTS rust/exports_core_generated.h RUSTC P rust/libmacros.so RUSTC L rust/compiler_builtins.o RUSTC L rust/alloc.o RUSTC L rust/bindings.o RUSTC L rust/build_error.o EXPORTS rust/exports_alloc_generated.h error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type --> /var/home/acme/git/linux/rust/bindings/bindings_generated.rs:10094:1 | 10094 | / pub struct alt_instr { 10095 | | pub instr_offset: s32, 10096 | | pub repl_offset: s32, 10097 | | pub __bindgen_anon_1: alt_instr__bindgen_ty_1, 10098 | | pub instrlen: u8_, 10099 | | pub replacementlen: u8_, 10100 | | } | |_^ | note: `alt_instr__bindgen_ty_1__bindgen_ty_1` has a `#[repr(align)]` attribute --> /var/home/acme/git/linux/rust/bindings/bindings_generated.rs:10111:1 | 10111 | / pub struct alt_instr__bindgen_ty_1__bindgen_ty_1 { 10112 | | pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u16>, 10113 | | } | |_^ note: `alt_instr` contains a field of type `alt_instr__bindgen_ty_1` --> /var/home/acme/git/linux/rust/bindings/bindings_generated.rs:10097:9 | 10097 | pub __bindgen_anon_1: alt_instr__bindgen_ty_1, | ^^^^^^^^^^^^^^^^ note: ...which contains a field of type `alt_instr__bindgen_ty_1__bindgen_ty_1` --> /var/home/acme/git/linux/rust/bindings/bindings_generated.rs:10104:9 | 10104 | pub __bindgen_anon_1: alt_instr__bindgen_ty_1__bindgen_ty_1, | ^^^^^^^^^^^^^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0588`. make[1]: *** [rust/Makefile:389: rust/bindings.o] Error 1 make: *** [Makefile:1293: prepare] Error 2 Cc: Derek Barbosa Cc: Miguel Ojeda Signed-off-by: Arnaldo Carvalho de Melo Reviewed-by: Martin Rodriguez Reboredo Reviewed-by: Vincenzo Palazzo --- rust/bindgen_parameters | 1 + 1 file changed, 1 insertion(+) diff --git a/rust/bindgen_parameters b/rust/bindgen_parameters index be4963bf720304da..552d9a85925b9945 100644 --- a/rust/bindgen_parameters +++ b/rust/bindgen_parameters @@ -6,6 +6,7 @@ --opaque-type local_apic # Packed type cannot transitively contain a `#[repr(align)]` type. +--opaque-type alt_instr --opaque-type x86_msi_data --opaque-type x86_msi_addr_lo