From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752936AbcEJOpv (ORCPT ); Tue, 10 May 2016 10:45:51 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:42135 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751788AbcEJOpt (ORCPT ); Tue, 10 May 2016 10:45:49 -0400 Subject: Re: [PATCH v1 1/1] skd_main: use %*ph to dump small buffers To: Andy Shevchenko , Ming Lin , References: <1462562805-104173-1-git-send-email-andriy.shevchenko@linux.intel.com> From: Jens Axboe Message-ID: <5731F40A.9010603@fb.com> Date: Tue, 10 May 2016 08:45:30 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <1462562805-104173-1-git-send-email-andriy.shevchenko@linux.intel.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [192.168.54.13] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-05-10_07:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/06/2016 01:26 PM, Andy Shevchenko wrote: > Replace custom approach by %*ph specifier to dump small buffers in hex format. > > Unfortunately we can't use print_hex_dump_bytes() here since tha gap is > present, though one familiar with the code may change this. Did you test this? CC [M] drivers/block/skd_main.o In file included from include/linux/kernel.h:13:0, from drivers/block/skd_main.c:19: drivers/block/skd_main.c: In function ‘skd_send_fitmsg’: include/linux/kern_levels.h:4:18: warning: format ‘%p’ expects argument of type ‘void *’, but argument 6 has type ‘int’ [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/linux/printk.h:114:10: note: in definition of macro ‘no_printk’ printk(fmt, ##__VA_ARGS__); \ ^ include/linux/kern_levels.h:14:20: note: in expansion of macro ‘KERN_SOH’ #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */ ^ include/linux/printk.h:289:12: note: in expansion of macro ‘KERN_DEBUG’ no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) ^ drivers/block/skd_main.c:2141:4: note: in expansion of macro ‘pr_debug’ pr_debug("%s:%s:%d msg[%2d] %8ph\n", ^ drivers/block/skd_main.c: In function ‘skd_send_special_fitmsg’: include/linux/kern_levels.h:4:18: warning: format ‘%p’ expects argument of type ‘void *’, but argument 6 has type ‘int’ [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/linux/printk.h:114:10: note: in definition of macro ‘no_printk’ printk(fmt, ##__VA_ARGS__); \ ^ include/linux/kern_levels.h:14:20: note: in expansion of macro ‘KERN_SOH’ #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */ ^ include/linux/printk.h:289:12: note: in expansion of macro ‘KERN_DEBUG’ no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) ^ drivers/block/skd_main.c:2175:4: note: in expansion of macro ‘pr_debug’ pr_debug("%s:%s:%d spcl[%2d] %8ph\n", ^ -- Jens Axboe