From patchwork Mon Feb 23 10:55:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 442417 X-Patchwork-Delegate: michael@ellerman.id.au Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3E39A14017E for ; Mon, 23 Feb 2015 21:56:35 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 226611A129E for ; Mon, 23 Feb 2015 21:56:35 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-la0-x22d.google.com (mail-la0-x22d.google.com [IPv6:2a00:1450:4010:c03::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 5F1031A0BF3 for ; Mon, 23 Feb 2015 21:55:59 +1100 (AEDT) Received: by labge10 with SMTP id ge10so17435853lab.12 for ; Mon, 23 Feb 2015 02:55:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=32WmdXlVrmNkBM8KSGvw5wLJV4jlIiMUl3VBXgW/H0I=; b=amMWEF8fkd0kZEkXYx3juyd2in7PPZSwrJIGNiCP8NWDa5atnLhnlph9mkKG3s9FDC 0ar873sm1fgBnpkEzplCi2HkhD5E7Kk0T8zg5naHExgEBlChTMCuWZENXuuqCGW8iKfG bsjRLUjhadQO3aPIm1k2o9cqGkgeNgUcpJ4mM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=32WmdXlVrmNkBM8KSGvw5wLJV4jlIiMUl3VBXgW/H0I=; b=mAHmv7DLWFl7lEFOMxJOMgbiYZ3fxcP66+bYeqXzb4Sl0ffCBY7apwGyFURbc/TiM+ xNFjwMSjhm+eQZrUK2Kdod0RZxp791Q/uAokN9IqiqqSim9Hnvic3Te2yR4Tkq382eEK 2fxVrX/PyWMMlJBTdeBAB4DNxcGcUOFhuZwxcsZ6oMeEdKVEWXsnxth7/BDoMOU2bTLU MdDR4ndOreBVhW7RfVqeTnV9Di+AaNVB8EfT0UeilG79xREXFotsuWiO8T9aqtbX1WZR /+RQ+dW6Vg83+LT7NaUsR2FuGK9GwZ/1351zWYNFkjRg26aEIRMI6ObUGCdFcT3rbJkM 4Hog== X-Gm-Message-State: ALoCoQm6T51SqAehVYWvSfLmx5MAEDqhKZ3gbpuzIo5wWzp0UF7WwlcJ9Ou1hJ0BaUq220+sAjzN X-Received: by 10.112.8.68 with SMTP id p4mr2011970lba.37.1424688955676; Mon, 23 Feb 2015 02:55:55 -0800 (PST) Received: from spencer.imf.au.dk ([130.225.20.51]) by mx.google.com with ESMTPSA id fb5sm7113643lbc.34.2015.02.23.02.55.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Feb 2015 02:55:54 -0800 (PST) From: Rasmus Villemoes To: Ian Munsie , Michael Neuling Subject: [PATCH v2] cxl: Add explicit precision specifiers Date: Mon, 23 Feb 2015 11:55:34 +0100 Message-Id: <1424688935-6645-1-git-send-email-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1424662685-sup-6648@delenn.ozlabs.ibm.com> References: <1424662685-sup-6648@delenn.ozlabs.ibm.com> Cc: Joe Perches , linuxppc-dev@lists.ozlabs.org, Rasmus Villemoes , linux-kernel@vger.kernel.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" C99 says that a precision given as simply '.' with no following digits or * should be interpreted as 0. The kernel's printf implementation, however, treats this case as if the precision was omitted. C99 also says that if both the precision and value are 0, no digits should be printed. Even if the kernel followed C99 to the letter, I don't think that would be particularly useful in these cases. For consistency with most other format strings in the file, use an explicit precision of 16 and add a 0x prefix. Signed-off-by: Rasmus Villemoes Acked-by: Ian Munsie --- What Joe said is of course technically true, but 24 of the %.16llx matches are in drivers/misc/cxl/, so internal consistency wins. drivers/misc/cxl/irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/cxl/irq.c b/drivers/misc/cxl/irq.c index c8929c526691..4b73f4b9e7f1 100644 --- a/drivers/misc/cxl/irq.c +++ b/drivers/misc/cxl/irq.c @@ -147,7 +147,7 @@ static irqreturn_t cxl_irq(int irq, void *data, struct cxl_irq_info *irq_info) if (dsisr & CXL_PSL_DSISR_An_PE) return handle_psl_slice_error(ctx, dsisr, irq_info->errstat); if (dsisr & CXL_PSL_DSISR_An_AE) { - pr_devel("CXL interrupt: AFU Error %.llx\n", irq_info->afu_err); + pr_devel("CXL interrupt: AFU Error 0x%.16llx\n", irq_info->afu_err); if (ctx->pending_afu_err) { /* @@ -158,7 +158,7 @@ static irqreturn_t cxl_irq(int irq, void *data, struct cxl_irq_info *irq_info) * probably best that we log them somewhere: */ dev_err_ratelimited(&ctx->afu->dev, "CXL AFU Error " - "undelivered to pe %i: %.llx\n", + "undelivered to pe %i: 0x%.16llx\n", ctx->pe, irq_info->afu_err); } else { spin_lock(&ctx->lock);