* [PATCH] sed-opal: Remove the ret variable from the function
@ 2024-03-06 10:14 Li kunyu
2024-03-06 15:35 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Li kunyu @ 2024-03-06 10:14 UTC (permalink / raw)
To: jonathan.derrick, axboe; +Cc: linux-block, linux-kernel, Li kunyu
The ret variable in the function has not yet been effective and can be
removed.
Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
block/sed-opal.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/block/sed-opal.c b/block/sed-opal.c
index f62b7ee933f7f..25fdbb7e14ae9 100644
--- a/block/sed-opal.c
+++ b/block/sed-opal.c
@@ -3108,10 +3108,9 @@ static int opal_read_table(struct opal_dev *dev,
{ read_table_data, rw_tbl },
{ end_opal_session, }
};
- int ret = 0;
if (!rw_tbl->size)
- return ret;
+ return 0;
return execute_steps(dev, read_table_steps,
ARRAY_SIZE(read_table_steps));
@@ -3125,10 +3124,9 @@ static int opal_write_table(struct opal_dev *dev,
{ write_table_data, rw_tbl },
{ end_opal_session, }
};
- int ret = 0;
if (!rw_tbl->size)
- return ret;
+ return 0;
return execute_steps(dev, write_table_steps,
ARRAY_SIZE(write_table_steps));
--
2.18.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sed-opal: Remove the ret variable from the function
2024-03-06 10:14 [PATCH] sed-opal: Remove the ret variable from the function Li kunyu
@ 2024-03-06 15:35 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2024-03-06 15:35 UTC (permalink / raw)
To: jonathan.derrick, Li kunyu; +Cc: linux-block, linux-kernel
On Wed, 06 Mar 2024 18:14:44 +0800, Li kunyu wrote:
> The ret variable in the function has not yet been effective and can be
> removed.
>
>
Applied, thanks!
[1/1] sed-opal: Remove the ret variable from the function
commit: 5f2ad31fbb18565645f121b413837f260748e963
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-06 15:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-06 10:14 [PATCH] sed-opal: Remove the ret variable from the function Li kunyu
2024-03-06 15:35 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox