Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1807712ybv; Sun, 23 Feb 2020 15:55:19 -0800 (PST) X-Google-Smtp-Source: APXvYqxTjeIKltuXq4BspuLSazEvKY9OyxHZ25uc3Kba2+TIY0grsDFwLOY0k4Fk+Hz7wdzL3WyB X-Received: by 2002:a05:6830:1:: with SMTP id c1mr34882412otp.254.1582502118854; Sun, 23 Feb 2020 15:55:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582502118; cv=none; d=google.com; s=arc-20160816; b=P6XFO22kHXI30XJ3igSXOKQO1rOkNCQX9HZ4prNL1bCcujjz35J/RqrfRfzz8+IVbY CgvhAsp3VG7lfm8hO1qZVYbHlYZIrJhYj8OKk276AszkgNzF1Z16cepaD2Ewl1K8cHbj a8AtIfklJvYmLHOdDgnGVfUnYAZLC8zbIAKP7rrRqYzk4vSz63GsBiBl7IFmZxHF7/4p EB+1I6HIeblNDbid4G+lzEe6HtoY0uz2Q6m8f3CtFuS8w1+a7AIu9JIe+ykX1D+kaKn9 QgnNAAH+iKpq5VmudRxHISf7wlGhxt/gpLxvFT56KZ6bhehS8s2ZpNoH8PcuWGhEeqNr zZpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:to:from:subject:message-id; bh=BYDAHplDt2MEkv4vEXBlQxUOtEjl+wxrK8SOG03zyj4=; b=TxGks1U9iyvkgNclkT4A5wXZVYyAWZwZISJax349zoMosbomJY9+8abtin+jOGWvy8 pP6a9jFDpRO6BTeMjJg71Tpg3Qn/dEC3LJs8DWWwt1CMXH3r2YIBzz5wjlx8aYAi2cZG HdEOWyhOP8FUH6sZBNRqrLZxzub+k5ea9hjwAV8Iq7UGvp1Pv5dQC5GVpAcJErTzMgG5 xBwMNBMAU/HL6KOeLiHNg//xZNyR86UyWY+9tFIr8qonoFT012b0Ixad0Do77PiTorH6 ce61SWpmBuGN4IaQA4LzzjhM03u/zxOiwWA9eLEfsg/GkmtNLnToiNt0On/1ee6C2Quq daKg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e7si5296157otp.260.2020.02.23.15.54.51; Sun, 23 Feb 2020 15:55:18 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727170AbgBWXwO (ORCPT + 99 others); Sun, 23 Feb 2020 18:52:14 -0500 Received: from smtprelay0085.hostedemail.com ([216.40.44.85]:46160 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726534AbgBWXwN (ORCPT ); Sun, 23 Feb 2020 18:52:13 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id D417018011E65; Sun, 23 Feb 2020 23:52:11 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:960:988:989:1260:1277:1311:1313:1314:1345:1359:1381:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2692:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3873:3874:4321:4605:5007:7875:7903:9040:10004:10400:10848:11026:11232:11473:11658:11914:12043:12048:12295:12296:12297:12740:12760:12895:13069:13311:13357:13439:14659:14721:21080:21433:21451:21611:21627:21740:21939:30012:30034:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: look71_876f7d9380335 X-Filterd-Recvd-Size: 2193 Received: from XPS-9350.home (unknown [47.151.143.254]) (Authenticated sender: joe@perches.com) by omf01.hostedemail.com (Postfix) with ESMTPA; Sun, 23 Feb 2020 23:52:10 +0000 (UTC) Message-ID: Subject: Re: [PATCH v3] staging: qlge: emit debug and dump at same level From: Joe Perches To: Kaaira Gupta , Manish Chopra , GR-Linux-NIC-Dev@marvell.com, Greg Kroah-Hartman , netdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Date: Sun, 23 Feb 2020 15:50:43 -0800 In-Reply-To: <20200223173132.GA13649@kaaira-HP-Pavilion-Notebook> References: <20200223173132.GA13649@kaaira-HP-Pavilion-Notebook> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.34.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2020-02-23 at 23:01 +0530, Kaaira Gupta wrote: > 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_ [] > Also, can you please help me understand how are are numbers 32 and 4 > chosen for the function print_hex_dump()? Emit 32 bytes per line in 4 byte chunks as u32 And below: > diff --git 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); [] > + print_hex_dump(KERN_DEBUG, "Core is dumping to log file!\n", > + DUMP_PREFIX_OFFSET, 32, 4, qdev->mpi_coredump, > + sizeof(*qdev->mpi_coredump), false); This use of a prefix string is not acceptable. From the kernel-doc: /** * print_hex_dump - print a text hex dump to syslog for a binary blob of data * @level: kernel log level (e.g. KERN_DEBUG) * @prefix_str: string to prefix each line with; * caller supplies trailing spaces for alignment if desired So this would emit "Core is dumping..." line for for every line of hex output.