lkml.org 
[lkml]   [2021]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/2 v2] dma-iommu: use static-key to minimize the impact in the fast-path
    On Tue, Jan 19, 2021 at 07:16:15PM +0800, Lianbo Jiang wrote:
    > +static DEFINE_STATIC_KEY_FALSE(__deferred_attach);

    Why the strange underscores? Wouldn't iommu_deferred_attach_enabled
    be a better name?

    > - if (unlikely(iommu_dma_deferred_attach(dev, domain)))
    > + if (static_branch_unlikely(&__deferred_attach) &&
    > + iommu_dma_deferred_attach(dev, domain))

    Also insted of duplicating this logic in three places, maybe rename
    iommu_dma_deferred_attach to __iommu_dma_deferred_attach and create
    a small inline wrapper for it?

    \
     
     \ /
      Last update: 2021-01-19 16:32    [W:3.798 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site