lkml.org 
[lkml]   [2018]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] bitops: Introduce BITS_PER_TYPE
On Fri,  6 Jul 2018 10:44:58 +0100 Chris Wilson <chris@chris-wilson.co.uk> 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.

\
 
 \ /
  Last update: 2018-07-06 23:59    [W:1.616 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site