From owner-freebsd-current@freebsd.org Sat Apr 16 23:38:55 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 626C6B1135F for ; Sat, 16 Apr 2016 23:38:55 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-oi0-f46.google.com (mail-oi0-f46.google.com [209.85.218.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 34B72131D; Sat, 16 Apr 2016 23:38:54 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-oi0-f46.google.com with SMTP id r78so21082674oie.0; Sat, 16 Apr 2016 16:38:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc; bh=ejjuCTuo9J3WS9vf7jumyANljgn5M/Rt543WBkSyR2k=; b=cB4uzOdS/8OeMM8Ugz7GoZ/GH1xgjRen1dFAvS2o8Ie9Msg74r5BCRbzhm/qbUARYT ij62uS7ljrGRb8ddiFnI78M1C4Gl/AkdpR0z5KSiL+Nx7GQF3VaP7EBwbOZBIFXNOqje LnTH4S8MB3ghLrCSRvDWfC0tXnqF21HlnOeozJdNwNlFyon40F7z/03hQ4R6ybXxdF8b RIJ8UK3HtgrZ6HeOUGxjn6hQn6ad137FRBqZsi8KqNDNMngyzTP+MmkP/ZrPB1pHcCge BL+wMllKD7BVp/VGjvoBV0cCkhImJuYAVYMg/nhuKW7KPXBWIHxLPZ1m0FpU2PCft1WB 5+OA== X-Gm-Message-State: AOPr4FW2RlvCkcQHLf9sdofpTyT2YIUoXwCffO88oQbW/mWK45SaDm2lhPyy56CAZm+8Iw== X-Received: by 10.202.58.133 with SMTP id h127mr12961587oia.59.1460848103192; Sat, 16 Apr 2016 16:08:23 -0700 (PDT) Received: from mail-ob0-f176.google.com (mail-ob0-f176.google.com. [209.85.214.176]) by smtp.gmail.com with ESMTPSA id me9sm3899940obb.27.2016.04.16.16.08.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Apr 2016 16:08:23 -0700 (PDT) Received: by mail-ob0-f176.google.com with SMTP id n10so20235399obb.2; Sat, 16 Apr 2016 16:08:22 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.98.167 with SMTP id ej7mr14311218obb.46.1460848102688; Sat, 16 Apr 2016 16:08:22 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.157.22.215 with HTTP; Sat, 16 Apr 2016 16:08:22 -0700 (PDT) In-Reply-To: <57128385.6090307@FreeBSD.org> References: <57128385.6090307@FreeBSD.org> Date: Sat, 16 Apr 2016 16:08:22 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: CFR: extend use of nitems() macro in the kernel. From: Conrad Meyer To: Pedro Giffuni Cc: FreeBSD Current Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2016 23:38:55 -0000 On Sat, Apr 16, 2016 at 11:25 AM, Pedro Giffuni wrote: > Hello; > > Using coccinelle, and some hand re-formatting, I generated a patch to > make use of the nitems() macro in sys, which is too big for > phabricator [1]. > > I was careful to exclude anything from the contrib directory or > any code that is shared with userland (as to not have to include > additional headers). > > The patch is big but pretty safe, I think. The changes are small but > still it touches many files[1]. > > I would like some feedback on the convenience of doing such replacement. > If it is a good idea we could do the same for roundup2() and, in fact, > I think DragonFly has already done this. Assuming this change is correct, I am all for it. Assuming roundup2()s can be cleaned up in an automated and correct way, I am all for that sort of mechanical change too. Best, Conrad