From patchwork Thu Dec 12 00:47:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1208061 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="VHRD00/J"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFcb28yVz9sR7 for ; Thu, 12 Dec 2019 11:51:59 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E0C76814ED; Thu, 12 Dec 2019 01:49:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="VHRD00/J"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3351D816F7; Thu, 12 Dec 2019 01:49:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 84BB3816F7 for ; Thu, 12 Dec 2019 01:49:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd42.google.com with SMTP id v18so874892iol.2 for ; Wed, 11 Dec 2019 16:49:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JdRFQgt9/2tv0jRWjq+HOGRx5TlojyfrGux4qiBB5jQ=; b=VHRD00/Jtke+YpE7KE6/f5sQq0BiylOeSQKIaTJgo+t0D2drBi0tR3dBnsX+10QCSr WZ5yoHZsb4lIUtiIt+0Z92aBBC/YNJXVlrRWswDgUcdn5Hw+51xpxCGoShG8tcRQXbLo UnO2l8m1V2gD48Gr8G1YnTHuvOhPu79wTpA3Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JdRFQgt9/2tv0jRWjq+HOGRx5TlojyfrGux4qiBB5jQ=; b=oDr+k+jcJFV/7EkdSZs59uWEmSAyhdfQ2GECV1a5WlAjSTAAXTNbx8ai9Ann/uFfP/ xhAUc9UlQ0FghaGXlwBlsrmZeBNMu+PfVnQTXNs0mzmosDzadxi03h6EXwMgf+K7oJ9K kyX48HZPjnvtRuQeybVciE1eqm9Y7a5X2YxhCU+o0liFfnuNcLtKZjaWF8znTIR6pgZw Vjo0KiJYuLVF+9DHXUS+SWg3GG0PA9+GxH3XusFgouX2rQtrBsMjzV3HP2DL4zzZWHRA 0F1UGlk0NpW+oOuLAH34EEiGGf6wR8OAwXOhjrtKu+Y+xMdHm4kwJytJJo3rzIWRP82D cFsw== X-Gm-Message-State: APjAAAX/aujtywiFy2YpraGxsTsbYTM56LCAZlfckuu+snoEgU89LgdA jz7XF25HFqgX3uH5gwkVQfrLgfVaeO4= X-Google-Smtp-Source: APXvYqxbONCN9bAnkETmBNDKiViWrUKOktsKmJoP0PX/jEuGOFwupV6zb+lFP6eFeRRl/ginKw6v0Q== X-Received: by 2002:a02:334b:: with SMTP id k11mr5800599jak.51.1576111757208; Wed, 11 Dec 2019 16:49:17 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.49.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:49:16 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 32/35] common: Move ROUND() into kernel.h Date: Wed, 11 Dec 2019 17:47:51 -0700 Message-Id: <20191212004755.11091-16-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Rini , Joe Hershberger , Boris Brezillon Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean Move this macro in with all the other rounding macros. Signed-off-by: Simon Glass --- include/common.h | 2 -- include/linux/kernel.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/common.h b/include/common.h index 4110f75a93..997828311e 100644 --- a/include/common.h +++ b/include/common.h @@ -71,8 +71,6 @@ /* Put only stuff here that the assembler can digest */ -#define ROUND(a,b) (((a) + (b) - 1) & ~((b) - 1)) - /* Pull in stuff for the build system */ #ifdef DO_DEPS_ONLY # include diff --git a/include/linux/kernel.h b/include/linux/kernel.h index fefbc07375..b88c210065 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -69,6 +69,8 @@ #define DIV_ROUND_UP_ULL(ll, d) DIV_ROUND_DOWN_ULL((ll) + (d) - 1, (d)) +#define ROUND(a, b) (((a) + (b) - 1) & ~((b) - 1)) + #if BITS_PER_LONG == 32 # define DIV_ROUND_UP_SECTOR_T(ll,d) DIV_ROUND_UP_ULL(ll, d) #else