Skip to contentSkip to conversation

ufs: add support for query requests

SCSI Dan Carpenter 3 participants 3 messages May 7, 2013 – May 8, 2013 SCSI

lore
Share & tools
lore
#0 lore raw

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

maintainer
#1 lore raw
Quoted 14 lines · Dan Carpenter

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) {
                    ^^^^
Quoted 8 lines

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

#2 lore raw
Quoted 22 lines · Dan Carpenter
Quoted 20 lines

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.

Quoted 7 lines
Quoted 2 lines
   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.

Quoted 9 lines

James

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

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