public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Tomasz Unger <tomasz.unger@yahoo.pl>
Cc: Andy Shevchenko <andy@kernel.org>,
	Hans de Goede <hansg@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-staging@lists.linux.dev
Subject: Re: [PATCH v4] media: staging: atomisp: Remove unnecessary return statements from void functions
Date: Wed, 11 Mar 2026 13:12:06 +0300	[thread overview]
Message-ID: <abE_9phG4OhjBLKS@stanley.mountain> (raw)
In-Reply-To: <20260311-atomisp-remove-void-return-v2b-v4-1-62275c55e353@yahoo.pl>

On Wed, Mar 11, 2026 at 10:48:07AM +0100, Tomasz Unger wrote:
> diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_formatter.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_formatter.c
> index 40b3f1e48c56..db4052ab3665 100644
> --- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_formatter.c
> +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_formatter.c
> @@ -6,7 +6,6 @@
>  
>  #include "system_global.h"
>  
> -

I was debating whether I should ignore this...  When you delete a return
and a blank line those have to be done as one step otherwise you're
introducing new checkpatch warnings.  But this blank line is an
unrelated change.  The patch does it a couple other places as well.

>  #include "input_formatter.h"
>  #include <type_support.h>
>  #include "gp_device.h"
> @@ -65,8 +64,6 @@ void input_formatter_rst(
>  	if (!HIVE_IF_BIN_COPY[ID]) {
>  		input_formatter_reg_store(ID, addr, rst);
>  	}
> -
> -	return;
>  }
>  

[ snip ]

> @@ -483,7 +482,6 @@ void hmm_bo_release(struct hmm_buffer_object *bo)
>  	__bo_insert_to_free_rbtree(&bdev->free_rbtree, bo);
>  
>  	mutex_unlock(&bdev->rbtree_mutex);
> -	return;
>  }
>  
>  void hmm_bo_device_exit(struct hmm_bo_device *bdev)
> @@ -737,8 +735,6 @@ void hmm_bo_free_pages(struct hmm_buffer_object *bo)
>  	kfree(bo->pages);
>  	mutex_unlock(&bo->mutex);
>  
> -	return;
> -

Deleting this return introduces a bug.

>  status_err2:
>  	mutex_unlock(&bo->mutex);
>  	dev_err(atomisp_dev,
> @@ -868,8 +864,6 @@ void hmm_bo_unbind(struct hmm_buffer_object *bo)
>  
>  	mutex_unlock(&bo->mutex);
>  
> -	return;
> -

Bug.

>  status_err:
>  	mutex_unlock(&bo->mutex);
>  	dev_err(atomisp_dev,

regards,
dan carpenter


      reply	other threads:[~2026-03-11 10:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260311-atomisp-remove-void-return-v2b-v4-1-62275c55e353.ref@yahoo.pl>
2026-03-11  9:48 ` [PATCH v4] media: staging: atomisp: Remove unnecessary return statements from void functions Tomasz Unger
2026-03-11 10:12   ` Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=abE_9phG4OhjBLKS@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=andy@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tomasz.unger@yahoo.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox