LCOV - code coverage report
Current view: top level - lib - clz_ctz.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 8 0.0 %
Date: 2014-02-18 Functions: 0 4 0.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * lib/clz_ctz.c
       3                 :            :  *
       4                 :            :  * Copyright (C) 2013 Chanho Min <chanho.min@lge.com>
       5                 :            :  *
       6                 :            :  * This program is free software; you can redistribute it and/or modify
       7                 :            :  * it under the terms of the GNU General Public License version 2 as
       8                 :            :  * published by the Free Software Foundation.
       9                 :            :  *
      10                 :            :  * __c[lt]z[sd]i2 can be overridden by linking arch-specific versions.
      11                 :            :  */
      12                 :            : 
      13                 :            : #include <linux/export.h>
      14                 :            : #include <linux/kernel.h>
      15                 :            : 
      16                 :          0 : int __weak __ctzsi2(int val)
      17                 :            : {
      18                 :          0 :         return __ffs(val);
      19                 :            : }
      20                 :            : EXPORT_SYMBOL(__ctzsi2);
      21                 :            : 
      22                 :          0 : int __weak __clzsi2(int val)
      23                 :            : {
      24                 :          0 :         return 32 - fls(val);
      25                 :            : }
      26                 :            : EXPORT_SYMBOL(__clzsi2);
      27                 :            : 
      28                 :            : #if BITS_PER_LONG == 32
      29                 :            : 
      30                 :          0 : int __weak __clzdi2(long val)
      31                 :            : {
      32                 :          0 :         return 32 - fls((int)val);
      33                 :            : }
      34                 :            : EXPORT_SYMBOL(__clzdi2);
      35                 :            : 
      36                 :          0 : int __weak __ctzdi2(long val)
      37                 :            : {
      38                 :          0 :         return __ffs((u32)val);
      39                 :            : }
      40                 :            : EXPORT_SYMBOL(__ctzdi2);
      41                 :            : 
      42                 :            : #elif BITS_PER_LONG == 64
      43                 :            : 
      44                 :            : int __weak __clzdi2(long val)
      45                 :            : {
      46                 :            :         return 64 - fls64((u64)val);
      47                 :            : }
      48                 :            : EXPORT_SYMBOL(__clzdi2);
      49                 :            : 
      50                 :            : int __weak __ctzdi2(long val)
      51                 :            : {
      52                 :            :         return __ffs64((u64)val);
      53                 :            : }
      54                 :            : EXPORT_SYMBOL(__ctzdi2);
      55                 :            : 
      56                 :            : #else
      57                 :            : #error BITS_PER_LONG not 32 or 64
      58                 :            : #endif

Generated by: LCOV version 1.9