From patchwork Wed Aug 28 05:20:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1154155 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::540; helo=mail-ed1-x540.google.com; envelope-from=swupdate+bncbcxploxj6ikrbfu6tdvqkgqee4q5ewa@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b="m1R4xEiY"; dkim-atps=neutral Received: from mail-ed1-x540.google.com (mail-ed1-x540.google.com [IPv6:2a00:1450:4864:20::540]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46JDbK6flNz9sDB for ; Wed, 28 Aug 2019 15:20:28 +1000 (AEST) Received: by mail-ed1-x540.google.com with SMTP id y15sf924348edu.19 for ; Tue, 27 Aug 2019 22:20:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1566969622; cv=pass; d=google.com; s=arc-20160816; b=QlT8gvdA6qPgRct/0LQ0evJpoNKiJoM0rMqydB6OkHBx/lWgStnoYPdKQt+K+gnXQp kdfK6y/xdOOC0Fuc9pbVuOkaI4zRfjCtxDpo1nsAhWGpXVsL3DhFCPLrcQzOrL8siMBR QAJKuK8zXRLMsGRzIeb+nLDzj0ha/dTkBAnfkUVHLknJzTKVo3nE8UYXsNyrqQp8ETXQ +j5Um7oMDnItVGD1MotoSLsD9J0yJhMiIZdIUDIrtS6QN6+1Co5bjZJt9AZBWYVGaWrE nQrgj5IMo/0JDproVFrCknW8IDqS/3rlN1tjgE+FR+dwfP5MmIZ/Eg61ylz6nnhkel/F mSFw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:mime-version:sender:dkim-signature; bh=6EAKhM4bdnlX884OeStRGzl811Giyezm+YHtOdZtzOE=; b=v9SU+riGfBBseD+YP9whQEeyTSCTzrBXw1tPBqwQb+BV0AdlcLSaWfTrBaM4YRMMTw UGb5xiL1aryiozvEczY6/mK0qD5pBqSifkFgd9Bk+n8G/bCAqJdgVuOwOY+ttX2krlaS uREH+a81WPxLHgZUJrMNsMcGMWmhCrvwejdmkUlDmW+1wMw3F7exHDuOLf6vuwrgov/Y /D5jdCCNUEcIdsK8YLX0rtkxw3JpI/iPrglJ+5vNGfapMjGFz93qaphSLIVMnlfR66TX oYwaItLHCno5XwSMvSW/Y33KfXBkKOW/RK7IAMRWRLHQGVDYy1c7joykX/Ny80E0BYBy d/eQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=6EAKhM4bdnlX884OeStRGzl811Giyezm+YHtOdZtzOE=; b=m1R4xEiYVDnqhKclO5TXR0wmBMt7WBKPtiaghN3TPiojloc4/mhJFYCSc7iu7nv+jR kBMPVyRGeCfHlQTnnmneu70BooYUi8t/P6VYhHyEPN4AKQbZoj+hiZBOloKVBbkKCIJ1 tbq0/9MpfnLTt9wrnJfvHw5CmVvKffAVa6DknduLsyMkxHytqJyki0qFa6GLZeqkKUxE mgzKnCz0zB1Fdlk3sc8qxxeAEDcudnEbMyJ7IHwuXPEQhpq2KxJxrTru8Ieil4wL9Yf9 pvN6EBlc3JNsXjIYaM+h+Ae6+Nm9YDl12kqSTV2fd+fsLX1g+wZT5h9kF1edsJMjcu4a pBFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:from:to:cc:subject:date :message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=6EAKhM4bdnlX884OeStRGzl811Giyezm+YHtOdZtzOE=; b=J0ITJXqVdriUKV8G7YSYsWyRU0ywBpRwnFG2FFJLF1nZ0l9N1g/nRof6w6F8IEm04Y j0g9jSjyOiZRk9u8qzj4IIakmfVH9nxvgdj1Wicf9bNRD/7if1PMu+4UvJmfeorY4UNM 8Qb27jxf6lnI1Ok3M7/hGyTrO8igsChLeLWh6g9qqQ4omrot/jH/m6bA5mLz+hDzjH2b ctQqo5tAe0NvT4bsISwS1qX65QcRRZIeuUMrwI5LdIyh9Dh/9YrsFD3mzoI9/e0hfv3h fbuuJtRH9TK+ElI+HQP3YcDHIi9vvN61JAFXv0UqJBX9otkc1Pm0Nu3xSrkmAYgv/JLO a+Ag== Sender: swupdate@googlegroups.com X-Gm-Message-State: APjAAAXmJMP1UtNTlv6Q9CteaPBqR84h3pzcdh8jlDtO6xjlOV6rkrRr 7vr4DdAt6cutSni7yK71vYU= X-Google-Smtp-Source: APXvYqyv2nO+31TaIahwG1u5Qp5ueXTPZ2ZIM9eG64fo5Y0Raa8VnI2+ajwhYD3HENTAnaG6lIaMeQ== X-Received: by 2002:a17:906:4b44:: with SMTP id j4mr1498497ejv.139.1566969622862; Tue, 27 Aug 2019 22:20:22 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 2002:a17:907:210f:: with SMTP id qn15ls476039ejb.2.gmail; Tue, 27 Aug 2019 22:20:22 -0700 (PDT) X-Received: by 2002:a17:906:4d87:: with SMTP id s7mr1524083eju.155.1566969622385; Tue, 27 Aug 2019 22:20:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566969622; cv=none; d=google.com; s=arc-20160816; b=FMgvjCAJ8ZDNDWMxpC/P21OKA7kGwRboysnlJh+BiO/u6JLiqjGD0taEOdWxp8TaLP /sv7DGHS5T5LXFPZelEA0UJTT/Dj6PBUiZ5UpttdFP5Cx08PBj1SM0fxMexHkVi28H+1 q2HcJJC14J2v1luUgxzFFHTxB3D593x0Y6dyZRZxjM/+734cluPKx8Kd6lMsYVqvnU4c +sQHpE26WJxYEQrt3sTyn76H8uIW2Xnw18ZUca9Y/3HkdVwTkravTTK58k9ySht2ri7+ NDZ1YKkRJNrCjIzgASx1AbUt7KxbQ42ynDgZQgaoLDYLRh35OWstJApt487P1z0zGQe0 eYJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=Dzq3d2LNf8xPX4dcgpS5w7ZjBFN6riEixTzgptrFV2g=; b=WjToy2vgpViVkQLtoLJtvSf7zhC67+/P1ZVCnrkzCbLHy4HYWxwYTXTHlFfcepXJGY rCN49SrollRPSQDoVJUH/bmtnTcV7TXobg7Myl9UTj8HOKYt/N9jsx82gLnRg8Vgmi4A 885ayoBCFwAK6ppxF3OGUcQEiYJOsCwXPh3/aTqpnUgSdF1Cf3rPy3JkRb4mCcXONNge 8lu0wY2ezws5miQf+bOrabAkSK0hFg5fte1LgIrJ8sZLTXN+Y/cWpoZZMgtZ7KnVaij6 73utN3Ev1svI6jQzkEK3+XEUoRNSasJ2QZ5DHbZtma9vg8YiHnMGM6EbamoXhCUjppL6 4dzg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [2001:a60:0:28:0:1:25:1]) by gmr-mx.google.com with ESMTPS id l17si59923ejg.1.2019.08.27.22.20.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Aug 2019 22:20:22 -0700 (PDT) Received-SPF: neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=2001:a60:0:28:0:1:25:1; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46JDbB0JF2z1rQBp; Wed, 28 Aug 2019 07:20:22 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46JDbB0534z1qqkx; Wed, 28 Aug 2019 07:20:22 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id OMDl9q7PXCcM; Wed, 28 Aug 2019 07:20:20 +0200 (CEST) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Wed, 28 Aug 2019 07:20:20 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 38BFD45405D5; Wed, 28 Aug 2019 07:20:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y1I1jy3M3HoV; Wed, 28 Aug 2019 07:20:16 +0200 (CEST) Received: from papero.fritz.box (papero.fritz.box [192.168.178.132]) by babic.homelinux.org (Postfix) with ESMTP id 7A08C45402E0; Wed, 28 Aug 2019 07:20:16 +0200 (CEST) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH 2/4] util: add macro to align a buffer Date: Wed, 28 Aug 2019 07:20:12 +0200 Message-Id: <20190828052014.2466-2-sbabic@denx.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190828052014.2466-1-sbabic@denx.de> References: <20190828052014.2466-1-sbabic@denx.de> X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , It is a generic macro but not exported in standard headers. Added as own macro. Signed-off-by: Stefano Babic --- include/util.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/util.h b/include/util.h index a4edbef..662feb9 100644 --- a/include/util.h +++ b/include/util.h @@ -24,6 +24,7 @@ #define AES_BLOCK_SIZE 16 #define HWID_REGEXP_PREFIX "#RE:" +#define SWUPDATE_ALIGN(A,S) (((A) + (S) - 1) & ~((S) - 1)) extern int loglevel;