* [PATCH] sed-opal: Remove unnecessary ‘0’ values from ret
@ 2024-03-06 10:06 Li kunyu
2024-03-06 15:35 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Li kunyu @ 2024-03-06 10:06 UTC (permalink / raw)
To: jonathan.derrick, axboe; +Cc: linux-block, linux-kernel, Li kunyu
ret is assigned first, so it does not need to initialize the assignment.
Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
block/sed-opal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/sed-opal.c b/block/sed-opal.c
index b6887920a84e9..f62b7ee933f7f 100644
--- a/block/sed-opal.c
+++ b/block/sed-opal.c
@@ -2576,7 +2576,7 @@ static int opal_get_discv(struct opal_dev *dev, struct opal_discovery *discv)
const struct opal_step discovery0_step = {
opal_discovery0, discv
};
- int ret = 0;
+ int ret;
mutex_lock(&dev->dev_lock);
setup_opal_dev(dev);
@@ -3065,7 +3065,7 @@ bool opal_unlock_from_suspend(struct opal_dev *dev)
{
struct opal_suspend_data *suspend;
bool was_failure = false;
- int ret = 0;
+ int ret;
if (!dev)
return false;
--
2.18.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sed-opal: Remove unnecessary ‘0’ values from ret
2024-03-06 10:06 [PATCH] sed-opal: Remove unnecessary ‘0’ values from ret 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:06:59 +0800, Li kunyu wrote:
> ret is assigned first, so it does not need to initialize the assignment.
>
>
Applied, thanks!
[1/1] sed-opal: Remove unnecessary ‘0’ values from ret
commit: 2449be8c8cfcbb24b3cd15d8b55c2c91041c847b
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:06 [PATCH] sed-opal: Remove unnecessary ‘0’ values from ret 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