From patchwork Thu May 23 15:05:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 17135 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f200.google.com (mail-qc0-f200.google.com [209.85.216.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 461072395B for ; Thu, 23 May 2013 15:07:53 +0000 (UTC) Received: by mail-qc0-f200.google.com with SMTP id n10sf4362168qcx.3 for ; Thu, 23 May 2013 08:06:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=pbZPAZpyR+T8QmKYlHA2GMTY/bg4ZaNN+ame7XLjDcQ=; b=SqmnoGV2DulIWIV35Opnvj3kOynNPn22Kbm786xfsr7KZvFt0xN/f3T5hf27n8g3k1 mZT629txLN3LIAnLB9hxrkZz9TSRinD6RyQtE7aRJMqTysE2sHZnNwpGWQbRKJo3oMLN dIc4rWCUJj3XXNOrQiB5VwvPxP0N43583+6M5Hp/WUtmx6InmYOGzGirgVSe5QtHBn4o f8D0SGtgz5SYW6vEiQIBh+dQBe5fQfJZdKzCJV8yjNBbb1pFAzAAKoKwPxEv5V5GTPrS N/ehVZEF3UTh2OLPaNDPn6/PuPndZVjzUqNFZ5z3I5BNbMuml4QRPIr1yMdrCT9JUzLG A5zg== X-Received: by 10.236.198.168 with SMTP id v28mr6177455yhn.10.1369321617914; Thu, 23 May 2013 08:06:57 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.27.161 with SMTP id u1ls1544581qeg.57.gmail; Thu, 23 May 2013 08:06:57 -0700 (PDT) X-Received: by 10.52.111.202 with SMTP id ik10mr4728677vdb.41.1369321617682; Thu, 23 May 2013 08:06:57 -0700 (PDT) Received: from mail-ve0-x22a.google.com (mail-ve0-x22a.google.com [2607:f8b0:400c:c01::22a]) by mx.google.com with ESMTPS id os3si6574478vcb.69.2013.05.23.08.06.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 May 2013 08:06:57 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22a is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::22a; Received: by mail-ve0-f170.google.com with SMTP id 15so2511103vea.1 for ; Thu, 23 May 2013 08:06:57 -0700 (PDT) X-Received: by 10.52.176.65 with SMTP id cg1mr4743392vdc.1.1369321617540; Thu, 23 May 2013 08:06:57 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.126.138 with SMTP id c10csp56065vcs; Thu, 23 May 2013 08:06:55 -0700 (PDT) X-Received: by 10.180.109.48 with SMTP id hp16mr25387406wib.24.1369321527949; Thu, 23 May 2013 08:05:27 -0700 (PDT) Received: from mail-we0-x22c.google.com (mail-we0-x22c.google.com [2a00:1450:400c:c03::22c]) by mx.google.com with ESMTPS id ga13si14639962wic.99.2013.05.23.08.05.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 May 2013 08:05:27 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::22c is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=2a00:1450:400c:c03::22c; Received: by mail-we0-f172.google.com with SMTP id w62so2083331wes.31 for ; Thu, 23 May 2013 08:05:27 -0700 (PDT) X-Received: by 10.181.12.1 with SMTP id em1mr44462180wid.4.1369321527333; Thu, 23 May 2013 08:05:27 -0700 (PDT) Received: from belegaer.uk.xensource.com. (firewall.ctxuk.citrix.com. [46.33.159.2]) by mx.google.com with ESMTPSA id d10sm36282948wik.0.2013.05.23.08.05.24 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 May 2013 08:05:26 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: Stefano.Stabellini@eu.citrix.com, ian.campbell@citrix.com, patches@linaro.org, Julien Grall Subject: [PATCH] xen/arm: check string format for early_printk Date: Thu, 23 May 2013 16:05:18 +0100 Message-Id: <1369321518-26030-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQmqnniB0dKyxNMYv5G+hF1tpUDgx6Vdm/dbyoPykt8cQCKkeo8Enl1YLcOr+M4Ha3Q7GYp2 X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22a is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Signed-off-by: Julien Grall --- xen/include/asm-arm/early_printk.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early_printk.h index b72fce7..03ead23 100644 --- a/xen/include/asm-arm/early_printk.h +++ b/xen/include/asm-arm/early_printk.h @@ -14,13 +14,19 @@ #ifdef EARLY_PRINTK -void early_printk(const char *fmt, ...); -void early_panic(const char *fmt, ...) __attribute__((noreturn)); +void early_printk(const char *fmt, ...) + __attribute__((format (printf, 1, 2))); +void early_panic(const char *fmt, ...) __attribute__((noreturn)) + __attribute__((format (printf, 1, 2))); #else -static inline void early_printk(const char *fmt, ...) {} -static inline void __attribute__((noreturn)) early_panic(const char *fmt, ...) {while(1);} +static inline void early_printk(const char *fmt, ...) + __attribute__((format (printf, 1, 2))) +{} +static inline void __attribute__((noreturn)) early_panic(const char *fmt, ...) + __attribute__((format (printf, 1, 2))) +{while(1);} #endif