public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* re: [SCSI] ufs: add support for query requests
@ 2013-05-07 14:25 Dan Carpenter
  2013-05-07 22:03 ` James Bottomley
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2013-05-07 14:25 UTC (permalink / raw)
  To: draviv; +Cc: linux-scsi, kbuild

Hello Dolev Raviv,

This is a semi-automatic email about new static checker warnings.

The patch 3aee47c623a3: "[SCSI] ufs: add support for query requests"
from May 2, 2013, leads to the following Smatch complaint:

drivers/scsi/ufs/ufshcd.c:723 ufshcd_query_request()
	 error: we previously assumed 'hba' could be null (see line 722)

drivers/scsi/ufs/ufshcd.c
   721	
   722		if (!hba || !query || !response) {
                    ^^^^
New check.

   723			dev_err(hba->dev,
                                ^^^^^^^^
New dereference.

   724				"%s: NULL pointer hba = %p, query = %p response = %p\n",
   725				__func__, hba, query, response);

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [SCSI] ufs: add support for query requests
  2013-05-07 14:25 [SCSI] ufs: add support for query requests Dan Carpenter
@ 2013-05-07 22:03 ` James Bottomley
  2013-05-08  6:27   ` Dolev Raviv
  0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2013-05-07 22:03 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: draviv, linux-scsi, kbuild

On Tue, 2013-05-07 at 17:25 +0300, Dan Carpenter wrote:
> Hello Dolev Raviv,
> 
> This is a semi-automatic email about new static checker warnings.
> 
> The patch 3aee47c623a3: "[SCSI] ufs: add support for query requests"
> from May 2, 2013, leads to the following Smatch complaint:
> 
> drivers/scsi/ufs/ufshcd.c:723 ufshcd_query_request()
> 	 error: we previously assumed 'hba' could be null (see line 722)
> 
> drivers/scsi/ufs/ufshcd.c
>    721	
>    722		if (!hba || !query || !response) {
>                     ^^^^
> New check.
> 
>    723			dev_err(hba->dev,
>                                 ^^^^^^^^
> New dereference.
> 
>    724				"%s: NULL pointer hba = %p, query = %p response = %p\n",
>    725				__func__, hba, query, response);

We don't actually have any callers of this function either, so nothing
ever exercises the code.  Given that we're not supposed to put stuff in
the tree without a use case anyway, I can just remove it and then it can
be resubmitted when the function has a user.

James



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [SCSI] ufs: add support for query requests
  2013-05-07 22:03 ` James Bottomley
@ 2013-05-08  6:27   ` Dolev Raviv
  0 siblings, 0 replies; 3+ messages in thread
From: Dolev Raviv @ 2013-05-08  6:27 UTC (permalink / raw)
  To: James Bottomley; +Cc: Dan Carpenter, draviv, linux-scsi, kbuild


> On Tue, 2013-05-07 at 17:25 +0300, Dan Carpenter wrote:
>> Hello Dolev Raviv,
>>
>> This is a semi-automatic email about new static checker warnings.
>>
>> The patch 3aee47c623a3: "[SCSI] ufs: add support for query requests"
>> from May 2, 2013, leads to the following Smatch complaint:
>>
>> drivers/scsi/ufs/ufshcd.c:723 ufshcd_query_request()
>> 	 error: we previously assumed 'hba' could be null (see line 722)
>>
>> drivers/scsi/ufs/ufshcd.c
>>    721
>>    722		if (!hba || !query || !response) {
>>                     ^^^^
>> New check.
>>
>>    723			dev_err(hba->dev,
>>                                 ^^^^^^^^
>> New dereference.
>>
>>    724				"%s: NULL pointer hba = %p, query = %p response = %p\n",
>>    725				__func__, hba, query, response);
>
> We don't actually have any callers of this function either, so nothing
> ever exercises the code.  Given that we're not supposed to put stuff in
> the tree without a use case anyway, I can just remove it and then it can
> be resubmitted when the function has a user.

This is fine, this patch introduce the infrastructure and the api.
I could upload the api as part of the fDeviceInit patch that was sent before.

>
> James
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-08  6:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-07 14:25 [SCSI] ufs: add support for query requests Dan Carpenter
2013-05-07 22:03 ` James Bottomley
2013-05-08  6:27   ` Dolev Raviv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox