Hi Edgar, On Wednesday, 3 January 2018 08:07:44 EET Edgar Thier wrote: > Hi Emmanuel, If we pick names randomly I'll call you David :-) > >>> + int flags = 0; > >>> + > >>> + data = kmalloc(2, GFP_KERNEL); > > > > Isn't 1 byte enough ? > > To quote from Kieran further up this thread: > > >> kmalloc seems a bit of an overhead for 2 bytes (only one of which is > >> used). Can this use local stack storage? > >> > >> (Laurent, looks like you originally wrote the code that did that, was > >> there a reason for the kmalloc for 2 bytes?) > > > > Aha - OK, Just spoke with Laurent and - yes this is needed, as we can't > > DMA to the stack - I hadn't realised the 'data' was being DMA'd .. I don't dispute the fact that we need to kmalloc the memory, but I think we only need to kmalloc one byte, not two. The existing 2 bytes allocation comes from the size of the GET_LEN reply. Now that you only issue a GET_INFO here, one byte is enough. > >> All these are small issues. Let me try to address them, I'll send you an > >> updated patch shortly. > > I'll be waiting. -- Regards, Laurent Pinchart