From nobody Thu Jan 16 07:30:21 2025 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 4YYZJt6Cn5z5lKKF; Thu, 16 Jan 2025 07:30:22 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YYZJs746wz3bWZ; Thu, 16 Jan 2025 07:30:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737012622; 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=QdAIIN0sQMdMSIKeHV5PZO2I+tynOlgjFVk5QMHJIKU=; b=dIGMIa6AadAKXmd7SNN5O6GcRVp3q8jXUhtUSo0rnaMhdBIu97l2oIBhcoF6ay2GH9AGhQ hG3t69j5sriGoiHFeUFfwsQ2B8lXjx1RuKXs/u4kTAOXZuWddpDN0vurxFhbMZVzANCtj/ DRpcfjSbgnUwf0EKAtxlGSj9ZsKDhPhOl8osHDSoosXr0HDOwSWxVfSkonqk6LjiXlIDEr juXxtr18VUbcX3B7JuK0dAfG2UPmIXkNnqTfoLOqwPlgX5co0RPaNV4Vob95WyknbcNyVu JdcXlnIF74PAF1NDlnLAcIRJTDiz4oqA1QtN7g/5NVy0UMZL7v/ELcPUzJAL6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737012622; 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=QdAIIN0sQMdMSIKeHV5PZO2I+tynOlgjFVk5QMHJIKU=; b=gylkdBhQF/vLWT4T97znJGcBOhUjFEETegbHCtnhJ5+uJcWX8HAjWxyMnz8EkrlWcL62ZG 2U3lsy4ENDjwFVls6hdgmO4MKGimtSZ+VcNs2r/kj7pRpxT0sHYQtYud+MtxP6z7BluYnf 1n7XC3bbQmKCGa5JaWmEfuvTja32HiSRtOK8GEmC1SoFYVKdQr/HpOXKdC6utiNpA2ZTCd P2iSzEiR/g4iYIUnkVanjt7FifF2inBUCKFNHdjB7qvriEH7u9rGKqw5CiZjqVX1+Mmb3Z vZdI3GD0vB8rTkcfhUg0a7kwQRxTNkYaDSlrM16e7GzfhcTeHHinzDM4FPLyYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737012622; a=rsa-sha256; cv=none; b=rAzJ+iwD878oQAhisjYCmIDyYdd75Rk2V8B8SHe24yHqA7ZZ6ccYKLVY4+VHWV3lpBvGz8 M7YZls7a+IZgcrwgWrZL9oJs5tDGwf2rpKnZJ+ItnMzEM6YMQVzVoiJpfGd4V7s5RuTagK aHAemqs+FhpdR5daO2Q5iIkR/JhfoH/MhriCecAvRxQ62LB0yCiE2T6zj+meGNWNHyo2NC VDnWrXp19cW0VlaLXtdiNEpdmOFZZsXG/J1+TdyJJ5upbFpIJFyudo24ZD6gWHeFiZVEWU tKCOhfhxoD1RvWmbUV7ev4W1Ni7X0EpVoOQfQ8GlRGT4i43+Xm6Giji72PDBIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YYZJs3Tz9z6nn; Thu, 16 Jan 2025 07:30:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50G7ULiR098677; Thu, 16 Jan 2025 07:30:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50G7UL6D098674; Thu, 16 Jan 2025 07:30:21 GMT (envelope-from git) Date: Thu, 16 Jan 2025 07:30:21 GMT Message-Id: <202501160730.50G7UL6D098674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 90b1df4f4df9 - main - netlink: small cleanup of generic snl(3) 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90b1df4f4df937bca4b18563e6e15288de7484ac Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=90b1df4f4df937bca4b18563e6e15288de7484ac commit 90b1df4f4df937bca4b18563e6e15288de7484ac Author: Gleb Smirnoff AuthorDate: 2025-01-16 01:01:53 +0000 Commit: Gleb Smirnoff CommitDate: 2025-01-16 07:22:19 +0000 netlink: small cleanup of generic snl(3) - Add const qualifiers for the family/group name pointers. - Break & tab long lines. No functional changes. --- sys/netlink/netlink_snl_generic.h | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/sys/netlink/netlink_snl_generic.h b/sys/netlink/netlink_snl_generic.h index e2dc4d1bfffe..bdbefb914259 100644 --- a/sys/netlink/netlink_snl_generic.h +++ b/sys/netlink/netlink_snl_generic.h @@ -62,7 +62,7 @@ static struct snl_field_parser snl_fp_genl[] = {}; struct snl_genl_ctrl_mcast_group { uint32_t mcast_grp_id; - char *mcast_grp_name; + const char *mcast_grp_name; }; struct snl_genl_ctrl_mcast_groups { @@ -72,25 +72,40 @@ struct snl_genl_ctrl_mcast_groups { #define _OUT(_field) offsetof(struct snl_genl_ctrl_mcast_group, _field) static struct snl_attr_parser _nla_p_getmc[] = { - { .type = CTRL_ATTR_MCAST_GRP_NAME, .off = _OUT(mcast_grp_name), .cb = snl_attr_get_string }, - { .type = CTRL_ATTR_MCAST_GRP_ID, .off = _OUT(mcast_grp_id), .cb = snl_attr_get_uint32 }, + { + .type = CTRL_ATTR_MCAST_GRP_NAME, + .off = _OUT(mcast_grp_name), + .cb = snl_attr_get_string, + }, + { + .type = CTRL_ATTR_MCAST_GRP_ID, + .off = _OUT(mcast_grp_id), + .cb = snl_attr_get_uint32, + }, }; #undef _OUT SNL_DECLARE_ATTR_PARSER_EXT(_genl_ctrl_mc_parser, - sizeof(struct snl_genl_ctrl_mcast_group), - _nla_p_getmc, NULL); + sizeof(struct snl_genl_ctrl_mcast_group), _nla_p_getmc, NULL); struct _getfamily_attrs { uint16_t family_id; - char *family_name; + const char *family_name; struct snl_genl_ctrl_mcast_groups mcast_groups; }; #define _IN(_field) offsetof(struct genlmsghdr, _field) #define _OUT(_field) offsetof(struct _getfamily_attrs, _field) static struct snl_attr_parser _nla_p_getfam[] = { - { .type = CTRL_ATTR_FAMILY_ID , .off = _OUT(family_id), .cb = snl_attr_get_uint16 }, - { .type = CTRL_ATTR_FAMILY_NAME, .off = _OUT(family_name), .cb = snl_attr_get_string }, + { + .type = CTRL_ATTR_FAMILY_ID, + .off = _OUT(family_id), + .cb = snl_attr_get_uint16, + }, + { + .type = CTRL_ATTR_FAMILY_NAME, + .off = _OUT(family_name), + .cb = snl_attr_get_string, + }, { .type = CTRL_ATTR_MCAST_GROUPS, .off = _OUT(mcast_groups),