From patchwork Tue Apr 10 11:14:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 10332841 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BC1046028A for ; Tue, 10 Apr 2018 11:14:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAC3628DA2 for ; Tue, 10 Apr 2018 11:14:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FCCF28DA5; Tue, 10 Apr 2018 11:14:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 12D7328DA2 for ; Tue, 10 Apr 2018 11:14:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8661689DA6; Tue, 10 Apr 2018 11:14:28 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [109.228.58.192]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2C28889DA6 for ; Tue, 10 Apr 2018 11:14:26 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 11320988-1500050 for multiple; Tue, 10 Apr 2018 12:14:18 +0100 Received: by haswell.alporthouse.com (sSMTP sendmail emulation); Tue, 10 Apr 2018 12:14:18 +0100 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Tue, 10 Apr 2018 12:14:17 +0100 Message-Id: <20180410111417.27563-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410091435.11621-1-chris@chris-wilson.co.uk> References: <20180410091435.11621-1-chris@chris-wilson.co.uk> X-Originating-IP: 78.156.65.138 X-Country: code=GB country="United Kingdom" ip=78.156.65.138 Subject: [Intel-gfx] [PATCH v2] drm/i915/guc: Replace %phn with %ph X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP %phn is not a valid specifier, and the trailing 'n' is being eaten by the format-specifier and defaulting to the ' ' separator. Avoid angering smatch by using the unknown specifier, and use the default we expect. drivers/gpu/drm/i915/intel_guc_ct.c:616 ctb_read() warn: '%ph' cannot be followed by 'n' drivers/gpu/drm/i915/intel_guc_ct.c:616 ctb_read() warn: '%ph' cannot be followed by 'n' drivers/gpu/drm/i915/intel_guc_ct.c:616 ctb_read() warn: '%ph' cannot be followed by 'n' drivers/gpu/drm/i915/intel_guc_ct.c:669 ct_handle_response() warn: '%ph' cannot be followed by 'n' drivers/gpu/drm/i915/intel_guc_ct.c:679 ct_handle_response() warn: '%ph' cannot be followed by 'n' drivers/gpu/drm/i915/intel_guc_ct.c:693 ct_handle_response() warn: '%ph' cannot be followed by 'n' drivers/gpu/drm/i915/intel_guc_ct.c:707 ct_handle_response() warn: '%ph' cannot be followed by 'n' drivers/gpu/drm/i915/intel_guc_ct.c:727 ct_process_request() warn: '%ph' cannot be followed by 'n' drivers/gpu/drm/i915/intel_guc_ct.c:803 ct_handle_request() warn: '%ph' cannot be followed by 'n' Signed-off-by: Chris Wilson Cc: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Reviewed-by: Michal Wajdeczko --- drivers/gpu/drm/i915/intel_guc_ct.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_guc_ct.c b/drivers/gpu/drm/i915/intel_guc_ct.c index 990141d5f195..371b6005954a 100644 --- a/drivers/gpu/drm/i915/intel_guc_ct.c +++ b/drivers/gpu/drm/i915/intel_guc_ct.c @@ -361,7 +361,7 @@ static int ctb_write(struct intel_guc_ct_buffer *ctb, (want_response ? GUC_CT_MSG_SEND_STATUS : 0) | (action[0] << GUC_CT_MSG_ACTION_SHIFT); - CT_DEBUG_DRIVER("CT: writing %*phn %*phn %*phn\n", + CT_DEBUG_DRIVER("CT: writing %*ph %*ph %*ph\n", 4, &header, 4, &fence, 4 * (len - 1), &action[1]); @@ -613,7 +613,7 @@ static int ctb_read(struct intel_guc_ct_buffer *ctb, u32 *data) /* message len with header */ len = ct_header_get_len(data[0]) + 1; if (unlikely(len > (u32)available)) { - DRM_ERROR("CT: incomplete message %*phn %*phn %*phn\n", + DRM_ERROR("CT: incomplete message %*ph %*ph %*ph\n", 4, data, 4 * (head + available - 1 > size ? size - head : available - 1), &cmds[head], @@ -626,7 +626,7 @@ static int ctb_read(struct intel_guc_ct_buffer *ctb, u32 *data) data[i] = cmds[head]; head = (head + 1) % size; } - CT_DEBUG_DRIVER("CT: received %*phn\n", 4 * len, data); + CT_DEBUG_DRIVER("CT: received %*ph\n", 4 * len, data); desc->head = head * 4; return 0; @@ -666,7 +666,7 @@ static int ct_handle_response(struct intel_guc_ct *ct, const u32 *msg) /* Response payload shall at least include fence and status */ if (unlikely(len < 2)) { - DRM_ERROR("CT: corrupted response %*phn\n", 4 * msglen, msg); + DRM_ERROR("CT: corrupted response %*ph\n", 4 * msglen, msg); return -EPROTO; } @@ -676,7 +676,7 @@ static int ct_handle_response(struct intel_guc_ct *ct, const u32 *msg) /* Format of the status follows RESPONSE message */ if (unlikely(!INTEL_GUC_MSG_IS_RESPONSE(status))) { - DRM_ERROR("CT: corrupted response %*phn\n", 4 * msglen, msg); + DRM_ERROR("CT: corrupted response %*ph\n", 4 * msglen, msg); return -EPROTO; } @@ -690,7 +690,7 @@ static int ct_handle_response(struct intel_guc_ct *ct, const u32 *msg) continue; } if (unlikely(datalen > req->response_len)) { - DRM_ERROR("CT: response %u too long %*phn\n", + DRM_ERROR("CT: response %u too long %*ph\n", req->fence, 4 * msglen, msg); datalen = 0; } @@ -704,7 +704,7 @@ static int ct_handle_response(struct intel_guc_ct *ct, const u32 *msg) spin_unlock(&ct->lock); if (!found) - DRM_ERROR("CT: unsolicited response %*phn\n", 4 * msglen, msg); + DRM_ERROR("CT: unsolicited response %*ph\n", 4 * msglen, msg); return 0; } @@ -713,7 +713,7 @@ static void ct_process_request(struct intel_guc_ct *ct, { struct intel_guc *guc = ct_to_guc(ct); - CT_DEBUG_DRIVER("CT: request %x %*phn\n", action, 4 * len, payload); + CT_DEBUG_DRIVER("CT: request %x %*ph\n", action, 4 * len, payload); switch (action) { case INTEL_GUC_ACTION_DEFAULT: @@ -724,7 +724,7 @@ static void ct_process_request(struct intel_guc_ct *ct, default: fail_unexpected: - DRM_ERROR("CT: unexpected request %x %*phn\n", + DRM_ERROR("CT: unexpected request %x %*ph\n", action, 4 * len, payload); break; } @@ -800,7 +800,7 @@ static int ct_handle_request(struct intel_guc_ct *ct, const u32 *msg) request = kmalloc(sizeof(*request) + 4 * msglen, GFP_ATOMIC); if (unlikely(!request)) { - DRM_ERROR("CT: dropping request %*phn\n", 4 * msglen, msg); + DRM_ERROR("CT: dropping request %*ph\n", 4 * msglen, msg); return 0; /* XXX: -ENOMEM ? */ } memcpy(request->msg, msg, 4 * msglen);