nvme-apple: return directly instead of else
Subsystems (2)
PATCH 1/2 nvme-apple: return directly instead of else
There is no need for the else when direct return is used at the end of the function.
Signed-off-by Chaitanya Kulkarni <[email protected]>
--- drivers/nvme/host/apple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/nvme/host/apple.c +2 -2
@@ -209,8 +209,8 @@ static inline struct apple_nvme *queue_to_apple_nvme(struct apple_nvme_queue *q) {if (q->is_adminq) return container_of(q, struct apple_nvme, adminq); -else - return container_of(q, struct apple_nvme, ioq); + + return container_of(q, struct apple_nvme, ioq); }static unsigned int apple_nvme_queue_depth (struct apple_nvme_queue *q)
Signature · 1 line
2.29.0
PATCH 2/2 nvme-apple: return directly instead of else
There is no need for the else when direct return is used at the end of the function.
Signed-off-by Chaitanya Kulkarni <[email protected]>
--- drivers/nvme/host/apple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/nvme/host/apple.c +2 -2
@@ -217,8 +217,8 @@ static unsigned int apple_nvme_queue_depth(struct apple_nvme_queue *q) {if (q->is_adminq)return APPLE_NVME_AQ_DEPTH ; -else -return APPLE_ANS_MAX_QUEUE_DEPTH ; + +return APPLE_ANS_MAX_QUEUE_DEPTH ; }static void apple_nvme_rtkit_crashed (void *cookie)
Signature · 1 line
2.29.0
Quoted 5 lines · Chaitanya Kulkarni
There is no need for the else when direct return is used at the end of the function.
Signed-off-by Chaitanya Kulkarni <[email protected]>
Reviewed-by Eric Curtin <[email protected]>
Is mise le meas/Regards,
Eric Curtin
Quoted 23 lines
--- drivers/nvme/host/apple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/nvme/host/apple.c +2
-3@@ -209,8 +209,8 @@ static inline struct apple_nvme *queue_to_apple_nvme(struct apple_nvme_queue *q) {if (q->is_adminq) return container_of(q, struct apple_nvme, adminq); -else - return container_of(q, struct apple_nvme, ioq); + + return container_of(q, struct apple_nvme, ioq); }static unsigned int apple_nvme_queue_depth (struct apple_nvme_queue *q) --2.29.0
Quoted 5 lines · Chaitanya Kulkarni
There is no need for the else when direct return is used at the end of the function.
Signed-off-by Chaitanya Kulkarni <[email protected]>
Reviewed-by Eric Curtin <[email protected]>
Is mise le meas/Regards,
Eric Curtin
Quoted 23 lines
--- drivers/nvme/host/apple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/nvme/host/apple.c +2
-3@@ -217,8 +217,8 @@ static unsigned int apple_nvme_queue_depth(struct apple_nvme_queue *q) {if (q->is_adminq)return APPLE_NVME_AQ_DEPTH ; -else -return APPLE_ANS_MAX_QUEUE_DEPTH ; + +return APPLE_ANS_MAX_QUEUE_DEPTH ; }static void apple_nvme_rtkit_crashed (void *cookie) --2.29.0
Christoph Hellwig
AppliedThanks,
applied to nvme-6.4.