From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Yihao Han <hanyihao@vivo.com>,
Alim Akhtar <alim.akhtar@samsung.com>,
linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] i2c: s3c2410: change return type of 'i2c_s3c_irq_nextbyte' from 'int' to 'void'
Date: Fri, 6 May 2022 15:31:59 +0200 [thread overview]
Message-ID: <4cfe150a-e5c0-8864-552e-afa454bfff43@linaro.org> (raw)
In-Reply-To: <20220506122639.2544-1-hanyihao@vivo.com>
On 06/05/2022 14:26, Yihao Han wrote:
> Since ret is a redundant variable, and none of the callers check
> for return, so remove ret variable and change return type of
> 'i2c_s3c_irq_nextbyte' from 'int' to 'void'
>
> Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Yihao Han <hanyihao@vivo.com>
> ---
> v2: add return in STATE_IDLE case
> ---
> drivers/i2c/busses/i2c-s3c2410.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
> index b49a1b170bb2..d2a1fd2aa7a0 100644
> --- a/drivers/i2c/busses/i2c-s3c2410.c
> +++ b/drivers/i2c/busses/i2c-s3c2410.c
> @@ -381,17 +381,16 @@ static inline int is_msgend(struct s3c24xx_i2c *i2c)
> /*
> * process an interrupt and work out what to do
> */
> -static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
> +static void i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
This still should not compile... are you sure you run all the checks on it?
Please do not cc non-working addresses (kernel@vivo).
Best regards,
Krzysztof
next prev parent reply other threads:[~2022-05-06 13:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-06 12:26 [PATCH v2] i2c: s3c2410: change return type of 'i2c_s3c_irq_nextbyte' from 'int' to 'void' Yihao Han
2022-05-06 13:31 ` Krzysztof Kozlowski [this message]
2022-05-07 3:31 ` kernel test robot
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=4cfe150a-e5c0-8864-552e-afa454bfff43@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=alim.akhtar@samsung.com \
--cc=hanyihao@vivo.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
/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