[lkml]   [2016]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH RESEND] scsi: ultrastor: Use correct format identifier for kernel pointer
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?


 \ /
  Last update: 2016-05-02 01:21    [W:0.027 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site