From owner-dev-commits-src-all@freebsd.org Mon Jan 18 16:25:50 2021 Return-Path: Delivered-To: dev-commits-src-all@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 46BDD4EF8B1; Mon, 18 Jan 2021 16:25:50 +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 4DKHG61b2yz4cc0; Mon, 18 Jan 2021 16:25:50 +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 24D5D17182; Mon, 18 Jan 2021 16:25:50 +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 10IGPot5094693; Mon, 18 Jan 2021 16:25:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10IGPo1e094692; Mon, 18 Jan 2021 16:25:50 GMT (envelope-from git) Date: Mon, 18 Jan 2021 16:25:50 GMT Message-Id: <202101181625.10IGPo1e094692@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: af4ed05c3dd2 - stable/12 - xen/xenstore: remove unused functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: af4ed05c3dd25c957b657f92f953bd9f00f818a8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2021 16:25:50 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=af4ed05c3dd25c957b657f92f953bd9f00f818a8 commit af4ed05c3dd25c957b657f92f953bd9f00f818a8 Author: Roger Pau Monné AuthorDate: 2020-11-26 08:57:47 +0000 Commit: Ed Maste CommitDate: 2021-01-18 16:25:24 +0000 xen/xenstore: remove unused functions Those helpers are not used, so remove them. No functional change. Sponsored by: Citrix Systems R&D MFC after: 3 days (cherry picked from commit 2ae75536d370c238f77ad09e5e994d2b8bdf010c) --- sys/xen/xenbus/xenbus.c | 42 ---------------------------------- sys/xen/xenbus/xenbusvar.h | 56 ---------------------------------------------- 2 files changed, 98 deletions(-) diff --git a/sys/xen/xenbus/xenbus.c b/sys/xen/xenbus/xenbus.c index c59d4aec4532..415279ec2311 100644 --- a/sys/xen/xenbus/xenbus.c +++ b/sys/xen/xenbus/xenbus.c @@ -102,48 +102,6 @@ xenbus_strstate(XenbusState state) return ((state < (XenbusStateClosed + 1)) ? name[state] : "INVALID"); } -int -xenbus_watch_path(device_t dev, char *path, struct xs_watch *watch, - xs_watch_cb_t *callback, uintptr_t callback_data) -{ - int error; - - watch->node = path; - watch->callback = callback; - watch->callback_data = callback_data; - - error = xs_register_watch(watch); - - if (error) { - watch->node = NULL; - watch->callback = NULL; - xenbus_dev_fatal(dev, error, "adding watch on %s", path); - } - - return (error); -} - -int -xenbus_watch_path2(device_t dev, const char *path, - const char *path2, struct xs_watch *watch, - xs_watch_cb_t *callback, uintptr_t callback_data) -{ - int error; - char *state = malloc(strlen(path) + 1 + strlen(path2) + 1, - M_XENBUS, M_WAITOK); - - strcpy(state, path); - strcat(state, "/"); - strcat(state, path2); - - error = xenbus_watch_path(dev, state, watch, callback, callback_data); - if (error) { - free(state,M_XENBUS); - } - - return (error); -} - void xenbus_dev_verror(device_t dev, int err, const char *fmt, va_list ap) { diff --git a/sys/xen/xenbus/xenbusvar.h b/sys/xen/xenbus/xenbusvar.h index 377d60c01590..bea65fff8e5a 100644 --- a/sys/xen/xenbus/xenbusvar.h +++ b/sys/xen/xenbus/xenbusvar.h @@ -123,62 +123,6 @@ xenbus_get_otherend_state(device_t dev) return (xenbus_read_driver_state(xenbus_get_otherend_path(dev))); } -/** - * Initialize and register a watch on the given path (client suplied storage). - * - * \param dev The XenBus device requesting the watch service. - * \param path The XenStore path of the object to be watched. The - * storage for this string must be stable for the lifetime - * of the watch. - * \param watch The watch object to use for this request. This object - * must be stable for the lifetime of the watch. - * \param callback The function to call when XenStore objects at or below - * path are modified. - * \param cb_data Client data that can be retrieved from the watch object - * during the callback. - * - * \return On success, 0. Otherwise an errno value indicating the - * type of failure. - * - * \note On error, the device 'dev' will be switched to the XenbusStateClosing - * state and the returned error is saved in the per-device error node - * for dev in the XenStore. - */ -int xenbus_watch_path(device_t dev, char *path, - struct xs_watch *watch, - xs_watch_cb_t *callback, - uintptr_t cb_data); - -/** - * Initialize and register a watch at path/path2 in the XenStore. - * - * \param dev The XenBus device requesting the watch service. - * \param path The base XenStore path of the object to be watched. - * \param path2 The tail XenStore path of the object to be watched. - * \param watch The watch object to use for this request. This object - * must be stable for the lifetime of the watch. - * \param callback The function to call when XenStore objects at or below - * path are modified. - * \param cb_data Client data that can be retrieved from the watch object - * during the callback. - * - * \return On success, 0. Otherwise an errno value indicating the - * type of failure. - * - * \note On error, \a dev will be switched to the XenbusStateClosing - * state and the returned error is saved in the per-device error node - * for \a dev in the XenStore. - * - * Similar to xenbus_watch_path, however the storage for the path to the - * watched object is allocated from the heap and filled with "path '/' path2". - * Should a call to this function succeed, it is the callers responsibility - * to free watch->node using the M_XENBUS malloc type. - */ -int xenbus_watch_path2(device_t dev, const char *path, - const char *path2, struct xs_watch *watch, - xs_watch_cb_t *callback, - uintptr_t cb_data); - /** * Grant access to the given ring_mfn to the peer of the given device. *