Messages in this thread | | | From | Rusty Russell <> | Subject | RE: [PATCH 1/3] virtio_console:Merge struct buffer_token into struct port_buffer | Date | Thu, 27 Sep 2012 09:12:33 +0930 |
| |
Sjur BRENDELAND <sjur.brandeland@stericsson.com> writes: >> This allocates one redundant sg entry when nrbuf > 0, >> but I think it is OK. (just a comment) > > I did this on purpose for the sake of simplicity, but I can > change this to something like: > alloc_size = sizeof(*buf) + sizeof(buf->sg) * max(nrbufs - 1, 1);
That's why we use [0] in the definition (a GCC extension).
Cheers, Rusty.
| |