openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/mtd-utils/2.1.0+AUTOINC+b5027be5f4-r0/git/ubifs-utils/mkfs.ubifs/lpt.c
static int calc_nnode_num(int row, int col)
{
    int num, bits;

    num = 1;
    while (row--)
    {
        bits = (col & (UBIFS_LPT_FANOUT - 1));
        col >>= UBIFS_LPT_FANOUT_SHIFT;
        num <<= UBIFS_LPT_FANOUT_SHIFT;
        num |= bits;
    }
    return num;
}
/**
 * calc_nnode_num - calculate nnode number.
 * @row: the row in the tree (root is zero)
 * @col: the column in the row (leftmost is zero)
 *
 * The nnode number is a number that uniquely identifies a nnode and can be used
 * easily to traverse the tree from the root to that nnode.
 *
 * This function calculates and returns the nnode number for the nnode at @row
 * and @col.
 */
calculate nnode number.
@row: the row in the tree (root is zero)
@col: the column in the row (leftmost is zero)

The nnode number is a number that uniquely identifies a nnode and can be used
easily to traverse the tree from the root to that nnode.

This function calculates and returns the nnode number for the nnode at @row
and @col.
calculate nnode number . @row : the row in the tree ( root is zero ) @col : the column in the row ( leftmost is zero ) The nnode number is a number that uniquely identifies a nnode and can be used easily to traverse the tree from the root to that nnode . This function calculates and returns the nnode number for the nnode at @row and @col .
static int calc_nnode_num(int row, int col)
{
    int num, bits;
    num = 1;
    while (row--)
    {
        bits = (col & (UBIFS_LPT_FANOUT - 1));
        col >>= UBIFS_LPT_FANOUT_SHIFT;
        num <<= UBIFS_LPT_FANOUT_SHIFT;
        num |= bits;
    }
    return num;
}
static int calc_nnode_num ( int row , int col ) { int num , bits ; num = 1 ; while ( row -- ) { bits = ( col & ( UBIFS_LPT_FANOUT - 1 ) ) ; col >>= UBIFS_LPT_FANOUT_SHIFT ; num <<= UBIFS_LPT_FANOUT_SHIFT ; num |= bits ; } return num ; }
calc_nnode_num - calculate nnode number.
calc_nnode_num - calculate nnode number .