From patchwork Thu Dec 21 04:51:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 851771 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="Rxl3ZdOZ"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3z2K4Y6PZLz9t2Q for ; Thu, 21 Dec 2017 15:52:13 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 988BAC21F92; Thu, 21 Dec 2017 04:52:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 9E828C21EEC; Thu, 21 Dec 2017 04:52:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0CEE4C21EEC; Thu, 21 Dec 2017 04:52:05 +0000 (UTC) Received: from conuserg-07.nifty.com (conuserg-07.nifty.com [210.131.2.74]) by lists.denx.de (Postfix) with ESMTPS id 43A60C21E31 for ; Thu, 21 Dec 2017 04:52:03 +0000 (UTC) Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id vBL4pn9a005837; Thu, 21 Dec 2017 13:51:50 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com vBL4pn9a005837 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1513831910; bh=Rog3DzeKwmk8SsFxPPGAU42halaKbr9AaKmkwx+MKHM=; h=From:To:Cc:Subject:Date:From; b=Rxl3ZdOZ3tWuCEgJzZyyhjJHNvEYO9nw9ZHsbxVkJyNpAk8MShcOvBhqWwgInrBxc W0Ro2pmCl/rn6h1NIpdmxXmELPnhTbkhkxq5pBOHNpzU5N0M9ZwVGfnylaXEkfbowS DkGLZ/Q2ni/f1qVOOZx+h9umA6l/pJkcn/t2I0AeDJBik8TGYkEgKOYiqv//HUnh8w tWafZAN8ejwWQZUepM5Z+Tlcuo76Zq0klSs8ogwr4W88KADPFSkBz2sob1qmnVqnzy RkF06O1ChB/5tpy19/sg5bDdR8OLo0KveTJu98vPqQNM8NvQplUDy9RUcm1FOXiPLQ lN98O3ppTlfGw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Thu, 21 Dec 2017 13:51:46 +0900 Message-Id: <1513831907-8641-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Subject: [U-Boot] [PATCH] linux/kernel.h: Add ALIGN_DOWN macro X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Follow Linux commit ed067d4a859f ("linux/kernel.h: Add ALIGN_DOWN macro"). Signed-off-by: Masahiro Yamada --- include/linux/kernel.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 87d2d95..04a09eb 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -38,6 +38,7 @@ #define REPEAT_BYTE(x) ((~0ul / 0xff) * (x)) #define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1) +#define ALIGN_DOWN(x, a) ALIGN((x) - ((a) - 1), (a)) #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) #define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)