Message ID | 20190604131516.13596-6-kishon@ti.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp5842258ili; Tue, 4 Jun 2019 06:17:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqw38/fAeRJzRGI9RIT5qoZBNtikHZwZl4umIeIGVpIW1n163Uu1TfSh2SAJ6poVt5coXG80 X-Received: by 2002:a62:bd0e:: with SMTP id a14mr38371761pff.44.1559654252863; Tue, 04 Jun 2019 06:17:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559654252; cv=none; d=google.com; s=arc-20160816; b=c9Zmugjji9M+BiWhKAzbJq/DLKxOxnT39b4ttC9GU52hiRdiAXlZd0O1Ldk4aAds0v gDqSm1sQ67tbOYPzIkq1fFljjOmsaFgf6bbjG6R9iW5Zh/lQT2AIZx4haccQmSCgTvu/ 6PxbuykJtvMlXW4EHum9N30aDjL2sdOIFcodQJnlQ+fjHecwITL/11J7O4+MedH/6CyY E/l0raSIf1y82RRYrgKo5wvfqAIKM0WvvBHzw9jwVsbQ1Mk4E0uG/4dg4TCWxLoaM3YU S2ldQc8NOVDt8SKhQ9hfxYfFauLuvsxFsThC+tqwSQ7EyfcXSAAWjcE57gzUutzXWzQB LPJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=gskYCXt69auxdl0gJm5PmVmDCrGNb92GxmcQN4v//vI=; b=dAXH2EHJSB44EFfeFgKGPqk7AWfI91bCCApQq7DI9FiZnUUUfdqzyebayb3f2fZXgv S3GEsgzess1EHIRtQD4YJ3RblznU0NrCXeiTjY9r7boc8NlkHAOtyJ2kiDLrWdTYyCB0 KybvCik9q/QRbARV1deiiyPvGesjWlko1xQvo4nDySEePSgOJKOK86uQ1CJ5kET/HHfF xyvaMrSR+54TKfo00T7NnO3pzAXm/xsSnSYzW/N0JXeZaPo25Q1fldJ1H3PtGEej5RyN ANTIANFJW2Ml6cYGpq19/ASV+5CphvOYJxbAycIrWGAU6RE4tMvJbXjRpTlTr4TsS/td yD2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=FZrwJCy0; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: <devicetree-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m9si22125445pjv.68.2019.06.04.06.17.32; Tue, 04 Jun 2019 06:17:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=FZrwJCy0; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727430AbfFDNRc (ORCPT <rfc822;steve.mcintyre@linaro.org> + 8 others); Tue, 4 Jun 2019 09:17:32 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:54854 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727480AbfFDNRb (ORCPT <rfc822; devicetree@vger.kernel.org>); Tue, 4 Jun 2019 09:17:31 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x54DHD1u027960; Tue, 4 Jun 2019 08:17:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1559654233; bh=gskYCXt69auxdl0gJm5PmVmDCrGNb92GxmcQN4v//vI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=FZrwJCy0oF0940yJ1Ges+n6/f/6gfkwi/N2rjMaSwcFAhzwrUyrlOK/UTy3CHL+b4 FfHYPO+7aXQbd9He0w5ngaEoaMUIH8tBK354E0FwyLdaZ3IDNCJllHtlFmT+4JIFrf SaqAqv6a8M87X221Mal/XQziW2sjRBOIqRkwxTXs= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x54DHDRb042475 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Jun 2019 08:17:13 -0500 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 4 Jun 2019 08:17:12 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 4 Jun 2019 08:17:12 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x54DGdGL098972; Tue, 4 Jun 2019 08:17:07 -0500 From: Kishon Vijay Abraham I <kishon@ti.com> To: Tom Joseph <tjoseph@cadence.com>, Bjorn Helgaas <bhelgaas@google.com>, Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Arnd Bergmann <arnd@arndb.de>, Gustavo Pimentel <gustavo.pimentel@synopsys.com> CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Frank Rowand <frowand.list@gmail.com>, Jingoo Han <jingoohan1@gmail.com>, <linux-pci@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-omap@vger.kernel.org>, <linux-rockchip@lists.infradead.org>, <linux-arm-kernel@lists.infradead.org>, Kishon Vijay Abraham I <kishon@ti.com> Subject: [RFC PATCH 05/30] linux/kernel.h: Add PTR_ALIGN_DOWN macro Date: Tue, 4 Jun 2019 18:44:51 +0530 Message-ID: <20190604131516.13596-6-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190604131516.13596-1-kishon@ti.com> References: <20190604131516.13596-1-kishon@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: <devicetree.vger.kernel.org> X-Mailing-List: devicetree@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 74b1ee9027f5..f5be987f1f95 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -34,6 +34,7 @@ #define ALIGN_DOWN(x, a) __ALIGN_KERNEL((x) - ((a) - 1), (a)) #define __ALIGN_MASK(x, mask) __ALIGN_KERNEL_MASK((x), (mask)) #define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) +#define PTR_ALIGN_DOWN(p, a) ((typeof(p))ALIGN_DOWN((unsigned long)(p), (a))) #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) /* generic data direction definitions */
Add a macro for aligning down a pointer. This is useful to get an aligned register address when a device allows only word access and doesn't allow half word or byte access. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> --- include/linux/kernel.h | 1 + 1 file changed, 1 insertion(+) -- 2.17.1