From: Alison Schofield <alison.schofield@intel.com>
To: Kushal Kothari <kushalkothari285@gmail.com>
Cc: mike.rapoport@gmail.com, outreachy-kernel@googlegroups.com,
mchehab@kernel.org, sakari.ailus@linux.intel.com,
gregkh@linuxfoundation.org, kushalkothari2850@gmail.com
Subject: Re: [Outreachy kernel] [PATCH] staging : media : atomisp : input_system.c : fixes the error of control reaches end of non-void function [-Werror=return-type]
Date: Thu, 14 Oct 2021 19:26:59 -0700 [thread overview]
Message-ID: <20211015022659.GB428161@alison-desk> (raw)
In-Reply-To: <20211014223007.596789-1-kushalkothari285@gmail.com>
On Fri, Oct 15, 2021 at 04:00:09AM +0530, Kushal Kothari wrote:
> The compiler cannot tell from that code if the function will ever reach
> the end and still return something. To make that clear, replaced the last
> line with just "else" which fixes the error of "error: control reaches end of non-void function [-Werror=return-type]"
>
> Signed-off-by: Kushal Kothari <kushalkothari285@gmail.com>
Hi Kushal,
Thanks for the patch and welcome to Outreachy.
Unfortunately we're not accepting patches in this driver this round.
Any other driver within media is OK. See the google-groups welcome
message and the email history since October 8th for more info.
I also updated the first patch tutorial, because you showed me that
this restriction was too easy to miss.
Anyway, just so your patch isn't for nothing, I'll give you feedback
on the commit message. You'll want to write that in the imperative mode,
So, for one like this, maybe something like:
'remove conditional from return in non-void function'
Alison
> ---
> .../media/atomisp/pci/hive_isp_css_common/host/input_system.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
> index 8e085dda0c18..91bad8f34efc 100644
> --- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
> +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
> @@ -1587,6 +1587,7 @@ static input_system_err_t input_system_configure_channel_sensor(
> status = set_source_type(&config.source_type, channel.source_type,
> &config.source_type_flags);
> if (status != INPUT_SYSTEM_ERR_NO_ERROR) return status;
> + else return status;
>
> // Check for conflicts on source (implicitly on multicast, capture unit and input buffer).
>
> --
> 2.25.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20211014223007.596789-1-kushalkothari285%40gmail.com.
next prev parent reply other threads:[~2021-10-15 2:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 22:30 [PATCH] staging : media : atomisp : input_system.c : fixes the error of control reaches end of non-void function [-Werror=return-type] Kushal Kothari
2021-10-15 2:26 ` Alison Schofield [this message]
2021-10-15 8:54 ` [Outreachy kernel] " Kieran Bingham
2021-10-15 12:04 ` Fabio M. De Francesco
2021-10-15 12:18 ` Fabio M. De Francesco
2021-10-15 14:52 ` Julia Lawall
2021-10-15 15:11 ` 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=20211015022659.GB428161@alison-desk \
--to=alison.schofield@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=kushalkothari2850@gmail.com \
--cc=kushalkothari285@gmail.com \
--cc=mchehab@kernel.org \
--cc=mike.rapoport@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
--cc=sakari.ailus@linux.intel.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.