lkml.org 
[lkml]   [2020]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] dma-mapping: move hint unlikely for dma_mapping_error from drivers to core
On Thu, Dec 10, 2020 at 03:47:50PM +0100, Heiner Kallweit wrote:
> Zillions of drivers use the unlikely() hint when checking the result of
> dma_mapping_error(). This is an inline function anyway, so we can move
> the hint into the function and remove it from drivers.
> From time to time discussions pop up how effective unlikely() is,
> and that it should be used only if something is really very unlikely.
> I think that's the case here.
>
> Patch was created with some help from coccinelle.
>
> @@
> expression dev, dma_addr;
> @@
>
> - unlikely(dma_mapping_error(dev, dma_addr))
> + dma_mapping_error(dev, dma_addr)
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Acked-by: Wolfram Sang <wsa@kernel.org> # for I2C

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-12-10 21:01    [W:0.045 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site