mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
Add nvgpu_memcpy/nvgpu_memcmp which are MISRA-compliant versions (Rule 21.15) of memcpy/memcmp. Also convert some clk/gr calls over to use the new routines; all of the remaining calls will be converted in subsequent patches. JIRA NVGPU-849 Change-Id: Ib3a602cd08886764ba9a50285462a8b07bfb18ba Signed-off-by: Scott Long <scottl@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1919470 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
30 lines
874 B
C
30 lines
874 B
C
/*
|
|
* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms and conditions of the GNU General Public License,
|
|
* version 2, as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#include <nvgpu/string.h>
|
|
|
|
void
|
|
nvgpu_memcpy(u8 *destb, const u8 *srcb, size_t n)
|
|
{
|
|
(void) memcpy(destb, srcb, n);
|
|
}
|
|
|
|
int
|
|
nvgpu_memcmp(const u8 *b1, const u8 *b2, size_t n)
|
|
{
|
|
return memcmp(b1, b2, n);
|
|
}
|