Skip to content

Commit cdaaff6

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: ufs: core: Remove request tag range checks
The block layer core guarantees that tag numbers are in the expected range. Hence remove the statements that check this. This patch suppresses Coverity warnings about left shifts with a negative right hand operand. The following commit originally introduced request tag range checks: 1449732 ("scsi: ufs: verify command tag validity"). Cc: daejun7.park@samsung.com Cc: John Garry <john.g.garry@oracle.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230921192335.676924-2-bvanassche@acm.org Reviewed-by: John Garry <john.g.garry@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 0bb80ec commit cdaaff6

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

drivers/ufs/core/ufshcd.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2822,8 +2822,6 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
28222822
int err = 0;
28232823
struct ufs_hw_queue *hwq = NULL;
28242824

2825-
WARN_ONCE(tag < 0 || tag >= hba->nutrs, "Invalid tag %d\n", tag);
2826-
28272825
switch (hba->ufshcd_state) {
28282826
case UFSHCD_STATE_OPERATIONAL:
28292827
break;
@@ -6923,8 +6921,6 @@ static int __ufshcd_issue_tm_cmd(struct ufs_hba *hba,
69236921
spin_lock_irqsave(host->host_lock, flags);
69246922

69256923
task_tag = req->tag;
6926-
WARN_ONCE(task_tag < 0 || task_tag >= hba->nutmrs, "Invalid tag %d\n",
6927-
task_tag);
69286924
hba->tmf_rqs[req->tag] = req;
69296925
treq->upiu_req.req_header.task_tag = task_tag;
69306926

@@ -7498,8 +7494,6 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
74987494
bool outstanding;
74997495
u32 reg;
75007496

7501-
WARN_ONCE(tag < 0, "Invalid tag %d\n", tag);
7502-
75037497
ufshcd_hold(hba);
75047498

75057499
if (!is_mcq_enabled(hba)) {

0 commit comments

Comments
 (0)