linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Michael Wu <michael.wu@vatics.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Morgan Chang <morgan.chang@vatics.com>
Subject: Re: [PATCH v2] i2c: designware: call i2c_dw_read_clear_intrbits_slave() once
Date: Thu, 22 Oct 2020 16:50:04 +0300	[thread overview]
Message-ID: <c96a6a99-5638-76c6-358e-e355f0f6b114@linux.intel.com> (raw)
In-Reply-To: <20201022054625.21969-1-michael.wu@vatics.com>

Hi

On 10/22/20 8:46 AM, Michael Wu wrote:
> @@ -217,10 +214,8 @@ static int i2c_dw_irq_handler_slave(struct dw_i2c_dev *dev)
>   		if (!i2c_slave_event(dev->slave, I2C_SLAVE_WRITE_RECEIVED,
>   				     &val))
>   			dev_vdbg(dev->dev, "Byte %X acked!", val);
> -	} else {
> +	} else
>   		i2c_slave_event(dev->slave, I2C_SLAVE_STOP, &val);
> -		stat = i2c_dw_read_clear_intrbits_slave(dev);
> -	}
>   
Minor nit.  Please don't remove braces here since the upper part of if 
statement has them.

 From Documentation/process/coding-style.rst:
"
This does not apply if only one branch of a conditional statement is a 
single
statement; in the latter case use braces in both branches:

.. code-block:: c

         if (condition) {
                 do_this();
                 do_that();
         } else {
                 otherwise();
         }
"

Otherwise looks good to me.

Jarkko

      reply	other threads:[~2020-10-22 13:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22  5:46 [PATCH v2] i2c: designware: call i2c_dw_read_clear_intrbits_slave() once Michael Wu
2020-10-22 13:50 ` Jarkko Nikula [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=c96a6a99-5638-76c6-358e-e355f0f6b114@linux.intel.com \
    --to=jarkko.nikula@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.wu@vatics.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=morgan.chang@vatics.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).