[PATCH 5/9] drivers: cdrom: swap sides of comparison

From: Simao Gomes Viana
Date: Fri Jun 19 2020 - 15:34:23 EST


These were reported by scripts/checkpatch.pl

Signed-off-by: Simao Gomes Viana <devel@xxxxxxxxxxxxxxx>
---
drivers/cdrom/cdrom.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 49073b1c7919..53e592423adb 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -749,7 +749,7 @@ static int cdrom_is_random_writable(struct cdrom_device_info *cdi, int *write)
if (ret)
return ret;

- if (CDF_RWRT == be16_to_cpu(rfd.feature_code))
+ if (be16_to_cpu(rfd.feature_code) == CDF_RWRT)
*write = 1;

return 0;
@@ -863,7 +863,7 @@ static int cdrom_ram_open_write(struct cdrom_device_info *cdi)
ret = cdrom_get_random_writable(cdi, &rfd);
if (ret)
return ret;
- else if (CDF_RWRT == be16_to_cpu(rfd.feature_code))
+ else if (be16_to_cpu(rfd.feature_code) == CDF_RWRT)
ret = !rfd.curr;

cd_dbg(CD_OPEN, "can open for random write\n");
--
2.27.0