mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-12 00:38:55 +00:00
scsi: ufs: don't check unsigned type for a negative value
Fix compilation warning: drivers/scsi/ufs/ufshcd.c:7645:13: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if ((value < UFS_PM_LVL_0) || (value >= UFS_PM_LVL_MAX)) Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
2ef2884980
commit
949d7fa158
@ -7642,7 +7642,7 @@ static inline ssize_t ufshcd_pm_lvl_store(struct device *dev,
|
||||
if (kstrtoul(buf, 0, &value))
|
||||
return -EINVAL;
|
||||
|
||||
if ((value < UFS_PM_LVL_0) || (value >= UFS_PM_LVL_MAX))
|
||||
if (value >= UFS_PM_LVL_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
spin_lock_irqsave(hba->host->host_lock, flags);
|
||||
|
Loading…
x
Reference in New Issue
Block a user