From patchwork Thu Jun 11 11:27:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 483068 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 8787C140291 for ; Thu, 11 Jun 2015 21:29:32 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=rasmusvillemoes.dk header.i=@rasmusvillemoes.dk header.b=eiwuXAjN; dkim-atps=neutral Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 61D931A0E71 for ; Thu, 11 Jun 2015 21:29:32 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=rasmusvillemoes.dk header.i=@rasmusvillemoes.dk header.b=eiwuXAjN; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-lb0-x22c.google.com (mail-lb0-x22c.google.com [IPv6:2a00:1450:4010:c04::22c]) (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 816C91A09BF for ; Thu, 11 Jun 2015 21:28:08 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=rasmusvillemoes.dk header.i=@rasmusvillemoes.dk header.b=eiwuXAjN; dkim-atps=neutral Received: by lbcue7 with SMTP id ue7so2623105lbc.0 for ; Thu, 11 Jun 2015 04:28:04 -0700 (PDT) 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=wT2EC5wuc09Y0rtUfcn/tuYJOdfiuJjTs+RAKD4rOrE=; b=eiwuXAjN3+lF4416AYNTZlBVBZvwSD2ObNMZNnmXgM18c622ix4VIjCQ9acO9RSFlM JbQPJHegSk21rbR7PVdUb78V/NsGpy9PTxF5723iMEhi2ITGaZKzG2Uz8zNN91tJCelF cIXkzJ+D92SJiBZFpKFAPMWnrq/8Fqp0E8l4I= 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=wT2EC5wuc09Y0rtUfcn/tuYJOdfiuJjTs+RAKD4rOrE=; b=kyV6sKIGniRrudQTjqxosXckRTkM7FdzVlMZw1YSByh0K3VB31gE0L18gI0rzaZAQh lx4g+F3ARQ+oGnPF7KRuG67rOUIy+mWavbvGa1/v6F/6HO2qnjIwu86jhu7pZBorNuN1 I4zkERMTjGHb6IKjPaCLEFbCvN7ffmm1fk913bBCdcdWyDrm+bVI5vc0tPOxlMSyVKxF AplMWuqZDAi5et9UGNVsJsuAXhwCqa3S1Sb20FXNRQhO0V+QzQX5XeFSAxVaWE4kZM9X hpGpkIyFE/fDU7nV7Bp1MnBTDUpR00jBvhOo+nqJV7Upd6lO1gjOl2QmFtUNBshidlb/ fA2Q== X-Gm-Message-State: ALoCoQkaEGfQuvSyxY9zUWeDwTvSaCSJNUx6JoP1YoGix6hlL2drvCtuGIQpzS0l3EaDi81W6BSV X-Received: by 10.112.132.9 with SMTP id oq9mr9337520lbb.26.1434022084349; Thu, 11 Jun 2015 04:28:04 -0700 (PDT) Received: from spencer.imf.au.dk ([130.225.20.51]) by mx.google.com with ESMTPSA id w9sm96074lbm.24.2015.06.11.04.28.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jun 2015 04:28:03 -0700 (PDT) From: Rasmus Villemoes To: Ian Munsie , Michael Neuling Subject: [PATCH v3 1/2] cxl: Add explicit precision specifiers Date: Thu, 11 Jun 2015 13:27:51 +0200 Message-Id: <1434022072-31754-1-git-send-email-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1424751969-sup-7377@delenn.ozlabs.ibm.com> References: <1424751969-sup-7377@delenn.ozlabs.ibm.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joe Perches , Rasmus Villemoes , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org 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 --- v3: same as v2, just resending along with a followup patch doing what Joe suggested. 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);