From owner-svn-src-head@freebsd.org Wed Feb 7 22:26:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA606EDF143; Wed, 7 Feb 2018 22:26:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 666568213A; Wed, 7 Feb 2018 22:26:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id E6B5B10A7DB; Wed, 7 Feb 2018 17:26:29 -0500 (EST) From: John Baldwin To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r328985 - head/sys/dev/usb/template Date: Wed, 07 Feb 2018 14:25:14 -0800 Message-ID: <2147494.gDNdGGi869@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201802071846.w17Ik894055491@repo.freebsd.org> References: <201802071846.w17Ik894055491@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 07 Feb 2018 17:26:30 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Feb 2018 22:26:31 -0000 On Wednesday, February 07, 2018 06:46:08 PM Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Feb 7 18:46:08 2018 > New Revision: 328985 > URL: https://svnweb.freebsd.org/changeset/base/328985 > > Log: > Give USB template SYSUNINIT()'s a uniq name to avoid symbol name collision > when building stand/usb. Regression after r328194. This seems like a bug in the USB bits in stand instead. In the kernel SYSINIT and SYSUNINIT use separate namespace by appending different suffixes to the first parameter: DATA_SET(sysinit_set,uniquifier ## _sys_init) vs. DATA_SET(sysuninit_set,uniquifier ## _sys_uninit) The bug is in stand/kshim/bsd_kernel.h: #define SYSINIT(uniq, subs, order, _func, _data) \ const struct sysinit UNIQ_NAME(sysinit_##uniq) = { \ .func = (_func), \ .data = __DECONST(void *, _data) \ }; \ SYSINIT_ENTRY(uniq##_entry, "sysinit", (subs), \ (order), "const struct sysinit", \ UNIQ_NAME_STR(sysinit_##uniq), "SYSINIT") #define SYSUNINIT(uniq, subs, order, _func, _data) \ const struct sysinit UNIQ_NAME(sysuninit_##uniq) = { \ .func = (_func), \ .data = __DECONST(void *, _data) \ }; \ SYSINIT_ENTRY(uniq##_entry, "sysuninit", (subs), \ (order), "const struct sysuninit", \ UNIQ_NAME_STR(sysuninit_##uniq), "SYSUNINIT") This should be using uniq##_uninit_entry or some such for the first argument to SYSINIT_ENTRY(). -- John Baldwin