android_kernel_motorola_sm7435/lib/bcd.c
Greg Kroah-Hartman 852a23c042 Revert "bpf: handle fake register spill to stack with BPF_ST_MEM instruction"
This reverts commit 2fcd619caecb7c20568a83d9752ea23b4aa0e67d which is
commit 482d548d40b0af9af730e4869903d4433e44f014 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: I7936e86979bce7cead6b910c721f917671e9a6a8
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2026-07-02 05:58:25 +00:00

15 lines
297 B
C

// SPDX-License-Identifier: GPL-2.0
#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);