From nobody Wed Apr 06 17:46:06 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2CFEB1AA63AA; Wed, 6 Apr 2022 17:46:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KYX4H0rprz3DKS; Wed, 6 Apr 2022 17:46:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649267167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=espwxXvUrwd+3Xxh4xZHammDd/+Fm3fcUSgECd7AFw8=; b=Es5AsXEU8enArswQgbSN096eWVQbXA248Q5XfMPs2PvuHoJPINVBJhW6eO+rmty1lQd4pe sOdS4iiq7mAoXC6aHgo8eIucuEvZDZ2Fqt3tBavEL7X4Z6jYkWAB02OZnT6/ZJPFrTao7p w5AXlhK+7ytMb8c3CFt8NztyJCSbnqWRZtxh0Q80FGAH+ytuOvucnwFGgN/369hFLM8HRM D/IO7w3KSbQlFERPezvuNllrX6OxGu+X/2nB+UE45BUp1frhJcD7tgcos/0zKddqCE+LDc S0EIuRN44fmNdRssgKVdJOEb6M5huNWqigX3kDeRBumeDt7ms6oOjHirDbJ8mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6E0E1F96A; Wed, 6 Apr 2022 17:46:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 236Hk6Qk022657; Wed, 6 Apr 2022 17:46:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 236Hk633022656; Wed, 6 Apr 2022 17:46:06 GMT (envelope-from git) Date: Wed, 6 Apr 2022 17:46:06 GMT Message-Id: <202204061746.236Hk633022656@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 88543510cc72 - releng/13.1 - linuxkpi: Move cdev_alloc into .c file List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.1 X-Git-Reftype: branch X-Git-Commit: 88543510cc7247f8eb87f82df262362883855aa9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649267167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=espwxXvUrwd+3Xxh4xZHammDd/+Fm3fcUSgECd7AFw8=; b=faPYB4Gz1/iC5BxrIeGL4OrcQ1AtePCt8ILjJM8Q9Lc1rlTboEgOEbVdj2VBdxXJEc/vQ1 aXjiBb8YTqY7Wpdc2ejrpHEQMs+pPIc5cwuodGhcKwdfEkyit6asUmZ5XQ9BzfVGd7CBFV e1RWAJbL1dP97LF/tWAa2GuAbp9sZnxvhmwKQN2xDjmxz8QtucufbS2Pb94qcjX+Gdn1yI j8T+JhP5Ch5l3j2pgZBUQMPDQkT/m3xX5Daa8V8rtxrwewL1SMGPDW9VKCxPk4AfMRpZMb bgswvQhtccg/ZSgf9whA5urVOJF71+5qfHsn6D62/AzT+X5bZJMFhkopgMxv8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649267167; a=rsa-sha256; cv=none; b=L9bVwQIQ6yDq5CObBCXn3xxzJS73YOLz9c9KBhiIkGlh42AUcP3LHtgjxbLTZ4k/c5or11 QmUDFjmh9NroRzwCNpboidmONEC03W2EMY0RwY07goViif256WWxQZLWQxc78TAOHuKxTk jc3aLq6I2gKsdgVPhO56oeXPkMhwAOcXfsFFgx/9AXTHPdGUFQIThP1jAs5urMvApaB5tk NcyWQZsVmZcwl7q2m3kbQCEyBAKdiNYOWI+QpPeeV+FHJM7vEkCeej5IrqITCr2XPulo6l ZuRROY6HpjxPPGmgNcVD1ggyCdUqDL4xOxZFg+jXQTJbHIkvewZFPeiVlTSdZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.1 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=88543510cc7247f8eb87f82df262362883855aa9 commit 88543510cc7247f8eb87f82df262362883855aa9 Author: Warner Losh AuthorDate: 2022-04-05 05:05:59 +0000 Commit: Warner Losh CommitDate: 2022-04-06 17:45:27 +0000 linuxkpi: Move cdev_alloc into .c file Move cdev_alloc into linux_compat.c since it encodes the size of struct linux_cdev into the client modules otherwise. Approved by: re@ (gjb) Sponsored by: Netflix Reviewed by: hselasky, emaste Differential Revision: https://reviews.freebsd.org/D34771 (cherry picked from commit aca0bcbca344b39f2a448e8c1c0d80bac8c0d6de) (cherry picked from commit d1f93d6721a6c51c0cb49078ad5c5d535a383964) --- sys/compat/linuxkpi/common/include/linux/cdev.h | 13 ++----------- sys/compat/linuxkpi/common/src/linux_compat.c | 11 +++++++++++ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/cdev.h b/sys/compat/linuxkpi/common/include/linux/cdev.h index fb7a3cf0b447..2befe9b259cb 100644 --- a/sys/compat/linuxkpi/common/include/linux/cdev.h +++ b/sys/compat/linuxkpi/common/include/linux/cdev.h @@ -57,6 +57,8 @@ struct linux_cdev { u_int siref; }; +struct linux_cdev *cdev_alloc(void); + static inline void cdev_init(struct linux_cdev *cdev, const struct file_operations *ops) { @@ -66,17 +68,6 @@ cdev_init(struct linux_cdev *cdev, const struct file_operations *ops) cdev->refs = 1; } -static inline struct linux_cdev * -cdev_alloc(void) -{ - struct linux_cdev *cdev; - - cdev = kzalloc(sizeof(struct linux_cdev), M_WAITOK); - kobject_init(&cdev->kobj, &linux_cdev_ktype); - cdev->refs = 1; - return (cdev); -} - static inline void cdev_put(struct linux_cdev *p) { diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 7a3378f57b3a..a146b7bc9aa0 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -601,6 +601,17 @@ linux_file_free(struct linux_file *filp) } } +struct linux_cdev * +cdev_alloc(void) +{ + struct linux_cdev *cdev; + + cdev = kzalloc(sizeof(struct linux_cdev), M_WAITOK); + kobject_init(&cdev->kobj, &linux_cdev_ktype); + cdev->refs = 1; + return (cdev); +} + static int linux_cdev_pager_fault(vm_object_t vm_obj, vm_ooffset_t offset, int prot, vm_page_t *mres)