From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752554AbcEAXIm (ORCPT ); Sun, 1 May 2016 19:08:42 -0400 Received: from e38.co.us.ibm.com ([32.97.110.159]:53857 "EHLO e38.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752352AbcEAXIc (ORCPT ); Sun, 1 May 2016 19:08:32 -0400 X-IBM-Helo: d03dlp03.boulder.ibm.com X-IBM-MailFrom: jejb@linux.vnet.ibm.com X-IBM-RcptTo: vilhelm.gray@gmail.com;martin.petersen@oracle.com;linux-kernel@vger.kernel.org;linux-scsi@vger.kernel.org Message-ID: <1462144105.2337.11.camel@linux.vnet.ibm.com> Subject: Re: [PATCH RESEND] scsi: ultrastor: Use correct format identifier for kernel pointer From: James Bottomley To: William Breathitt Gray , martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sun, 01 May 2016 16:08:25 -0700 In-Reply-To: <20160501215740.GA22213@sophia> References: <20160501215740.GA22213@sophia> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16050123-0029-0000-0000-0000275B0A3D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2016-05-01 at 17:57 -0400, William Breathitt Gray wrote: > The 'bios_segment' member of a struct ultrastor_config is passed to the > sprintf function with a respective %05X format identifier. The > 'bio_segment' member is a kernel pointer, but the %X format identifier > expects an int data type. A cast to int is correctly used to satisfy the > format identifier, but this assumes that the int data type is the same > size as the kernel pointer, which is not the case on several > architectures such as X86_64. This patch removes the int cast and > replaces the %05X format identifier with %pK in order to print the > 'bio_segment' member regardless of architecture. But this statement is wrong: ultrastor only has seven possible hard coded bios segment values, all under 20 bits, as it happens, that's why the printk is %05X. Unless you're proposing to alter values in the static table, there's no point in changing the print, is there? Are you proposing to alter the static table values? James