[PATCH 1/2] nvme-apple: return directly instead of else
Eric Curtin
ecurtin at redhat.com
Mon Mar 27 12:13:24 PDT 2023
On Mon, 27 Mar 2023 at 06:56, Chaitanya Kulkarni <kch at 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 at nvidia.com>
Reviewed-by: Eric Curtin <ecurtin at 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
>
>
More information about the Linux-nvme
mailing list