<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.linux.kernel.janitors">
    <title>gmane.linux.kernel.janitors</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.janitors</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.janitors/23370"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.janitors/23368"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.janitors/23367"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.janitors/23366"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.janitors/23365"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.janitors/23364"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.janitors/23363"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.janitors/23362"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.janitors/23361"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.janitors/23370">
    <title>Re: [PATCH] lttng: cleanup one-bit signed bitfields</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.janitors/23370</link>
    <description>&lt;pre&gt;
OK, will do next time, sorry,

Thanks!

Mathieu


&lt;/pre&gt;</description>
    <dc:creator>Mathieu Desnoyers</dc:creator>
    <dc:date>2011-12-01T20:21:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.janitors/23368">
    <title>Re: [PATCH] lttng: cleanup one-bit signed bitfields</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.janitors/23368</link>
    <description>&lt;pre&gt;
Ick, I can edit this up, but please, make it in a format that I can
apply it in (i.e. git send-mail output).

thanks,

greg k-h
&lt;/pre&gt;</description>
    <dc:creator>Greg KH</dc:creator>
    <dc:date>2011-12-01T17:56:06</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.janitors/23367">
    <title>Re: [patch] Staging: lttng: dubious one-bit signed bitfields</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.janitors/23367</link>
    <description>&lt;pre&gt;As we add more than one of those "flags", not using bitfields will grow
the memory footprint of these structures, so I don't think this is
advised here.

Thanks,

Mathieu

* walter harms (wharms&amp;lt; at &amp;gt;bfs.de) wrote:

&lt;/pre&gt;</description>
    <dc:creator>Mathieu Desnoyers</dc:creator>
    <dc:date>2011-12-01T15:15:42</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.janitors/23366">
    <title>Re: [PATCH] lttng: cleanup one-bit signed bitfields</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.janitors/23366</link>
    <description>&lt;pre&gt;Acked-by: Dan Carpenter &amp;lt;dan.carpenter&amp;lt; at &amp;gt;oracle.com&amp;gt;

regards,
dan carpenter

_______________________________________________
devel mailing list
devel&amp;lt; at &amp;gt;linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
&lt;/pre&gt;</description>
    <dc:creator>Dan Carpenter</dc:creator>
    <dc:date>2011-12-01T14:43:51</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.janitors/23365">
    <title>Re: [patch] Staging: lttng: dubious one-bit signed bitfields</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.janitors/23365</link>
    <description>&lt;pre&gt;Hello Mathieu,
nice to hear someone is concerned about space.
since you plan to go for uint perhaps we can drop that bitfield stuff at all ?

re,
 wh


Am 01.12.2011 15:20, schrieb Mathieu Desnoyers:
&lt;/pre&gt;</description>
    <dc:creator>walter harms</dc:creator>
    <dc:date>2011-12-01T14:41:23</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.janitors/23364">
    <title>[PATCH] lttng: cleanup one-bit signed bitfields</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.janitors/23364</link>
    <description>&lt;pre&gt;commit 93db362daaaef88fed672256fa2948cf0efc11fb
Author: Mathieu Desnoyers &amp;lt;mathieu.desnoyers&amp;lt; at &amp;gt;efficios.com&amp;gt;
Date:   Thu Dec 1 09:25:40 2011 -0500

    lttng: cleanup one-bit signed bitfields
    
    * Dan Carpenter &amp;lt;dan.carpenter&amp;lt; at &amp;gt;oracle.com&amp;gt; wrote:
    &amp;gt; Sparse complains that these signed bitfields look "dubious".  The
    &amp;gt; problem is that instead of being either 0 or 1 like people would expect,
    &amp;gt; signed one bit variables like this are either 0 or -1.  It doesn't cause
    &amp;gt; a problem in this case but it's ugly so lets fix them.
    
    * walter harms (wharms&amp;lt; at &amp;gt;bfs.de) wrote:
    &amp;gt; hi,
    &amp;gt; This patch looks ok to me but this design is ugly by itself.
    &amp;gt; It should be replaced by an uchar uint whatever or use a
    &amp;gt; real bool (obviously not preferred by this programmes).
    
    bool :1, uchar :1 or uint :1 could make sense. uchar:1/bool:1 won't save
    any space here, because the surrounding fields are either uint or
    pointers, so alignment will just add padding.
    
    I try to use int/uint w&lt;/pre&gt;</description>
    <dc:creator>Mathieu Desnoyers</dc:creator>
    <dc:date>2011-12-01T14:31:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.janitors/23363">
    <title>Re: [patch] Staging: lttng: dubious one-bit signed bitfields</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.janitors/23363</link>
    <description>&lt;pre&gt;
bool :1, uchar :1 or uint :1 could make sense. uchar:1/bool:1 won't save
any space here, because the surrounding fields are either uint or
pointers, so alignment will just add padding.

I try to use int/uint whenever possible because x86 CPUs tend to get
less register false-dependencies when using instructions modifying the
whole register (generated by using int/uint types) rather than only part
of it (uchar/char/bool). I only use char/uchar/bool when there is a
clear wanted space gain.

The reason why I never use the bool type within a structure when I want
a compact representation is that bool takes a whole byte just to
represent one bit:

#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdbool.h&amp;gt;

struct usebitfield {
        int a;
        unsigned int f:1, g:1, h:1, i:1, j:1;
        int b;
};

struct usebool {
        int a;
        bool f, g, h, i, j;
        int b;
};

struct useboolbf {
        int a;
        bool f:1, g:1, h:1, i:1, j:1;
        int b;
};

int main()
{
        printf("bitfield %d bytes, bool %d byte&lt;/pre&gt;</description>
    <dc:creator>Mathieu Desnoyers</dc:creator>
    <dc:date>2011-12-01T14:20:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.janitors/23362">
    <title>Re: [patch] Staging: lttng: dubious one-bit signed bitfields</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.janitors/23362</link>
    <description>&lt;pre&gt;hi,
This patch looks ok to me but this design is ugly by itself.
It should be replaced by an uchar uint whatever or use a
real bool (obviously not preferred by this programmes).

re,
 wh

Am 01.12.2011 10:37, schrieb Dan Carpenter:
&lt;/pre&gt;</description>
    <dc:creator>walter harms</dc:creator>
    <dc:date>2011-12-01T09:56:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.janitors/23361">
    <title>[patch] Staging: lttng: dubious one-bit signed bitfields</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.janitors/23361</link>
    <description>&lt;pre&gt;Sparse complains that these signed bitfields look "dubious".  The
problem is that instead of being either 0 or 1 like people would expect,
signed one bit variables like this are either 0 or -1.  It doesn't cause
a problem in this case but it's ugly so lets fix them.

Signed-off-by: Dan Carpenter &amp;lt;dan.carpenter&amp;lt; at &amp;gt;oracle.com&amp;gt;
---
I just did this against linux next but it applies fine on top of
Mathieu's recent patches.

diff --git a/drivers/staging/lttng/lib/ringbuffer/backend_types.h b/drivers/staging/lttng/lib/ringbuffer/backend_types.h
index 1d301de..019929a 100644
--- a/drivers/staging/lttng/lib/ringbuffer/backend_types.h
+++ b/drivers/staging/lttng/lib/ringbuffer/backend_types.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -65,7 +65,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct channel_backend {
  * for writer.
  */
 unsigned int buf_size_order;/* Order of buffer size */
-int extra_reader_sb:1;/* Bool: has extra reader subbuffer */
+unsigned int extra_reader_sb:1;/* Bool: has extra reader subbuffer */
 struct lib_ring_buffer *buf;/* Channel per-cpu buffers */
 
 &lt;/pre&gt;</description>
    <dc:creator>Dan Carpenter</dc:creator>
    <dc:date>2011-12-01T09:37:47</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.linux.kernel.janitors">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.linux.kernel.janitors</link>
  </textinput>
</rdf:RDF>

