From nobody Thu Jun 27 15:31:09 2024 X-Original-To: dev-commits-src-branches@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 4W92bK5NQ4z5PtxH; Thu, 27 Jun 2024 15:31:09 +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 4W92bK2pLrz4CQB; Thu, 27 Jun 2024 15:31:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502269; 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=MNlk2mASKQG4LQdJNKOKRJS2e7hVXDxJ1Z3z53q2AnY=; b=C/N1cFdqSO2EK9fCD7k6INWp0ahFbjUB1ouDIL37a4m5n4Zyl3yJQw3WFGSFFMzBxinof7 nKIpQuzig+txEVo4J4xhIkJq1qLf2bwpdoas78ACE0o8NNFHToLUl2LeH0jUp+3PVpEy2d ee9IR+eaZvXQ+9K0VdQGZxt8LmHDg0N/SFceSWyGGylUzjC9HaqyR8/3D/b1S0cSeHbv1G rcmW3gUlutCToAXpRs1NsRqBHhAOrPxyiXoGemW98YKpgUAMZryrXk8djSyT9epkzADvlp 151TBBz2hR/SYY9/PlBNKGs5aQr1A/4si/De5mxqJW8x+BToqjjCMQBzaqL+ZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502269; a=rsa-sha256; cv=none; b=lZnxoQ1il3eycakE5S+m77Rb4woI8h18JlbY1W3ZJK5Xh18So8udES2kP57hHFHdjZCtuh cdqcOY59SIbbjrV/h8/CUo/YrszPPDkS+fIElR6zbuWq2QARfPU1ss7133DetPdQpeCx3t Y3yZxSpZu+HPiOkyVlEeLXm0EXxQVlobaPYANm6XJxWZPqb9YlV9a7SgnlFu25chBhI+UZ vaBbp+m0CBrN+ZLimvDcLevBNuD89TDBbGa5vtarvIVAmg6/AKEiHL9qw4bXRM6bwJq4du NIHcVNmIbhwv1raxjI6CWAGk+IBRS5YGiG8CJcE2wR5VgANgQ6tOVCyq8Do+Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502269; 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=MNlk2mASKQG4LQdJNKOKRJS2e7hVXDxJ1Z3z53q2AnY=; b=vw+iwmw5EJQ6OnrxzPK2GX/3FLQuNFvV0HvE8SZ6jar5XC8LcWEzPN8rW9j6pTSAzP/a5N tTyS8l8gUCh9R4i6PyIXO+mTLnTshXbfEJ/eVglCcoGP10WMyKUXfst5AwujbRJEY7bHOn z4EDrOqBCWAzpXoWJznyxzJ49MqGEWp/q4k3A0KhnYWucRBWJasZTNLvrnBqtkDnXZTKZ8 UJ/3fNv0d/Z0MD8SsMmfDQyZjm2vZjUjFXQG+0DiFsZo1h6+2gtn6EvpidIyrWpeVnA+Oc SSfeUVohC0UpRMoBja+uDP102AAkjh/KmwNfCfMRqFxosEUIOGiGdh+IjR+pWA== 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 4W92bK2Q2fzHcq; Thu, 27 Jun 2024 15:31:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45RFV9Tq078874; Thu, 27 Jun 2024 15:31:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFV9gp078871; Thu, 27 Jun 2024 15:31:09 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:09 GMT Message-Id: <202406271531.45RFV9gp078871@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: da334b4f5431 - stable/14 - hidbus: Use device_set_descf() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: da334b4f5431599addb7bf88f5a7764b809422d0 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=da334b4f5431599addb7bf88f5a7764b809422d0 commit da334b4f5431599addb7bf88f5a7764b809422d0 Author: Mark Johnston AuthorDate: 2024-06-05 19:25:05 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 hidbus: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 3f795763e45326489ab707c369b8daea495f6562) --- sys/dev/hid/hidbus.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/dev/hid/hidbus.c b/sys/dev/hid/hidbus.c index fd73136c289f..c2f8f58552e1 100644 --- a/sys/dev/hid/hidbus.c +++ b/sys/dev/hid/hidbus.c @@ -526,14 +526,12 @@ hidbus_set_desc(device_t child, const char *suffix) struct hidbus_softc *sc = device_get_softc(bus); struct hid_device_info *devinfo = device_get_ivars(bus); struct hidbus_ivars *tlc = device_get_ivars(child); - char buf[80]; /* Do not add NULL suffix or if device name already contains it. */ if (suffix != NULL && strcasestr(devinfo->name, suffix) == NULL && - (sc->nauto > 1 || (tlc->flags & HIDBUS_FLAG_AUTOCHILD) == 0)) { - snprintf(buf, sizeof(buf), "%s %s", devinfo->name, suffix); - device_set_desc_copy(child, buf); - } else + (sc->nauto > 1 || (tlc->flags & HIDBUS_FLAG_AUTOCHILD) == 0)) + device_set_descf(child, "%s %s", devinfo->name, suffix); + else device_set_desc(child, devinfo->name); }