X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=lib%2Falign.h;h=94acacf2f66253d598864355d73ccb0479ab8707;hb=c994b2df91f004b4ae1af9c240e113987ce03626;hp=4929c5124a719a4c48d9d3bcf04f6936b8f57021;hpb=886d51a3d7ed5fa6b41d7f19b3e14ae6c535a44c;p=lttng-modules.git diff --git a/lib/align.h b/lib/align.h index 4929c512..94acacf2 100644 --- a/lib/align.h +++ b/lib/align.h @@ -1,30 +1,17 @@ -#ifndef _LTTNG_ALIGN_H -#define _LTTNG_ALIGN_H - -/* +/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1) + * * lib/align.h * * Copyright (C) 2010-2012 Mathieu Desnoyers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; only - * version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef _LTTNG_ALIGN_H +#define _LTTNG_ALIGN_H + #ifdef __KERNEL__ #include -#include "bug.h" +#include #define ALIGN_FLOOR(x, a) __ALIGN_FLOOR_MASK(x, (typeof(x)) (a) - 1) #define __ALIGN_FLOOR_MASK(x, mask) ((x) & ~(mask)) @@ -65,7 +52,7 @@ ({ \ BUILD_RUNTIME_BUG_ON((alignment) == 0 \ || ((alignment) & ((alignment) - 1))); \ - (((align_drift) - (alignment)) & ((alignment) - 1); \ + (((align_drift) - (alignment)) & ((alignment) - 1)); \ }) #endif /* __KERNEL__ */