linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaedon Shin <jaedon.shin@gmail.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Kamal Dasu <kdasu.kdev@gmail.com>,
	Brian Norris <computersforpeace@gmail.com>,
	Gregory Fong <gregory.0xf0@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	linux-i2c@vger.kernel.org, Jaedon Shin <jaedon.shin@gmail.com>
Subject: [v2 2/2] i2c: brcmstb: Remove superfluous size check
Date: Fri, 15 Jul 2016 12:45:09 +0900	[thread overview]
Message-ID: <20160715034509.58148-3-jaedon.shin@gmail.com> (raw)
In-Reply-To: <20160715034509.58148-1-jaedon.shin@gmail.com>

The driver transfer to a message with NOACK always in any size.
If client (eg. EDID segment point message) needs NOACK condition, it can
use I2C_M_IGNORE_NAK flag.

Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
---
 drivers/i2c/busses/i2c-brcmstb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-brcmstb.c b/drivers/i2c/busses/i2c-brcmstb.c
index 6a8cfc1344b2..3f5a4d71d3bf 100644
--- a/drivers/i2c/busses/i2c-brcmstb.c
+++ b/drivers/i2c/busses/i2c-brcmstb.c
@@ -343,10 +343,9 @@ static int brcmstb_i2c_xfer_bsc_data(struct brcmstb_i2c_dev *dev,
 	struct bsc_regs *pi2creg = dev->bsc_regmap;
 	int no_ack = pmsg->flags & I2C_M_IGNORE_NAK;
 	int data_regsz = brcmstb_i2c_get_data_regsz(dev);
-	int xfersz = brcmstb_i2c_get_xfersz(dev);
 
 	/* see if the transaction needs to check NACK conditions */
-	if (no_ack || len <= xfersz) {
+	if (no_ack) {
 		cmd = (pmsg->flags & I2C_M_RD) ? CMD_RD_NOACK
 			: CMD_WR_NOACK;
 		pi2creg->ctlhi_reg |= BSC_CTLHI_REG_IGNORE_ACK_MASK;
-- 
2.9.0

  parent reply	other threads:[~2016-07-15  3:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-15  3:45 [v2 0/2] i2c: brcmstb: Add support for BMIPS_GENERIC Jaedon Shin
2016-07-15  3:45 ` [v2 1/2] i2c: brcmstb: Make the driver buildable on BMIPS_GENERIC Jaedon Shin
2016-07-15  6:02   ` Wolfram Sang
2016-07-15  3:45 ` Jaedon Shin [this message]
2016-07-15  6:03   ` [v2 2/2] i2c: brcmstb: Remove superfluous size check Wolfram Sang

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=20160715034509.58148-3-jaedon.shin@gmail.com \
    --to=jaedon.shin@gmail.com \
    --cc=computersforpeace@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=gregory.0xf0@gmail.com \
    --cc=kdasu.kdev@gmail.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    /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).