From: James Bottomley <jejb@linux.vnet.ibm.com>
To: William Breathitt Gray <vilhelm.gray@gmail.com>,
	martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] scsi: ultrastor: Use correct format identifier for kernel pointer
Date: Sun, 01 May 2016 16:08:25 -0700	[thread overview]
Message-ID: <1462144105.2337.11.camel@linux.vnet.ibm.com> (raw)
In-Reply-To: <20160501215740.GA22213@sophia>
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
next prev parent reply	other threads:[~2016-05-01 23:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-01 21:57 [PATCH RESEND] scsi: ultrastor: Use correct format identifier for kernel pointer William Breathitt Gray
2016-05-01 23:08 ` James Bottomley [this message]
2016-05-01 23:18   ` William Breathitt Gray
  -- strict thread matches above, loose matches on Subject: below --
2016-05-01 21:54 William Breathitt Gray
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=1462144105.2337.11.camel@linux.vnet.ibm.com \
    --to=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=vilhelm.gray@gmail.com \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
  Be sure your reply has a Subject: header at the top and a blank line
  before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).