[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <061dedf8cc074e798b8eca4871a080fa.squirrel@codeaurora.org>
Date: Thu, 12 Mar 2015 15:27:46 -0000
From: "Gilad Broner" <gbroner@...eaurora.org>
To: "Akinobu Mita" <akinobu.mita@...il.com>
Cc: "Gilad Broner" <gbroner@...eaurora.org>,
"Jej B" <james.bottomley@...senpartnership.com>,
"LKML" <linux-kernel@...r.kernel.org>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
linux-arm-msm@...r.kernel.org, "Santosh Y" <santoshsy@...il.com>,
linux-scsi-owner@...r.kernel.org,
"Subhash Jadavani" <subhashj@...eaurora.org>,
"Yaniv Gardi" <ygardi@...eaurora.org>,
"Dolev Raviv" <draviv@...eaurora.org>,
"Noa Rubens" <noag@...eaurora.org>,
"Raviv Shvili" <rshvili@...eaurora.org>,
"Vinayak Holikatti" <vinholikatti@...il.com>,
"James E.J. Bottomley" <jbottomley@...allels.com>,
"open list:ABI/API" <linux-api@...r.kernel.org>
Subject: Re: [PATCH v6 1/3] scsi: ufs: add ioctl interface for query request
>> + 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists