Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2177683ybv; Mon, 24 Feb 2020 00:25:15 -0800 (PST) X-Google-Smtp-Source: APXvYqxgBtMZ8xrqtC+csR0/mccsZMRmPTJVOBLhI+sD05vkAWq51lqAt80jHkwY69T8ZIdmS3/s X-Received: by 2002:a9d:7342:: with SMTP id l2mr39674077otk.98.1582532715540; Mon, 24 Feb 2020 00:25:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582532715; cv=none; d=google.com; s=arc-20160816; b=eXvKzvEkCm336C8zUjsQUxmwhw4zqX29T3axixspcgIPB7yvaHW5oEn6sWm6Nb9A+t 530ddcGQNWNorLzSf6AJdIlu8TFHEJaHGCccSKTVDi7diK1ru1LJA9KORXb+rSFW4Jt4 88WWkrENI8eqxm6WBdPwGan8/JPc0UjyRV0Rk9JbSdjctumOTupM2oVfbX7M4cPWd6ft iSLI1tkjNiYkGQL0JZDRt1U2NkCFc0h6uXcrbZ611dgZ7EYAJrOG67pi513DASp2kRKH XcoUJib3rIHh+N55Bw+JRJTn61nMv78vB4GsRXiCOM4Y9bQFoUh9ZbfHOO8S+76r6ksM skJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=lhlKxXAIvhacc2714cSl7CgN47VyLjNdXE5+TJ+pWfc=; b=N6Q4bg5/ED3IKrd65Hl6lu8KVm3i3CsTVpBldBr8xnNFAClsEfA0+ooFvb4jSf14Ke 5feYxSFFHzCmB1HR6SaPC8VAQiOE6GpcFsgjKPsDh1FgaiElFCf0kq5iRuCMPUpICb26 4D3X921yjmt+ZjZUediMduU6RBrs5wNv7MmUttvRusDHNdiviu4zIRBqfdKnrxplY0LJ GWect+jgqr8cStM2f8RU2cNUoROsyW1LOujGbRf8UcolGlCJEcoBJXdan4pTutKlZoDy HyHUjXhA9Ky1829G8zL4bMTBPWsfqNkga0UIcatzJj8oAvyeH7MmyaqrrkeadRQ/zTtU 6S3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@es-iitr-ac-in.20150623.gappssmtp.com header.s=20150623 header.b=iVRInhr+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iitr.ac.in Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q5si5614523otc.104.2020.02.24.00.25.01; Mon, 24 Feb 2020 00:25:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@es-iitr-ac-in.20150623.gappssmtp.com header.s=20150623 header.b=iVRInhr+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iitr.ac.in Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727197AbgBXIY5 (ORCPT + 99 others); Mon, 24 Feb 2020 03:24:57 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:38734 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726216AbgBXIY5 (ORCPT ); Mon, 24 Feb 2020 03:24:57 -0500 Received: by mail-pg1-f196.google.com with SMTP id d6so4746907pgn.5 for ; Mon, 24 Feb 2020 00:24:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=es-iitr-ac-in.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=lhlKxXAIvhacc2714cSl7CgN47VyLjNdXE5+TJ+pWfc=; b=iVRInhr+0XNetO76iReb1HcqRUj2veJmpOz2VGFnl2Wxi+8TPSjiu/xM/adgh6XmCK 8Vk6u/EjOINY+qvQ7ISa91IkBrWENxEMunIgH0aMBekN48kC+rBPr5JyAEUo45egz+Tp cAfVlus1c+zANML1yovm8FDV01jcNS6RpGQajOVBDCK+/Jjc/UJNt13m1yDXbJXfPS4M QAqcA/H6ZQ2ZJC+3y7NBZgnRHOcGHpQmT90FXX4cLkHmg4AhWA2om8knIKC7EegqlEK1 HwC07FQ6y/BIblr71lhZuxonaXOkd4NCVQG97jtEN56rZ5z7djSpq3XiLZDJB2BvC/Ns iMGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=lhlKxXAIvhacc2714cSl7CgN47VyLjNdXE5+TJ+pWfc=; b=R10nCbZSxNEkyNfjpYp1p29NFyJtgcX3dzQZ0PgX1AqJGnCZoVgMmLrMJ0e53WmCch 7oYffyV3r5jKWuvXsbjrx54pMi0gjAPW6LmWhhFfo4AlBKJVNgdl91yHP9FWMNH649MS Gl+DrfMH0XRh5QARvbduvKM5qVgFUj0NHqFtrxtp/Ietf8FsFdN7wS6b6AI+R3yndMb5 GC4LUdfAB+bMjENzyCvcZw/2TYSl/pu2L1qCarnHAjqn2soHGJ9YsKrEqlxaaDYwGkYZ gc646CRfDWLknwctXvBmnybu5nOtjWCLNDdJb9bukCt/jnAkwBjzoNHHhTzn1rggfmXC W/aQ== X-Gm-Message-State: APjAAAX0/nak44pBjojHIwpvnOq5cU9yJ2tWQUG3d+SYCmBaK4SlAHL+ KMXe5aDHN32MbZWoW/Bw24Wv1/5Oheo1GjIM X-Received: by 2002:aa7:84c4:: with SMTP id x4mr50338458pfn.144.1582532696231; Mon, 24 Feb 2020 00:24:56 -0800 (PST) Received: from kaaira-HP-Pavilion-Notebook ([103.37.201.170]) by smtp.gmail.com with ESMTPSA id g12sm11515210pfh.170.2020.02.24.00.24.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Feb 2020 00:24:55 -0800 (PST) Date: Mon, 24 Feb 2020 13:54:48 +0530 From: Kaaira Gupta To: Manish Chopra , GR-Linux-NIC-Dev@marvell.com, Greg Kroah-Hartman , netdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH v4] staging: qlge: emit debug and dump at same level Message-ID: <20200224082448.GA6826@kaaira-HP-Pavilion-Notebook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify code in ql_mpi_core_to_log() by calling print_hex_dump() instead of existing functions so that the debug and dump are emitted at the same KERN_ Signed-off-by: Kaaira Gupta --- changes since v1: make code of ql_mpi_core_to_log() simpler. changes since v2: directly call the function instead of defining a macro. changes since v3: Remove prefix string. ---- --- drivers/staging/qlge/qlge_dbg.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/drivers/staging/qlge/qlge_dbg.c b/drivers/staging/qlge/qlge_dbg.c index c7af2548d119..0c5f6859e645 100644 --- a/drivers/staging/qlge/qlge_dbg.c +++ b/drivers/staging/qlge/qlge_dbg.c @@ -1324,27 +1324,10 @@ void ql_mpi_core_to_log(struct work_struct *work) { struct ql_adapter *qdev = container_of(work, struct ql_adapter, mpi_core_to_log.work); - u32 *tmp, count; - int i; - count = sizeof(struct ql_mpi_coredump) / sizeof(u32); - tmp = (u32 *)qdev->mpi_coredump; - netif_printk(qdev, drv, KERN_DEBUG, qdev->ndev, - "Core is dumping to log file!\n"); - - for (i = 0; i < count; i += 8) { - pr_err("%.08x: %.08x %.08x %.08x %.08x %.08x " - "%.08x %.08x %.08x\n", i, - tmp[i + 0], - tmp[i + 1], - tmp[i + 2], - tmp[i + 3], - tmp[i + 4], - tmp[i + 5], - tmp[i + 6], - tmp[i + 7]); - msleep(5); - } + print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, + 32, 4, qdev->mpi_coredump, + sizeof(*qdev->mpi_coredump), false); } #ifdef QL_REG_DUMP -- 2.17.1