From patchwork Thu Jun 23 17:50:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 2239 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id A1F5C23F7C for ; Thu, 23 Jun 2011 17:51:07 +0000 (UTC) Received: from mail-qy0-f173.google.com (mail-qy0-f173.google.com [209.85.216.173]) by fiordland.canonical.com (Postfix) with ESMTP id 7560AA18657 for ; Thu, 23 Jun 2011 17:51:07 +0000 (UTC) Received: by mail-qy0-f173.google.com with SMTP id 10so3972692qyk.11 for ; Thu, 23 Jun 2011 10:51:07 -0700 (PDT) Received: by 10.229.117.95 with SMTP id p31mr1816682qcq.97.1308851467136; Thu, 23 Jun 2011 10:51:07 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.229.230.139 with SMTP id jm11cs25962qcb; Thu, 23 Jun 2011 10:51:06 -0700 (PDT) Received: by 10.216.60.75 with SMTP id t53mr1503092wec.3.1308851466155; Thu, 23 Jun 2011 10:51:06 -0700 (PDT) Received: from mail-wy0-f178.google.com (mail-wy0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id h62si4322359wed.98.2011.06.23.10.51.05 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Jun 2011 10:51:06 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of dave.martin@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of dave.martin@linaro.org) smtp.mail=dave.martin@linaro.org Received: by wya21 with SMTP id 21so1766652wya.37 for ; Thu, 23 Jun 2011 10:51:05 -0700 (PDT) Received: by 10.227.127.149 with SMTP id g21mr1747334wbs.17.1308851465702; Thu, 23 Jun 2011 10:51:05 -0700 (PDT) Received: from e200948.peterhouse.linaro.org (fw-lnat.cambridge.arm.com [217.140.96.63]) by mx.google.com with ESMTPS id fi5sm1403937wbb.39.2011.06.23.10.51.04 (version=SSLv3 cipher=OTHER); Thu, 23 Jun 2011 10:51:04 -0700 (PDT) From: Dave Martin To: linux-arm-kernel@lists.infradead.org Cc: patches@linaro.org, Eric Miao Subject: [PATCH v3 02/40] Subject: ARM: assembler.h: Add string declaration macro Date: Thu, 23 Jun 2011 18:50:10 +0100 Message-Id: <1308851448-25139-3-git-send-email-dave.martin@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1308851448-25139-1-git-send-email-dave.martin@linaro.org> References: <1308851448-25139-1-git-send-email-dave.martin@linaro.org> Declaring strings in assembler source involves a certain amount of tedious boilerplate code in order to annotate the resulting symbol correctly. Encapsulating this boilerplate in a macro should help to avoid some duplication and the occasional mistake. Signed-off-by: Dave Martin --- arch/arm/include/asm/assembler.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index bc2d2d7..9e1e952 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h @@ -290,3 +290,11 @@ .macro ldrusr, reg, ptr, inc, cond=al, rept=1, abort=9001f usracc ldr, \reg, \ptr, \inc, \cond, \rept, \abort .endm + +/* Utility macro for declaring string literals */ + .macro string name:req, string + .type \name , #object +\name: + .asciz "\string" + .size \name , . - \name + .endm