lkml.org 
[lkml]   [2008]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] x86: add compilation checks to pci_unmap_ macros

On Sunday 2008-06-29 08:22, Matti Linnanvuori wrote:
>+#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME[0];
>+#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) unsigned LEN_NAME[0];
>+#define pci_unmap_addr(PTR, ADDR_NAME) sizeof((PTR)->ADDR_NAME)
>+#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \
>+ do { break; } while (pci_unmap_addr(PTR, ADDR_NAME))

Mh. If addr_name happens to be non-0 for some reason (like, a typo),
then this just introduces a lockup.
(Better to have a no-op with a typo than a sudden lockup. Given
that these are no-ops means they are deprecated, is not it the case?)


\
 
 \ /
  Last update: 2008-06-29 14:55    [W:1.106 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site