From: Greg KH <gregkh@linuxfoundation.org> To: Frank Haverkamp <haver@linux.vnet.ibm.com> Cc: fengguang.wu@intel.com, jim.epost@gmail.com, sfr@canb.auug.org.au, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, kbuild-all@01.org Subject: Re: [PATCH 2/2] GenWQE: Replace dynamic_hex_dump with print_hex_dump_debug Date: Fri, 20 Dec 2013 07:55:19 -0800 [thread overview] Message-ID: <20131220155519.GA6890@kroah.com> (raw) In-Reply-To: <1387554543.1847.22.camel@oc7383187364.ibm.com> On Fri, Dec 20, 2013 at 04:49:03PM +0100, Frank Haverkamp wrote: > Hi Greg, > > Am Freitag, den 20.12.2013, 07:33 -0800 schrieb Greg KH: > > On Fri, Dec 20, 2013 at 04:26:11PM +0100, Frank Haverkamp wrote: > > > As requested by Greg, replacing the hexdump function from dynamic_debug.h > > > with one defined in printk.h. I hope I picked the right one. > > > > No, just use the "%*ph" modifier for printk. > > > > So, you can do it all on just one line: > > scnprintf(prefix, sizeof(prefix), "%s %s: %*ph\n", > > GENWQE_DEVNAME, pci_name(pci_dev), size, buff); > > Oh, I did not know that such a feature exists. The buffer I like to dump > is 256 bytes large. Looking in to Documentation/printk-formats.txt it > says: > > Raw buffer as a hex string: > %*ph 00 01 02 ... 3f > %*phC 00:01:02: ... :3f > %*phD 00-01-02- ... -3f > %*phN 000102 ... 3f > > For printing a small buffers (up to 64 bytes long) as a hex > string with > certain separator. For the larger buffers consider to use > print_hex_dump(). > > So is my choice still not ok, considering the data size I like to dump? Ah, I didn't realize it was limited to 64 bytes long. So nevermind, your original patch is fine, I'll queue it up. > > And even then, do you really need this genwqe_hexdump() function at all > > anymore? What is it used for? > > We were using this feature to dump work-requests before and after they > had been sent to the card. This was very helpful when there was a > problem with the card executing one of those requests. Now since the > card is really running stable, you could argue that we do not need it > anymore. So if you really, really insist, I will remove the feature else > I would like to keep it. If you want to keep it, that's fine, just checking. thanks, greg k-h
prev parent reply other threads:[~2013-12-20 15:55 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-12-20 14:17 randconfig build error with next-20131220, in drivers/misc/genwqe/genwqe_driver.h Jim Davis 2013-12-20 15:26 ` [PATCH 1/2] GenWQE: Fix endian issues detected by sparse Frank Haverkamp 2013-12-20 16:47 ` Greg KH 2013-12-20 19:12 ` Frank Haverkamp 2013-12-20 19:27 ` [PATCH] GenWQE: Accidently casting to u32 where u64 is required Frank Haverkamp 2014-01-07 6:41 ` [PATCH 1/2] GenWQE: Fix endian issues detected by sparse Dan Carpenter 2014-01-07 12:30 ` Frank Haverkamp 2014-01-07 12:45 ` Dan Carpenter 2014-01-07 14:39 ` Frank Haverkamp 2014-01-07 14:41 ` [PATCH 1/3] GenWQE: Rework return code for flash-update ioctl Frank Haverkamp 2014-01-07 14:41 ` [PATCH 2/3] GenWQE: Fix compile problems for Alpha Frank Haverkamp 2014-01-07 14:41 ` [PATCH 3/3] GenWQE: Fix warnings for sparc Frank Haverkamp 2013-12-20 15:26 ` [PATCH 2/2] GenWQE: Replace dynamic_hex_dump with print_hex_dump_debug Frank Haverkamp 2013-12-20 15:33 ` Greg KH 2013-12-20 15:49 ` Frank Haverkamp 2013-12-20 15:55 ` Greg KH [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20131220155519.GA6890@kroah.com \ --to=gregkh@linuxfoundation.org \ --cc=fengguang.wu@intel.com \ --cc=haver@linux.vnet.ibm.com \ --cc=jim.epost@gmail.com \ --cc=kbuild-all@01.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-next@vger.kernel.org \ --cc=sfr@canb.auug.org.au \ --subject='Re: [PATCH 2/2] GenWQE: Replace dynamic_hex_dump with print_hex_dump_debug' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).