From nobody Sun Jun 16 20:38:01 2024 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 4W2PwT50Q5z5PRRk; Sun, 16 Jun 2024 20:38:01 +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 4W2PwT2SwDz3xJj; Sun, 16 Jun 2024 20:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570281; 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=1vg61I47w1Nhr37vmH8PsEIKOJsdyVWNGEyXs2d5YiQ=; b=ZLiz+Iucuo33DpwfTfUn5rM/rYVU+jgytopqpY4XKjmmlh38tU1EyoQ5iF/SXivf8vYxS3 xUmvMjrMsqYl5NJOquaqkwpQ4CXfFNrsF7CS6/ZZMs+fpVZm4pkoTPn6br5VzbTGxNhHu+ 7WeovYAGH8MzJPnDFHsVrXgIwvlx0ZeO9Abg3FXVIO52yZ92kVWjuZfIuGfWgRXWc11PCy 7QLp00e2SZm/STRPxidDmdzyjhUNVFfzmuQy13hBGL7AXjh0OwI9eqOVLf1NOP4TPuzz/5 6+F3YsJA0QL6NHuck02xBsmveT1fiGWpb0HGkCL3kJ4UfLrOv0XFxP4HJNRABQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570281; a=rsa-sha256; cv=none; b=yBh8rIZX2/zwdR5azm/ZmhL9gvQGcLQQdKrA0KG55KXCJ8FHIuL89G+U/jQ/QKVEZqxbUf uTLjjOc6nPYebHiD8l/HMkbbHRxFiB55KMXDPkAgSxmmbA6oLII2fZFZyrgqfcE98WoRUy poBXbtP5XgE+KzQre43PfYrmGp1oehB8szNeav/zYEV2hffXLdzl97r4elUhBH0xKmULJW dVD+mhQscZm3jplCN+FGOPExsbyNHWylaDkPnsamdiqeuI4///gZPEf2ZpAK/v+4cOPmzk +hLSGNoAm6XseXsaNB5knu1pkehL6igdjnYFczuXkgpDPbyEjTplygQoWeM41Q== 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=1718570281; 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=1vg61I47w1Nhr37vmH8PsEIKOJsdyVWNGEyXs2d5YiQ=; b=DCVMC+sFuqdn6PYa+/0UNmKm4+Gcf029Nkf8eqG+WfoEAR9X8dq06zkLJ8aYUBZ6DT919q xTkyOARvu7Z0k0CwehhluJc7yuWZhN8oLGdmMlbXLDyGvf8pZyuxi94ogIKx4soOOZ1JzG A7eYeTHezf/dMZQLNWF/cznatEEs0z1dwX0VcPqcYXrN933rdhuKZEfAzKN2IY6zJBr1mQ wtKOtcO7k8CAYulsO9LB1MMxPQniVERwzd/nM/zbmgC5FKQj8WNdnzbwzq+JN0Pc7i27qM oLsnImcuHTb+NNk+YTilqjCkgxsCY/5JPwBdG2VicbYr1qoZQG/UB3gOKKTKBQ== 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 4W2PwT25Mfz12kp; Sun, 16 Jun 2024 20:38:01 +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 45GKc111079656; Sun, 16 Jun 2024 20:38:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKc1jw079653; Sun, 16 Jun 2024 20:38:01 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:38:01 GMT Message-Id: <202406162038.45GKc1jw079653@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 3f795763e453 - main - hidbus: Use device_set_descf() 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 3f795763e45326489ab707c369b8daea495f6562 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3f795763e45326489ab707c369b8daea495f6562 commit 3f795763e45326489ab707c369b8daea495f6562 Author: Mark Johnston AuthorDate: 2024-06-05 19:25:05 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 hidbus: Use device_set_descf() No functional change intended. MFC after: 1 week --- 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 f50abd4b0a4d..003017c0f3ea 100644 --- a/sys/dev/hid/hidbus.c +++ b/sys/dev/hid/hidbus.c @@ -525,14 +525,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); }