Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp103363imm; Fri, 6 Jul 2018 14:59:47 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeQBdgoYlMSuby9S2c6P/nUpVp6s6D2D0/QZxm7l5MJz4+wMKPPqQiW/2uZcHmSv9B25OYK X-Received: by 2002:aa7:808f:: with SMTP id v15-v6mr12215695pff.38.1530914387532; Fri, 06 Jul 2018 14:59:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530914387; cv=none; d=google.com; s=arc-20160816; b=GgJl22SMWXbAO+EuU/Cmvdqtn1ma8NRmKbEDkaxMDPHl6j5dclnc4OFZzdhtv7DRzd gb7b3hYtHP9XIcQhP7pwnFtnMn/1ou4NwTYtBJZhRiCHhK6/6ox32LEQNeni/LnbY78N osf/z/r6y8sMaAatFp472CMxSBzAiCBLBBH5zXzHES7Y5zVgML9Fm3gIax0VpTijlzMu YWir2zgWILsY4+DlDmRfu1MDVECdqs2cHpwuhEAboNKq40+H+PUT13H6w9umZr7L7/96 NRNWlneJoZeD9vdEGJbrChXNRf6IwHVC2ze4srXjh6O1g5uXb0VlEDhVAHfDkSqiT3hn 7Mug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=ecLeOxSrVrLw6eDtEthuXQeCKHGYtwJPQacvqh+0Q2c=; b=ko0pmi1Uo7WcmdYkymQZIc+k4bxr9FL7Q9W1OCYwBl+ARpHUd1XHOsvHNqDe434m7d EC4GKMFPzPn4VfvtRS5LhlMgcQTvxalmqNc7i2h+AJ1rLrfsqM+NUSZVAw0xLuVilDMU yZaWldVHHEYOMF4glAMB3lPtiI+1dtUsC+NdQq5XCOGvaWcBZa0nQ+JLgp78nMvoMsCm byi7NNObjNTUolFovot/abIlOG03aQInTQRJCTQuRGE+GCuBM6PVeaI464prGgsQVRIK u/8bWHjVtWbholqozCPiY88XHji8t0x6KpbQ4gA1GoBDeVYwTqDRIj4BG17XFRtdohOg ANtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f97-v6si9145553plb.291.2018.07.06.14.59.33; Fri, 06 Jul 2018 14:59:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754240AbeGFV6K (ORCPT + 99 others); Fri, 6 Jul 2018 17:58:10 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55600 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753993AbeGFV5z (ORCPT ); Fri, 6 Jul 2018 17:57:55 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.9.92]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 0ED7ADB1; Fri, 6 Jul 2018 21:57:55 +0000 (UTC) Date: Fri, 6 Jul 2018 14:57:53 -0700 From: Andrew Morton To: Chris Wilson Cc: linux-kernel@vger.kernel.org, Jani Nikula , Andy Gospodarek , "David S . Miller" , Thomas Gleixner , Ingo Molnar Subject: Re: [PATCH] bitops: Introduce BITS_PER_TYPE Message-Id: <20180706145753.b186b0b22d9c55744b77f385@linux-foundation.org> In-Reply-To: <20180706094458.14116-1-chris@chris-wilson.co.uk> References: <20180706094458.14116-1-chris@chris-wilson.co.uk> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 6 Jul 2018 10:44:58 +0100 Chris Wilson wrote: > net_dim.h has a rather useful extension to BITS_PER_BYTE to compute the > number of bits in a type (BITS_PER_BYTE * sizeof(T)), so promote the > macro to bitops.h, alongside BITS_PER_BYTE, for wider usage. A bit of grepping shows that there's quite a lot of code which does sizeof(blah)*BITS_PER_BYTE. Fun newbie project.