From patchwork Sat Aug 5 07:21:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen (ThunderTown)" X-Patchwork-Id: 131464 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp353447vqr; Sat, 5 Aug 2023 02:15:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGeuzXXV8LTSu9WPvi7FSle/qGZgnNYLdBKwLs+h7ARGPY74pMadPTJhZiPVrkhNx/98Tef X-Received: by 2002:a05:6358:5e0e:b0:134:c785:5932 with SMTP id q14-20020a0563585e0e00b00134c7855932mr4493748rwn.32.1691226956674; Sat, 05 Aug 2023 02:15:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691226956; cv=none; d=google.com; s=arc-20160816; b=k/igQqVu2zCwXAIkDtDoo5HPy0OuDpurfdtkFrkNH9LLiZPbLnl+tf4fjVOrh5yeje E+4EouKWRaz8lnOmTWiPPRd8x5GGUBMKc6Fb1HDu2soIsjd44bwYFJ9MqsI9sO/nEk/b JpUAE4G6HlGunjP8XjRy4TWB707bvl0uvQe1FNbuVyfjktgn3Pk7DnOfQUBr/62qjqCy nBTMSkU15FHEwmagB5CTHaOy12MYzoC3AFmIcHUiT5IMZcjRsmFkgJQY1z7a1wN6bpsa vzxIpcHaUG9E97+WuYp5IdMo/pIXUWnPSAhP5YA5dHu1ZIpV7T3C03F0w51aSYSu/9Bx 3UIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=AFiRED77pPDoozH4wtE5kGkfVQK9BCEaT/hCb6W4S6g=; fh=4XMCVqELsHQeLXPR8wfY+nEap6vsUBU0MIzBtyzMdg4=; b=m1oSKY2+Tl9errKRi3frS6wWN4Rt8QVDJ6CfZnbQrUaPg2qP279VF5f5ImweETBThW NalNbcV4mEiSqFbATUpiKVTcByukF3sxi3d8tl998DjNTCKOGn7+CJ6oNKugPpNSNFk5 k+jPxzbOOP16OV7ZiTEx/Kf8QMYd0qL+zfvGt7XPGnWGEvE7h7ztEvNyO27ancfLgn1V 4t8qre78nbAjSsWnA6l83emUm0coK2j144YiE88Aw211KE5F2KY5UMYdj0yHz0WkWEMs jU+e6ur6m8+E/QgDQSOexh4ObZdV2FFe/j23nNN8K4STpWR9kSJvHBx/YrbG3+AHVBeP XW3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h69-20020a638348000000b0055c3e6ada36si2926730pge.354.2023.08.05.02.15.43; Sat, 05 Aug 2023 02:15:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229915AbjHEHWQ (ORCPT + 99 others); Sat, 5 Aug 2023 03:22:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229832AbjHEHVn (ORCPT ); Sat, 5 Aug 2023 03:21:43 -0400 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98B834EC7 for ; Sat, 5 Aug 2023 00:21:41 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4RHvCN5xgbz4f3mJ4 for ; Sat, 5 Aug 2023 15:21:36 +0800 (CST) Received: from huaweicloud.com (unknown [10.174.178.55]) by APP4 (Coremail) with SMTP id gCh0CgAHoZR_+M1kFAdsPg--.4573S5; Sat, 05 Aug 2023 15:21:37 +0800 (CST) From: thunder.leizhen@huaweicloud.com To: Petr Mladek , Sergey Senozhatsky , Steven Rostedt , John Ogness , linux-kernel@vger.kernel.org Cc: Zhen Lei Subject: [PATCH 1/2] hexdump: minimize the output width of the offset Date: Sat, 5 Aug 2023 15:21:15 +0800 Message-Id: <20230805072116.1260-2-thunder.leizhen@huaweicloud.com> X-Mailer: git-send-email 2.37.3.windows.1 In-Reply-To: <20230805072116.1260-1-thunder.leizhen@huaweicloud.com> References: <20230805072116.1260-1-thunder.leizhen@huaweicloud.com> MIME-Version: 1.0 X-CM-TRANSID: gCh0CgAHoZR_+M1kFAdsPg--.4573S5 X-Coremail-Antispam: 1UD129KBjvJXoW7Kw13tF4UKF13XF17Cw4UJwb_yoW8tw45pF 98t3yYgFZ7Jr1xCr17Ar10gr1Yka47C3W0kFWqk34qvF4UWF1fXrykKFW3try5Jr1qqrsI qr9rtw1Fyr17Gw7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUU9vb4IE77IF4wAFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6r1S6rWUM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUGw A2048vs2IY020Ec7CjxVAFwI0_JFI_Gr1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV WxJr0_GcWl84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_ GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx 0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWU JVW8JwACjcxG0xvY0x0EwIxGrwAKzVCY07xG64k0F24l42xK82IYc2Ij64vIr41l4I8I3I 0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWU GVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI 0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0 rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4UJV WxJrUvcSsGvfC2KfnxnUUI43ZEXa7IU8U73DUUUUU== X-CM-SenderInfo: hwkx0vthuozvpl2kv046kxt4xhlfz01xgou0bp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773379997112268214 X-GMAIL-MSGID: 1773379997112268214 From: Zhen Lei The offset of case DUMP_PREFIX_OFFSET always starts from 0. Currently, the output width is fixed to 8. But we usually dump only tens or hundreds of bytes, occasionally thousands of bytes. Therefore, the output offset value always has a number of leading zeros, which increases the number of bytes printed and reduces readability. Let's minimize the output width of the offset based on the number of significant bits of its maximum value. Before: dump_size=36: 00000000: c0 ba 8c 80 00 80 ff ff 6c 93 ee 2f ee bf ff ff 00000010: 00 50 1e 98 ff 27 ff ff 01 00 00 00 00 00 00 00 00000020: 80 ca 2f 98 After: dump_size=8: 0: c0 ba 89 80 00 80 ff ff dump_size=36: 00: c0 3a 91 80 00 80 ff ff 6c 93 ae 76 30 ce ff ff 10: 00 60 cd 60 7d 4e ff ff 01 00 00 00 00 00 00 00 20: 40 9e 29 40 dump_size=300: 000: c0 ba 8d 80 00 80 ff ff 6c 93 ce d4 78 a7 ff ff 010: 00 00 16 18 0c 40 ff ff 01 00 00 00 00 00 00 00 020: 01 00 00 00 00 00 00 00 e8 bc 8d 80 00 80 ff ff ... ... 110: 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 120: 00 08 12 01 0c 40 ff ff 00 00 01 00 Signed-off-by: Zhen Lei Reviewed-by: Randy Dunlap --- lib/hexdump.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/hexdump.c b/lib/hexdump.c index 06833d404398d74..86cb4cc3eec485a 100644 --- a/lib/hexdump.c +++ b/lib/hexdump.c @@ -263,12 +263,21 @@ void print_hex_dump(const char *level, const char *prefix_str, int prefix_type, const void *buf, size_t len, bool ascii) { const u8 *ptr = buf; - int i, linelen, remaining = len; + int i, linelen, width = 0, remaining = len; unsigned char linebuf[32 * 3 + 2 + 32 + 1]; if (rowsize != 16 && rowsize != 32) rowsize = 16; + if (prefix_type == DUMP_PREFIX_OFFSET) { + unsigned long tmp = len - 1; /* offset start from 0, so minus 1 */ + + do { + width++; + tmp >>= 4; + } while (tmp); + } + for (i = 0; i < len; i += rowsize) { linelen = min(remaining, rowsize); remaining -= rowsize; @@ -282,7 +291,7 @@ void print_hex_dump(const char *level, const char *prefix_str, int prefix_type, level, prefix_str, ptr + i, linebuf); break; case DUMP_PREFIX_OFFSET: - printk("%s%s%.8x: %s\n", level, prefix_str, i, linebuf); + printk("%s%s%0*x: %s\n", level, prefix_str, width, i, linebuf); break; default: printk("%s%s%s\n", level, prefix_str, linebuf); From patchwork Sat Aug 5 07:21:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen (ThunderTown)" X-Patchwork-Id: 131454 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp341118vqr; Sat, 5 Aug 2023 01:39:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFzln82INPz/8jKbilmnY1D3w4HOhiX7db/RmKHRZAd40pF8PCmaoEjePVYoCFpNFnIo+Yi X-Received: by 2002:a17:90b:1d88:b0:267:6a1d:323c with SMTP id pf8-20020a17090b1d8800b002676a1d323cmr4019019pjb.43.1691224782609; Sat, 05 Aug 2023 01:39:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691224782; cv=none; d=google.com; s=arc-20160816; b=tuF+cf8LfjU9VZj3T6KCfenKW1I4KRH0TbkXqFLrYPOZ6yms1u5xt+p/5cF8OAwbd/ EOjPhtRJmEgovnv2DCA7x5YlyUU04DJYJkXrhAFOtZLs3iD+nsOusyT0610eW3Vb+FRQ 65yxKduYqrBQ8+8jgTzqZeQbCPqFQgIdamHPKVraCUNiphryF27pINWg4rxuFoX5ux1F BBfVfKjvgXhPgu8Qje8DPKflCWAYwXQS1KpiHsOJfJNI+JRSbAVcLOc2ZdQ7cywwLloK eCiES7ab2Xkfzp/lkaxRNMZILdo3h8S+RJPNRuNtmLHPTV2IEs+Se9+rIE0rFbVXNS3+ Iqkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=udIJqFR52Gz2iNITND6iasJQi3g4GLQX+Ie82A9nrLc=; fh=4XMCVqELsHQeLXPR8wfY+nEap6vsUBU0MIzBtyzMdg4=; b=vI/Ogn2DZwexDNY1zZ536upwbFiGXztG0q+cFH3j60Jn4IbwA78EnRgcEj2eelzq6L 9p+8vmE/NmGJNgYlreRt/2M1agc1Dy21VOV/LOAoNsCSvSG/AV/ffPIWlOl88xAbh+Kw D43DeC2AeA1dTVTaViZjiUFXgEEN1HNPZT/UnbS/kSQzq5FNtaOU2bYJJwNVP5gTMlxo se0U53Wsw+5L/eC4SO2TFxlSHsQjS4iP5iaX11g3vwGEdz6SX5SsF9BbZKpcqq4f3S1k YN9w+RRVeQ2BlFtWXR1AKHFpTFSG0mFEaajzUk/oAsIEGwFrbAybGKjrOkh4XjFLb7tz pKQg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t13-20020a17090a950d00b0026306b94ee0si2953268pjo.135.2023.08.05.01.39.29; Sat, 05 Aug 2023 01:39:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229871AbjHEHWH (ORCPT + 99 others); Sat, 5 Aug 2023 03:22:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbjHEHVn (ORCPT ); Sat, 5 Aug 2023 03:21:43 -0400 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D77B4EC8 for ; Sat, 5 Aug 2023 00:21:42 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4RHvCP1z22z4f3m6q for ; Sat, 5 Aug 2023 15:21:37 +0800 (CST) Received: from huaweicloud.com (unknown [10.174.178.55]) by APP4 (Coremail) with SMTP id gCh0CgAHoZR_+M1kFAdsPg--.4573S6; Sat, 05 Aug 2023 15:21:38 +0800 (CST) From: thunder.leizhen@huaweicloud.com To: Petr Mladek , Sergey Senozhatsky , Steven Rostedt , John Ogness , linux-kernel@vger.kernel.org Cc: Zhen Lei Subject: [PATCH 2/2] hexdump: add a new dump prefix DUMP_PREFIX_ADDRESS_LOW16 Date: Sat, 5 Aug 2023 15:21:16 +0800 Message-Id: <20230805072116.1260-3-thunder.leizhen@huaweicloud.com> X-Mailer: git-send-email 2.37.3.windows.1 In-Reply-To: <20230805072116.1260-1-thunder.leizhen@huaweicloud.com> References: <20230805072116.1260-1-thunder.leizhen@huaweicloud.com> MIME-Version: 1.0 X-CM-TRANSID: gCh0CgAHoZR_+M1kFAdsPg--.4573S6 X-Coremail-Antispam: 1UD129KBjvJXoWxWF1UGw45KFWUuF17Jw1kZrb_yoW5WF45pa 90gry5GF40gF4xGF1UJrWUCr1YyrZ8Ca40kFWqyw10kryxWFW7Xw4kXFW3Gry5Gr4FqFnx Jry7t345Kr1UCw7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUU9vb4IE77IF4wAFF20E14v26ryj6rWUM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6r1S6rWUM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUXw A2048vs2IY020Ec7CjxVAFwI0_Gr0_Xr1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV WxJr0_GcWl84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_ GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx 0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWU JVW8JwACjcxG0xvY0x0EwIxGrwAKzVCY07xG64k0F24l42xK82IYc2Ij64vIr41l4I8I3I 0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWU GVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI 0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0 rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4UJV WxJrUvcSsGvfC2KfnxnUUI43ZEXa7IU89jjDUUUUU== X-CM-SenderInfo: hwkx0vthuozvpl2kv046kxt4xhlfz01xgou0bp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773377717406554000 X-GMAIL-MSGID: 1773377717406554000 From: Zhen Lei Currently, function print_hex_dump() supports three dump prefixes: DUMP_PREFIX_NONE, DUMP_PREFIX_ADDRESS and DUMP_PREFIX_OFFSET. But for some usage scenarios, they don't work perfectly. For example, dump the content of one task's stack. In order to quickly identify a stack frame, DUMP_PREFIX_ADDRESS is preferred. But printing multiple 64-bit addresses is a bit unwise when the 'sp' value is already printed. It is redundant and unintuitive. For example: dump memory at sp=ffff800080883a90: ffff800080883a90: 80883ac0 ffff8000 3d8e936c ffffbd5b ffff800080883aa0: 5833f000 ffff3580 00000001 00000000 ffff800080883ab0: 40299840 ffff3580 590dfa00 ffff3580 ffff800080883ac0: 80883b30 ffff8000 3d938b28 ffffbd5b ffff800080883ad0: 40877180 ffff3580 590dfa00 ffff3580 ffff800080883ae0: 4090f600 ffff3580 80883cb0 ffff8000 ffff800080883af0: 00000010 00000000 00000000 00000000 ffff800080883b00: 4090f700 ffff3580 00000001 00000000 Generally, we do not dump more than 64 KB memory. It is sufficient to print only the lower 16 bits of the address. dump memory at sp=ffff800080883a90: 3a90: 80883ac0 ffff8000 3d8e936c ffffbd5b 3aa0: 5833f000 ffff3580 00000001 00000000 3ab0: 40299840 ffff3580 590dfa00 ffff3580 3ac0: 80883b30 ffff8000 3d938b28 ffffbd5b 3ad0: 40877180 ffff3580 590dfa00 ffff3580 3ae0: 4090f600 ffff3580 80883cb0 ffff8000 3af0: 00000010 00000000 00000000 00000000 3b00: 4090f700 ffff3580 00000001 00000000 Another benefit of adding DUMP_PREFIX_ADDRESS_LOW16 is that we don't have to worry about %p outputting address as hashed value. Signed-off-by: Zhen Lei Reviewed-by: Randy Dunlap --- include/linux/printk.h | 1 + lib/hexdump.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/linux/printk.h b/include/linux/printk.h index 8ef499ab3c1ed2e..ccad9e8eaaf0c31 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -704,6 +704,7 @@ extern const struct file_operations kmsg_fops; enum { DUMP_PREFIX_NONE, DUMP_PREFIX_ADDRESS, + DUMP_PREFIX_ADDRESS_LOW16, DUMP_PREFIX_OFFSET }; extern int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, diff --git a/lib/hexdump.c b/lib/hexdump.c index 86cb4cc3eec485a..eb33e477bc96df1 100644 --- a/lib/hexdump.c +++ b/lib/hexdump.c @@ -290,6 +290,10 @@ void print_hex_dump(const char *level, const char *prefix_str, int prefix_type, printk("%s%s%p: %s\n", level, prefix_str, ptr + i, linebuf); break; + case DUMP_PREFIX_ADDRESS_LOW16: + printk("%s%s%04lx: %s\n", level, + prefix_str, 0xffff & (unsigned long)(ptr + i), linebuf); + break; case DUMP_PREFIX_OFFSET: printk("%s%s%0*x: %s\n", level, prefix_str, width, i, linebuf); break;