Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755100AbbLJSQH (ORCPT ); Thu, 10 Dec 2015 13:16:07 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:45704 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754692AbbLJSQF (ORCPT ); Thu, 10 Dec 2015 13:16:05 -0500 To: Rasmus Villemoes Cc: Boaz Harrosh , Benny Halevy , "James E.J. Bottomley" , "Martin K. Petersen" , osd-dev@open-osd.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [SCSI] osd: fix signed char versus %02x issue From: "Martin K. Petersen" Organization: Oracle Corporation References: <1449584716-21093-1-git-send-email-linux@rasmusvillemoes.dk> Date: Thu, 10 Dec 2015 13:15:39 -0500 In-Reply-To: <1449584716-21093-1-git-send-email-linux@rasmusvillemoes.dk> (Rasmus Villemoes's message of "Tue, 8 Dec 2015 15:25:16 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 845 Lines: 19 >>>>> "Rasmus" == Rasmus Villemoes writes: Rasmus> If char is signed and one of these bytes happen to have a value Rasmus> outside the ascii range, the corresponding output will consist Rasmus> of "ffffff" followed by the two hex chars that were actually Rasmus> intended. One way to fix it would be to change the casts to Rasmus> (u8*) aka (unsigned char*), but it is much simpler (and Rasmus> generates smaller code) to use the %ph extension which was Rasmus> created for such short hexdumps. Applied to 4.5/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/