mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	Remove GPL boilerplate text (long, short, one-line) and keep the rest, ie. personal, company or original source copyright statements. Add the SPDX header. Unify the include protection macros to match the file names. Signed-off-by: David Sterba <dsterba@suse.com>
		
			
				
	
	
		
			28 lines
		
	
	
	
		
			487 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
	
		
			487 B
		
	
	
	
		
			C
		
	
	
	
	
	
/* SPDX-License-Identifier: GPL-2.0 */
 | 
						|
/*
 | 
						|
 * Copyright (C) 2012 Fujitsu.  All rights reserved.
 | 
						|
 * Written by Miao Xie <miaox@cn.fujitsu.com>
 | 
						|
 */
 | 
						|
 | 
						|
#ifndef BTRFS_MATH_H
 | 
						|
#define BTRFS_MATH_H
 | 
						|
 | 
						|
#include <asm/div64.h>
 | 
						|
 | 
						|
static inline u64 div_factor(u64 num, int factor)
 | 
						|
{
 | 
						|
	if (factor == 10)
 | 
						|
		return num;
 | 
						|
	num *= factor;
 | 
						|
	return div_u64(num, 10);
 | 
						|
}
 | 
						|
 | 
						|
static inline u64 div_factor_fine(u64 num, int factor)
 | 
						|
{
 | 
						|
	if (factor == 100)
 | 
						|
		return num;
 | 
						|
	num *= factor;
 | 
						|
	return div_u64(num, 100);
 | 
						|
}
 | 
						|
 | 
						|
#endif
 |