From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2DA4C4321A for ; Sat, 29 Jun 2019 16:45:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 97517216FD for ; Sat, 29 Jun 2019 16:45:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ejhpH70s" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 97517216FD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tj4h9eXZUeofRRvcFrvVz2kcRI4ZALji+NBGo+MVy5s=; b=ejhpH70sOIDfOg zM9G+1YPYiGVBR1ZLck+crGIQnmVXu16rSsbG7yiWIjnVUh9E1UP1lDDbNjV2oC35N5N2FiiT1oJK MSwug7jb+eFGknoRjjyZeMp/WuGgMi2/Tdk1SDvtcgEINXziUD2FUaJnBf9wtODetcjmjKIJLV6Sk o0sL92SoBhzh/hIAIy17Izwn1yIKpgYEoFKfmWKZyJqw39kAhej9d0myasnc+o5e71nQjWuvpa9yz FYkwx5WNhb7d4ZYES31IHVEzxV7SUZt2VVc+8d8QREnd4g+CiS+SIbPEDCHu/fQmRBpk7yIK+U1cP jdelZxffWvdKFiyn/R4Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hhGTz-0001tI-8W; Sat, 29 Jun 2019 16:45:47 +0000 Received: from smtprelay0243.hostedemail.com ([216.40.44.243] helo=smtprelay.hostedemail.com) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hhGTv-0001sQ-Ux for linux-arm-kernel@lists.infradead.org; Sat, 29 Jun 2019 16:45:45 +0000 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay08.hostedemail.com (Postfix) with ESMTP id 72872182CF666; Sat, 29 Jun 2019 16:45:32 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: wood26_67b7f2b025644 X-Filterd-Recvd-Size: 3038 Received: from XPS-9350 (cpe-23-242-196-136.socal.res.rr.com [23.242.196.136]) (Authenticated sender: joe@perches.com) by omf01.hostedemail.com (Postfix) with ESMTPA; Sat, 29 Jun 2019 16:45:12 +0000 (UTC) Message-ID: Subject: Re: [PATCH V2] include: linux: Regularise the use of FIELD_SIZEOF macro From: Joe Perches To: Alexey Dobriyan , Andreas Dilger Date: Sat, 29 Jun 2019 09:45:10 -0700 In-Reply-To: <20190629142510.GA10629@avx2> References: <20190611193836.2772-1-shyam.saini@amarulasolutions.com> <20190611134831.a60c11f4b691d14d04a87e29@linux-foundation.org> <6DCAE4F8-3BEC-45F2-A733-F4D15850B7F3@dilger.ca> <20190629142510.GA10629@avx2> User-Agent: Evolution 3.30.5-0ubuntu0.18.10.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190629_094544_139537_0B91C55C X-CRM114-Status: GOOD ( 14.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: keescook@chromium.org, kvm@vger.kernel.org, kernel-hardening@lists.openwall.com, netdev@vger.kernel.org, intel-gfx@lists.freedesktop.org, devel@lists.orangefs.org, linux-kernel@vger.kernel.org, Shyam Saini , linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-sctp@vger.kernel.org, dri-devel@lists.freedesktop.org, Andrew Morton , linux-ext4 , intel-gvt-dev@lists.freedesktop.org, bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mayhs11saini@gmail.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, 2019-06-29 at 17:25 +0300, Alexey Dobriyan wrote: > On Tue, Jun 11, 2019 at 03:00:10PM -0600, Andreas Dilger wrote: > > On Jun 11, 2019, at 2:48 PM, Andrew Morton wrote: > > > On Wed, 12 Jun 2019 01:08:36 +0530 Shyam Saini wrote: > > I did a check, and FIELD_SIZEOF() is used about 350x, while sizeof_field() > > is about 30x, and SIZEOF_FIELD() is only about 5x. > > > > That said, I'm much more in favour of "sizeof_field()" or "sizeof_member()" > > than FIELD_SIZEOF(). Not only does that better match "offsetof()", with > > which it is closely related, but is also closer to the original "sizeof()". > > > > Since this is a rather trivial change, it can be split into a number of > > patches to get approval/landing via subsystem maintainers, and there is no > > huge urgency to remove the original macros until the users are gone. It > > would make sense to remove SIZEOF_FIELD() and sizeof_field() quickly so > > they don't gain more users, and the remaining FIELD_SIZEOF() users can be > > whittled away as the patches come through the maintainer trees. > > The signature should be > > sizeof_member(T, m) > > it is proper English, > it is lowercase, so is easier to type, > it uses standard term (member, not field), > it blends in with standard "sizeof" operator, yes please. Also, a simple script conversion applied immediately after an rc1 might be easiest rather than individual patches. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel