From nobody Tue Jul 23 23:46:47 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 4WTDMs2rSZz5RB48; Tue, 23 Jul 2024 23:47:21 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp.infotel.ru (corp.infotel.ru [195.170.219.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4WTDMr1FpYz4hNP; Tue, 23 Jul 2024 23:47:20 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of vladimir@kondratyev.su has no SPF policy when checking 195.170.219.3) smtp.mailfrom=vladimir@kondratyev.su Received: from corp (corp.infotel.ru [195.170.219.3]) by corp.infotel.ru (Postfix) with ESMTP id 5B5E44EA113; Wed, 24 Jul 2024 02:47:12 +0300 (MSK) X-Virus-Scanned: amavisd-new at corp.infotel.ru Received: from corp.infotel.ru ([195.170.219.3]) by corp (corp.infotel.ru [195.170.219.3]) (amavisd-new, port 10024) with ESMTP id LCqpMAGwf5ZW; Wed, 24 Jul 2024 02:47:07 +0300 (MSK) Received: from mail.cicgroup.ru (unknown [195.170.219.74]) by corp.infotel.ru (Postfix) with ESMTP id 07F424E9CDC; Wed, 24 Jul 2024 02:47:07 +0300 (MSK) Received: from mail.cicgroup.ru (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTP id D711642211F; Wed, 24 Jul 2024 02:46:51 +0300 (MSK) Received: from mail.cicgroup.ru ([127.0.0.1]) by mail.cicgroup.ru (mail.cicgroup.ru [127.0.0.1]) (amavisd-new, port 10024) with SMTP id sHxgqrAW6Gw5; Wed, 24 Jul 2024 02:46:49 +0300 (MSK) Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTPA id E093742211C; Wed, 24 Jul 2024 02:46:48 +0300 (MSK) Message-ID: <75796855-cf79-4538-81c5-ae6f7765d2d3@kondratyev.su> Date: Wed, 24 Jul 2024 02:46:47 +0300 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 User-Agent: Mozilla Thunderbird Subject: Re: git: a1181662d370 - main - LinuxKPI: Add devm_device_add_group to linux/device.h To: "Bjoern A. Zeeb" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202407211314.46LDEoW4023107@gitrepo.freebsd.org> <0964qqop-qrsn-2rpq-1n4s-snr76ps12no9@SerrOFQ.bet> Content-Language: en-US From: Vladimir Kondratyev In-Reply-To: <0964qqop-qrsn-2rpq-1n4s-snr76ps12no9@SerrOFQ.bet> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: - X-Spamd-Result: default: False [-1.53 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.54)[-0.537]; MIME_GOOD(-0.10)[text/plain]; RCVD_NO_TLS_LAST(0.10)[]; XM_UA_NO_VERSION(0.01)[]; ASN(0.00)[asn:8299, ipnet:195.170.192.0/19, country:RU]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; R_SPF_NA(0.00)[no SPF record]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; DMARC_NA(0.00)[kondratyev.su]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4WTDMr1FpYz4hNP On 22.07.2024 21:55, Bjoern A. Zeeb wrote: > On Sun, 21 Jul 2024, Vladimir Kondratyev wrote: >=20 >> The branch main has been updated by wulf: >> >> URL:=20 >> https://cgit.FreeBSD.org/src/commit/?id=3Da1181662d3707d8165d7153a0aa5= d76ea1ddc11a >> >> commit a1181662d3707d8165d7153a0aa5d76ea1ddc11a >> Author:=C2=A0=C2=A0=C2=A0=C2=A0 Vladimir Kondratyev >> AuthorDate: 2024-07-21 13:09:12 +0000 >> Commit:=C2=A0=C2=A0=C2=A0=C2=A0 Vladimir Kondratyev >> CommitDate: 2024-07-21 13:09:12 +0000 >> >> =C2=A0=C2=A0 LinuxKPI: Add devm_device_add_group to linux/device.h >> >> =C2=A0=C2=A0 devm_device_add_group creates a managed attribute group f= or a device. >> >> =C2=A0=C2=A0 Sponsored by:=C2=A0=C2=A0 Serenity Cyber Security, LLC >> =C2=A0=C2=A0 MFC after:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1 week >> =C2=A0=C2=A0 Reviewed by:=C2=A0=C2=A0=C2=A0 manu >> =C2=A0=C2=A0 Differential Revision:=C2=A0 https://reviews.freebsd.org/= D45845 >> --- >> sys/compat/linuxkpi/common/include/linux/device.h |=C2=A0 4 +++ >> sys/compat/linuxkpi/common/src/linux_compat.c=C2=A0=C2=A0=C2=A0=C2=A0 = | 30 +++++++++++++++++++++++ >> 2 files changed, 34 insertions(+) >> >> diff --git a/sys/compat/linuxkpi/common/include/linux/device.h=20 >> b/sys/compat/linuxkpi/common/include/linux/device.h >> index 00c55b31b248..912be8fbae8b 100644 >> --- a/sys/compat/linuxkpi/common/include/linux/device.h >> +++ b/sys/compat/linuxkpi/common/include/linux/device.h >> @@ -701,4 +701,8 @@ int lkpi_devm_add_action_or_reset(struct device *d= ev, void=20 >> (*action)(void *), vo >> #define=C2=A0=C2=A0=C2=A0 devm_add_action_or_reset(dev, action, data)=C2= =A0=C2=A0=C2=A0 \ >> =C2=A0=C2=A0=C2=A0=C2=A0lkpi_devm_add_action_or_reset(dev, action, dat= a) >> >> +int lkpi_devm_device_add_group(struct device *dev, const struct=20 >> attribute_group *group); >> +#define=C2=A0=C2=A0=C2=A0 devm_device_add_group(dev, group)=C2=A0=C2=A0= =C2=A0 \ >> +=C2=A0=C2=A0=C2=A0 lkpi_devm_device_add_group(dev, group) >=20 > I thought we would use linuxkpi_ as prefix for publicly exposed LinuxKP= I > related functions and lkpi_ for "internal" FreeBSD specific code which > does not follow Linux KPI? >=20 And I thought that we use lkpi_ as HPS told me that once. And really if we take a look at sys/compat/linuxkpi/common/src % grep ^linux_ * | wc -l 247 % grep ^lkpi_ * | wc -l 228 % grep ^linuxkpi_ * | wc -l 99 lkpi_ is used twice more times. I would prefer to use lkpi_ as prefix for publicly exposed functions and = _lkpi_=20 or __lkpi_ for internal code as lkpi is four symbols shorter. > Can this be fixed before MFC? >=20 Yes if you insist on that. --=20 WBR Vladimir Kondratyev