Thread (13 messages) 13 messages, 3 authors, 2017-08-31

Re: [PATCH 5/5] qtnfmac: implement 64-bit dma support

From: Sergey Matyukevich <hidden>
Date: 2017-08-31 09:48:27

Hello Kalle,
quoted
-     writel(QTN_HOST_LO32(paddr),
-            PCIE_HDP_TX_HOST_Q_BASE_L(priv->pcie_reg_base));
+#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
      writel(QTN_HOST_HI32(paddr),
             PCIE_HDP_TX_HOST_Q_BASE_H(priv->pcie_reg_base));
+#endif
Personally I detest ifdefs and try to write code like this using
IS_ENABLED():

if (IS_ENABLED(CONFIG_ARCH_DMA_ADDR_T_64BIT))
        writel(QTN_HOST_HI32(paddr),
               PCIE_HDP_TX_HOST_Q_BASE_H(priv->pcie_reg_base));

But up to you which style you prefer.
I agree that this way it looks better. But I am using the same ifdef in header
to define QTN_HOST_* macros. So in this particular case I would prefer to
keep the same notation in both source and header files.

Thanks,
Sergey
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help