All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [PATCH] staging:vc04_services:bcm2835-camera:controls.c: Fix multiple line dereference
Date: Mon, 19 Mar 2018 15:12:41 +0100	[thread overview]
Message-ID: <20180319141241.GA17366@kroah.com> (raw)
In-Reply-To: <1521468462-28073-1-git-send-email-nishka.dasgupta_ug18@ashoka.edu.in>

On Mon, Mar 19, 2018 at 02:07:42PM +0000, Nishka Dasgupta wrote:
> Fix multiple line dereference. Issue found with checkpatch.

What is a "multiple line dereference"?

> 
> Signed-off-by: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
> ---
>  drivers/staging/vc04_services/bcm2835-camera/controls.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/vc04_services/bcm2835-camera/controls.c b/drivers/staging/vc04_services/bcm2835-camera/controls.c
> index cff7b1e..bae7f2e 100644
> --- a/drivers/staging/vc04_services/bcm2835-camera/controls.c
> +++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c
> @@ -1194,6 +1194,8 @@ int set_framerate_params(struct bm2835_mmal_dev *dev)
>  {
>  	struct mmal_parameter_fps_range fps_range;
>  	int ret;
> +	int mcc = MMAL_COMPONENT_CAMERA;
> +	int mcpp = MMAL_CAMERA_PORT_PREVIEW;
>  
>  	if ((dev->exposure_mode_active != MMAL_PARAM_EXPOSUREMODE_OFF) &&
>  	    (dev->exp_auto_priority)) {
> @@ -1220,8 +1222,7 @@ int set_framerate_params(struct bm2835_mmal_dev *dev)
>  		 fps_range.fps_high.den);
>  
>  	ret = vchiq_mmal_port_parameter_set(dev->instance,
> -					    &dev->component[MMAL_COMPONENT_CAMERA]->
> -					    output[MMAL_CAMERA_PORT_PREVIEW],
> +					    &dev->component[mcc]->output[mcpp],

I don't see what the benifit of this change is here, a shorter line?
It's really not worth it, don't you think?

thanks,

greg k-h


  reply	other threads:[~2018-03-19 14:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-19 14:07 [PATCH] staging:vc04_services:bcm2835-camera:controls.c: Fix multiple line dereference Nishka Dasgupta
2018-03-19 14:12 ` Greg KH [this message]
2018-03-19 15:24   ` Nishka Dasgupta
2018-03-19 15:30     ` Greg KH
2018-03-19 15:34       ` Nishka Dasgupta
2018-03-19 15:47         ` Greg KH

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=20180319141241.GA17366@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=nishka.dasgupta_ug18@ashoka.edu.in \
    --cc=outreachy-kernel@googlegroups.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.