All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gilad Broner" <gbroner@codeaurora.org>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Gilad Broner <gbroner@codeaurora.org>,
	Jej B <james.bottomley@hansenpartnership.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	linux-arm-msm@vger.kernel.org, Santosh Y <santoshsy@gmail.com>,
	linux-scsi-owner@vger.kernel.org,
	Subhash Jadavani <subhashj@codeaurora.org>,
	Yaniv Gardi <ygardi@codeaurora.org>,
	Dolev Raviv <draviv@codeaurora.org>,
	Noa Rubens <noag@codeaurora.org>,
	Raviv Shvili <rshvili@codeaurora.org>,
	Vinayak Holikatti <vinholikatti@gmail.com>,
	"James E.J. Bottomley" <jbottomley@parallels.com>,
	"open list:ABI/API" <linux-api@vger.kernel.org>
Subject: Re: [PATCH v6 1/3] scsi: ufs: add ioctl interface for query request
Date: Thu, 12 Mar 2015 15:27:46 -0000	[thread overview]
Message-ID: <061dedf8cc074e798b8eca4871a080fa.squirrel@codeaurora.org> (raw)
In-Reply-To: <CAC5umyiry3OEJGeZ2=U21v7gAjsC7XHZVyiZN8UgQusX2KmvpQ@mail.gmail.com>

>> +       if (!buffer) {
>> +               dev_err(hba->dev, "%s: User buffer is NULL!\n",
>> __func__);
>> +               return -EINVAL;
>> +       }
>> +
>
> Should we remove this check or move it into ufshcd_query_ioctl()?
> For example, BLKFLS ioctl without argument is correct usage, but
> it always triggers this message. (blkdev_ioctl -> __blkdev_driver_ioctl
> -> sd_ioctl -> scsi_ioctl -> ufshcd_ioctl)

You're right, I'll move the check to ufshcd_query_ioctl().

>  +++ b/include/uapi/scsi/ufs/ioctl.h
>> @@ -0,0 +1,57 @@
>> +#ifndef UAPI_UFS_IOCTL_H_
>> +#define UAPI_UFS_IOCTL_H_
>> +
>> +#include <linux/types.h>
>> +
>> +/*
>> + *  IOCTL opcode for ufs queries has the following opcode after
>> + *  SCSI_IOCTL_GET_PCI
>> + */
>> +#define UFS_IOCTL_QUERY                        0x5388
>
> Should we also need some comments near SCSI_IOCTL_GET_PCI in
> include/scsi/scsi.h in order to avoid someone trying to define
> the same ioctl code in the future?
>
Indeed - I will add a comment.

Gilad.

-- 
Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2015-03-12 15:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-12 12:27 [PATCH v6 0/3] Add ioctl and debug utilities to UFS driver Gilad Broner
2015-03-12 12:27 ` [PATCH v6 1/3] scsi: ufs: add ioctl interface for query request Gilad Broner
2015-03-12 12:27   ` Gilad Broner
     [not found]   ` <1426163262-22014-2-git-send-email-gbroner-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-03-12 13:30     ` Akinobu Mita
2015-03-12 13:30       ` Akinobu Mita
2015-03-12 15:27       ` Gilad Broner [this message]
2015-03-12 12:27 ` [PATCH v6 2/3] scsi: ufs: add debugfs for ufs Gilad Broner
2015-03-12 12:27 ` [PATCH v6 3/3] scsi: ufs: add trace events and dump prints for debug Gilad Broner

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=061dedf8cc074e798b8eca4871a080fa.squirrel@codeaurora.org \
    --to=gbroner@codeaurora.org \
    --cc=akinobu.mita@gmail.com \
    --cc=draviv@codeaurora.org \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=jbottomley@parallels.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi-owner@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=noag@codeaurora.org \
    --cc=rshvili@codeaurora.org \
    --cc=santoshsy@gmail.com \
    --cc=subhashj@codeaurora.org \
    --cc=vinholikatti@gmail.com \
    --cc=ygardi@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.