From owner-svn-src-head@freebsd.org Mon May 23 20:29:19 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 701A2B4711B; Mon, 23 May 2016 20:29:19 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39852164E; Mon, 23 May 2016 20:29:18 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 242F31FE024; Mon, 23 May 2016 22:29:17 +0200 (CEST) Subject: Re: svn commit: r300493 - head/sys/compat/linuxkpi/common/include/linux To: John Baldwin References: <201605231150.u4NBo56Y005227@repo.freebsd.org> <3455323.tBydyU5thm@ralph.baldwin.cx> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <28d6d086-7195-fd81-12b5-125e6b99000a@selasky.org> Date: Mon, 23 May 2016 22:32:38 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <3455323.tBydyU5thm@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 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: Mon, 23 May 2016 20:29:19 -0000 On 05/23/16 19:00, John Baldwin wrote: > On Monday, May 23, 2016 11:50:05 AM Hans Petter Selasky wrote: >> Author: hselasky >> Date: Mon May 23 11:50:05 2016 >> New Revision: 300493 >> URL: https://svnweb.freebsd.org/changeset/base/300493 >> >> Log: >> Add support for "cdev_add_ext()" to the LinuxKPI. >> >> Obtained from: kmacy @ >> MFC after: 1 week >> Sponsored by: Mellanox Technologies >> >> Modified: >> head/sys/compat/linuxkpi/common/include/linux/cdev.h >> >> Modified: head/sys/compat/linuxkpi/common/include/linux/cdev.h >> ============================================================================== >> --- head/sys/compat/linuxkpi/common/include/linux/cdev.h Mon May 23 11:47:54 2016 (r300492) >> +++ head/sys/compat/linuxkpi/common/include/linux/cdev.h Mon May 23 11:50:05 2016 (r300493) >> @@ -91,6 +91,18 @@ cdev_add(struct linux_cdev *cdev, dev_t >> return (0); >> } >> >> +static inline int >> +cdev_add_ext(struct linux_cdev *cdev, dev_t dev, uid_t uid, gid_t gid, int mode) >> +{ >> + cdev->cdev = make_dev(&linuxcdevsw, MINOR(dev), uid, gid, mode, >> + "%s/%d", kobject_name(&cdev->kobj), MINOR(dev)); >> + cdev->dev = dev; >> + cdev->cdev->si_drv1 = cdev; >> + >> + kobject_get(cdev->kobj.parent); >> + return (0); > > This should use make_dev_s() instead? > Good idea. I'll fix it. --HPS