linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bodo Eggert <7eggert@gmx.de>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Bodo Eggert <7eggert@gmx.de>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	torvalds@osdl.org
Subject: Re: [PATCH] Move SG_GET_SCSI_ID from sg to scsi
Date: Mon, 27 Mar 2006 12:11:14 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0603271158360.3209@be1.lrz> (raw)
In-Reply-To: <20060326200522.GA3486@parisc-linux.org>

On Sun, 26 Mar 2006, Matthew Wilcox wrote:

> On Sun, Mar 26, 2006 at 09:28:28PM +0200, Bodo Eggert wrote:
> >          case SCSI_IOCTL_GET_PCI:
> >                  return scsi_ioctl_get_pci(sdev, arg);
> > +	case SG_GET_SCSI_ID:
> 
> You're using the old ioctl name here ...

Bad, bad, bad ...

> > +		if (!access_ok(VERIFY_WRITE, arg, sizeof (struct scsi_ioctl_id)))
> > +			return -EFAULT;
> > +		else {
> > +			struct scsi_ioctl_id __user *idp = arg;
> > +
> > +			__put_user((int) sdev->host->host_no,
> > +				   &idp->host_no);
> 
> The cast isn't necessary; __put_user casts the argument to the type of
> the pointer.

Nice.

> > +			__put_user(0, &idp->unused[0]);
> > +			__put_user(0, &idp->unused[1]);
> 
> Is it time to repurpose the unused bytes for the 64-bit LUN?

ACK, but I didn't find out how to fill it, and having ints instead of
__uXX made the struct look ugly. Therefore I postponed it to a later patch.

> > +struct scsi_ioctl_id { /* used by SCSI_IOCTL_GET_ID ioctl() */
> > +    int host_no;        /* as in "scsi<n>" where 'n' is one of 0, 1, 2 etc */
> 
> tabs instead of spaces?

Will look at it.
-- 
 In:  DATA
 Out: 554 Error: no valid recipients
 In:  Received: from unknown (190.106.166.70)       -- SMTP-Dialog,
 Out: 221 Error: I can break rules, too. Goodbye.      found in d.a.n.m

  reply	other threads:[~2006-03-27 10:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-26 19:28 [PATCH] Move SG_GET_SCSI_ID from sg to scsi Bodo Eggert
2006-03-26 19:51 ` Arjan van de Ven
2006-03-26 20:08   ` Matthew Wilcox
2006-03-26 20:41     ` Arjan van de Ven
2006-03-26 20:05 ` Matthew Wilcox
2006-03-27 10:11   ` Bodo Eggert [this message]
2006-03-27 15:20     ` Matthew Wilcox
2006-03-27 15:40       ` James Bottomley
2006-03-26 22:30 ` Linus Torvalds
2006-03-26 23:19   ` Jan Engelhardt
2006-03-27  0:06     ` Linus Torvalds
2006-03-27 11:42   ` Bodo Eggert
2006-03-28  9:43     ` Matthias Andree
2006-03-27 15:03   ` Douglas Gilbert
2006-03-27 17:15     ` Linus Torvalds
2006-03-27 17:25       ` Matthew Wilcox
2006-03-27 17:43         ` Linus Torvalds
2006-03-27 19:54           ` Alan Cox
2006-03-27 21:29             ` Douglas Gilbert
2006-03-28  7:37               ` Stefan Richter
2006-03-28 14:17                 ` Jan Engelhardt
2006-03-26 23:09 ` Stefan Richter

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=Pine.LNX.4.58.0603271158360.3209@be1.lrz \
    --to=7eggert@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=torvalds@osdl.org \
    /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).