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: 122505 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp411959qgn; Wed, 20 Dec 2017 20:52:11 -0800 (PST) X-Google-Smtp-Source: ACJfBouRKfwgedWn743bo9nNfI+LaIbCW6nk5j3F3MZpGDL7Zt1mB8wWXAaKxUu4b7UVGq61Sj4G X-Received: by 10.80.219.69 with SMTP id b5mr8439548edl.218.1513831931734; Wed, 20 Dec 2017 20:52:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513831931; cv=none; d=google.com; s=arc-20160816; b=xo5XKZLDNJzCjEoVKHHfmM/7PR0C0XrPdw43Vo/k/aqbEKQasNAFsp5uQHNrnvKvQb 9FU12iPTTskb75AaNwzFoZbGMRdxIucrmn96F7IJpDpN8gzaRyfyb9WB7Oj2cHwzXktx Vttryn/aWjSLywvUpeysv7PSgoQ1m+UdcZ3RpSu9vu2BBNzLwUkeGbD+U80xOkqddqzx bEjmlrdBf7aTN3wfr4w+e5c+iv3GgPgeXvCU+OSQg9Q+wth5XV/qxyDejlaZ2LovI5hT emy6eGF2bdmDuBfO8VnrDIWE3bqCKYGxk/knPNPDeY04Dg5FYyYcEYbF6+QZf9a0euPa e+XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :dkim-filter:arc-authentication-results; bh=kWkVEOQEiFQACcogV+ykFaxtKkbK1x+E6sxG5v05p7U=; b=GM84fxkxcHMXmyZDe50SUwc+UBWWprxuxMUQ71zy+TjYbNqHVhCwMuTjxCplbyjP+/ Png7Letyw+OuFEfPd+eYqTHhVaWckdxQT2XhFdOpMlaTtvA3429fyBz2GHyV1NuasmFl injYdhozcJUnw05pJWKBroFGOO1Ny+CSOtvguonzox+TNkzA1v85c/pyW0HFhM4RPcUq 9vXLYbxlGCPavdGn7D5BVjvWz/+liAiXmoS2B//Zws304um2qR9nDdPigb8mfGDE02ls XUKFF3suRNb5PSURN+PtuRU9jdejBixg2sZXySJncg61UE0eZI2O7ZGQcCAUE05/HVj4 b0Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=Rxl3ZdOZ; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id 62si3225713edy.483.2017.12.20.20.52.11; Wed, 20 Dec 2017 20:52:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=Rxl3ZdOZ; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 3A17AC21F5D; Thu, 21 Dec 2017 04:52:09 +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)