* [PATCH 1/2] nvme-apple: return directly instead of else
@ 2023-03-27 5:48 Chaitanya Kulkarni
2023-03-27 5:48 ` [PATCH 2/2] " Chaitanya Kulkarni
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Chaitanya Kulkarni @ 2023-03-27 5:48 UTC (permalink / raw)
To: marcan, sven, alyssa
Cc: kbusch, hch, sagi, asahi, linux-nvme, 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 <kch@nvidia.com>
---
drivers/nvme/host/apple.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
index 5fc5ea196b40..942a3b71a6d5 100644
--- a/drivers/nvme/host/apple.c
+++ b/drivers/nvme/host/apple.c
@@ -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
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] nvme-apple: return directly instead of else
2023-03-27 5:48 [PATCH 1/2] nvme-apple: return directly instead of else Chaitanya Kulkarni
@ 2023-03-27 5:48 ` Chaitanya Kulkarni
2023-03-27 19:13 ` Eric Curtin
2023-03-27 19:13 ` [PATCH 1/2] " Eric Curtin
2023-04-05 15:23 ` Christoph Hellwig
2 siblings, 1 reply; 5+ messages in thread
From: Chaitanya Kulkarni @ 2023-03-27 5:48 UTC (permalink / raw)
To: marcan, sven, alyssa
Cc: kbusch, hch, sagi, asahi, linux-nvme, 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 <kch@nvidia.com>
---
drivers/nvme/host/apple.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
index 942a3b71a6d5..33601494ae50 100644
--- a/drivers/nvme/host/apple.c
+++ b/drivers/nvme/host/apple.c
@@ -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
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 2/2] nvme-apple: return directly instead of else
2023-03-27 5:48 ` [PATCH 2/2] " Chaitanya Kulkarni
@ 2023-03-27 19:13 ` Eric Curtin
0 siblings, 0 replies; 5+ messages in thread
From: Eric Curtin @ 2023-03-27 19:13 UTC (permalink / raw)
To: Chaitanya Kulkarni
Cc: marcan, sven, alyssa, kbusch, hch, sagi, asahi, linux-nvme
On Mon, 27 Mar 2023 at 06:55, Chaitanya Kulkarni <kch@nvidia.com> wrote:
>
> There is no need for the else when direct return is used at the end of
> the function.
>
> Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Eric Curtin <ecurtin@redhat.com>
Is mise le meas/Regards,
Eric Curtin
> ---
> drivers/nvme/host/apple.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
> index 942a3b71a6d5..33601494ae50 100644
> --- a/drivers/nvme/host/apple.c
> +++ b/drivers/nvme/host/apple.c
> @@ -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
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] nvme-apple: return directly instead of else
2023-03-27 5:48 [PATCH 1/2] nvme-apple: return directly instead of else Chaitanya Kulkarni
2023-03-27 5:48 ` [PATCH 2/2] " Chaitanya Kulkarni
@ 2023-03-27 19:13 ` Eric Curtin
2023-04-05 15:23 ` Christoph Hellwig
2 siblings, 0 replies; 5+ messages in thread
From: Eric Curtin @ 2023-03-27 19:13 UTC (permalink / raw)
To: Chaitanya Kulkarni
Cc: marcan, sven, alyssa, kbusch, hch, sagi, asahi, linux-nvme
On Mon, 27 Mar 2023 at 06:56, Chaitanya Kulkarni <kch@nvidia.com> wrote:
>
> There is no need for the else when direct return is used at the end of
> the function.
>
> Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Eric Curtin <ecurtin@redhat.com>
Is mise le meas/Regards,
Eric Curtin
> ---
> drivers/nvme/host/apple.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
> index 5fc5ea196b40..942a3b71a6d5 100644
> --- a/drivers/nvme/host/apple.c
> +++ b/drivers/nvme/host/apple.c
> @@ -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
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 1/2] nvme-apple: return directly instead of else
2023-03-27 5:48 [PATCH 1/2] nvme-apple: return directly instead of else Chaitanya Kulkarni
2023-03-27 5:48 ` [PATCH 2/2] " Chaitanya Kulkarni
2023-03-27 19:13 ` [PATCH 1/2] " Eric Curtin
@ 2023-04-05 15:23 ` Christoph Hellwig
2 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2023-04-05 15:23 UTC (permalink / raw)
To: Chaitanya Kulkarni
Cc: marcan, sven, alyssa, kbusch, hch, sagi, asahi, linux-nvme
Thanks,
applied to nvme-6.4.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-04-05 15:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-27 5:48 [PATCH 1/2] nvme-apple: return directly instead of else Chaitanya Kulkarni
2023-03-27 5:48 ` [PATCH 2/2] " Chaitanya Kulkarni
2023-03-27 19:13 ` Eric Curtin
2023-03-27 19:13 ` [PATCH 1/2] " Eric Curtin
2023-04-05 15:23 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox