From owner-dev-commits-src-main@freebsd.org Mon Jun 28 22:24:08 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8864F65D777; Mon, 28 Jun 2021 22:24: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 4GDMbD2rQXz4k7G; Mon, 28 Jun 2021 22:24:08 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 397EF5990; Mon, 28 Jun 2021 22:24:08 +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 15SMO8E0048874; Mon, 28 Jun 2021 22:24:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMO86E048873; Mon, 28 Jun 2021 22:24:08 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:08 GMT Message-Id: <202106282224.15SMO86E048873@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: dcd5dea96509 - main - cam: delete cam_sim_alloc_dev 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/main X-Git-Reftype: branch X-Git-Commit: dcd5dea96509f6e483861350c9ef1d6a85b44ff6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:09 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=dcd5dea96509f6e483861350c9ef1d6a85b44ff6 commit dcd5dea96509f6e483861350c9ef1d6a85b44ff6 Author: Warner Losh AuthorDate: 2021-06-28 22:00:44 +0000 Commit: Warner Losh CommitDate: 2021-06-28 22:13:03 +0000 cam: delete cam_sim_alloc_dev cam_sim_alloc_dev was only used internally by the MMC system. That has been convered to using xpt_path_device() and has stopped using this interface, so this can be retired. Reviewed by: scottl@, mav@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30858 --- sys/cam/cam_sim.c | 28 ---------------------------- sys/cam/cam_sim.h | 1 - 2 files changed, 29 deletions(-) diff --git a/sys/cam/cam_sim.c b/sys/cam/cam_sim.c index 20bed83fac86..e7a7348d0c44 100644 --- a/sys/cam/cam_sim.c +++ b/sys/cam/cam_sim.c @@ -116,7 +116,6 @@ cam_sim_alloc(sim_action_func sim_action, sim_poll_func sim_poll, sim->sim_name = sim_name; sim->softc = softc; sim->path_id = CAM_PATH_ANY; - sim->sim_dev = NULL; /* set only by cam_sim_alloc_dev */ sim->unit_number = unit; sim->bus_id = 0; /* set in xpt_bus_register */ sim->max_tagged_dev_openings = max_tagged_dev_transactions; @@ -128,33 +127,6 @@ cam_sim_alloc(sim_action_func sim_action, sim_poll_func sim_poll, return (sim); } -/** - * @brief allocate a new sim and fill in the details with a device_t - * - * Just like @c cam_sim_alloc, but with an additional paramter. - * - * @param dev A newbus device that's associated with the - * sim. Must be non-NULL. - */ -struct cam_sim * -cam_sim_alloc_dev(sim_action_func sim_action, sim_poll_func sim_poll, - const char *sim_name, void *softc, device_t dev, struct mtx *mtx, - int max_dev_transactions, int max_tagged_dev_transactions, - struct cam_devq *queue) -{ - struct cam_sim *sim; - - KASSERT(dev != NULL, ("%s: dev is null for sim_name %s softc %p\n", - __func__, sim_name, softc)); - - sim = cam_sim_alloc(sim_action, sim_poll, sim_name, softc, - device_get_unit(dev), mtx, max_dev_transactions, - max_tagged_dev_transactions, queue); - if (sim != NULL) - sim->sim_dev = dev; - return (sim); -} - void cam_sim_free(struct cam_sim *sim, int free_devq) { diff --git a/sys/cam/cam_sim.h b/sys/cam/cam_sim.h index 4becc715f13e..47f395854c01 100644 --- a/sys/cam/cam_sim.h +++ b/sys/cam/cam_sim.h @@ -104,7 +104,6 @@ struct cam_sim { u_int32_t flags; struct cam_devq *devq; /* Device Queue to use for this SIM */ int refcount; /* References to the SIM. */ - device_t sim_dev; /* For attached peripherals. */ }; static __inline u_int32_t