https://github.com/torvalds/linux
Revision 022e5d098b3bcc4a9a75c24e910a08ff9d2321d2 authored by Linus Torvalds on 10 August 2013, 22:19:58 UTC, committed by Linus Torvalds on 10 August 2013, 22:19:58 UTC
Pull nfsd fixes from Bruce Fields:
 "Some fixes for a 4.1 feature that in retrospect probably should have
  waited for 3.12....  But it appears to be working now"

* 'for-3.11' of git://linux-nfs.org/~bfields/linux:
  nfsd: Fix SP4_MACH_CRED negotiation in EXCHANGE_ID
  nfsd4: Fix MACH_CRED NULL dereference
2 parent s 1e24f76 + 58cd57b
Raw File
Tip revision: 022e5d098b3bcc4a9a75c24e910a08ff9d2321d2 authored by Linus Torvalds on 10 August 2013, 22:19:58 UTC
Merge branch 'for-3.11' of git://linux-nfs.org/~bfields/linux
Tip revision: 022e5d0
bcd.c
#include <linux/bcd.h>
#include <linux/export.h>

unsigned _bcd2bin(unsigned char val)
{
	return (val & 0x0f) + (val >> 4) * 10;
}
EXPORT_SYMBOL(_bcd2bin);

unsigned char _bin2bcd(unsigned val)
{
	return ((val / 10) << 4) + val % 10;
}
EXPORT_SYMBOL(_bin2bcd);
back to top