From patchwork Fri May 2 05:19:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 344881 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 9722B14011C for ; Fri, 2 May 2014 15:19:23 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A4CD54BC17; Fri, 2 May 2014 07:19:19 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dxH4Hs0BGV3h; Fri, 2 May 2014 07:19:19 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 263444BC18; Fri, 2 May 2014 07:19:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D389B4BC18 for ; Fri, 2 May 2014 07:19:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4rpMpEP4WkTo for ; Fri, 2 May 2014 07:19:10 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from submit2.sa.ew.hu (submit2.sa.ew.hu [212.108.200.72]) by theia.denx.de (Postfix) with ESMTP id 472124BC17 for ; Fri, 2 May 2014 07:19:06 +0200 (CEST) Received: from submit2.sa.ew.hu (fw-out-k-1.invitel.net [91.82.116.132]) by submit2.sa.ew.hu (Postfix) with SMTP id B1ABE265B9; Fri, 2 May 2014 07:19:04 +0200 (CEST) Received: from [192.168.0.110] (87.97.25.21.pool.invitel.hu [87.97.25.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: heiko.schocher@invitel.hu) by submit2.sa.ew.hu (Postfix) with ESMTPSA id 110552657B; Fri, 2 May 2014 07:19:03 +0200 (CEST) Message-ID: <53632AC5.1030702@denx.de> Date: Fri, 02 May 2014 07:19:01 +0200 From: Heiko Schocher Organization: DENX Software Engineering User-Agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120421 Thunderbird/12.0 MIME-Version: 1.0 To: Simon Glass , Marek Vasut X-PMX-Spam: Gauge=XXIIIIIIII, Probability=28%, Report=' SXL_IP_DYNAMIC 3, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, NO_URI_FOUND 0, RDNS_GENERIC_POOLED 0, RDNS_SUSP 0, RDNS_SUSP_GENERIC 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_REPLYTO 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MOZILLA_MSGID 0, __MOZILLA_USER_AGENT 0, __REPLYTO_SAMEAS_FROM_ACC 0, __REPLYTO_SAMEAS_FROM_ADDY 0, __REPLYTO_SAMEAS_FROM_DOMAIN 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __USER_AGENT 0' Cc: U-Boot user list Subject: [U-Boot] U-Boot, dm, ubi: struct device is declared twice X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list Reply-To: hs@denx.de List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Hello Simon, Marek, just updating to current mainline code and defining CONFIG_SYS_GENERIC_BOARD pops up the following error: CC common/board_r.o In file included from include/linux/mtd/flashchip.h:21:0, from include/linux/mtd/nand.h:31, from include/nand.h:39, from common/board_r.c:40: include/ubi_uboot.h:202:8: error: redefinition of 'struct device' struct device { ^ In file included from include/dm.h:10:0, from common/board_r.c:21: include/dm/device.h:56:8: note: originally defined here struct device { ^ make[1]: *** [common/board_r.o] Fehler 1 make: *** [common] Fehler 2 pollux:u-boot hs [20140502] $ for a not yet mainlined imx6 board using UBI/UBIFS on nand. I am currently sync current Linux MTD/UBI and UBIFS code to U-Boot, but I think this error should pop up for all boards using DM and UBI ... How to solve this double named struct? I do not want to change this in Linux code as "struct device" is very much used, and this would be a maintaining nightmare for future syncs with linux code. Should we rename the DM "struct device" in include/dm/device.h ? U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/include/dm/device.h b/include/dm/device.h index 4cd38ed..ba9f128 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -24,7 +24,7 @@ struct driver_info; #define DM_FLAG_ALLOC_PDATA (2 << 0) /** - * struct device - An instance of a driver + * struct dm_device - An instance of a driver * * This holds information about a device, which is a driver bound to a * particular port or peripheral (essentially a driver instance). @@ -53,12 +53,12 @@ struct driver_info; * @sibling_node: Next device in list of all devices * @flags: Flags for this device DM_FLAG_... */ -struct device { +struct dm_device { What do you think? bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany _______________________________________________