general.c (428B)
1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * Driver for Realtek PCI-Express card reader 4 * 5 * Copyright(c) 2009-2013 Realtek Semiconductor Corp. All rights reserved. 6 * 7 * Author: 8 * Wei WANG (wei_wang@realsil.com.cn) 9 * Micky Ching (micky_ching@realsil.com.cn) 10 */ 11 12#include "general.h" 13 14int bit1cnt_long(u32 data) 15{ 16 int i, cnt = 0; 17 18 for (i = 0; i < 32; i++) { 19 if (data & 0x01) 20 cnt++; 21 data >>= 1; 22 } 23 return cnt; 24} 25