From patchwork Sun May 20 06:50:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 917063 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40pXhY3H35z9s3M for ; Sun, 20 May 2018 16:54:37 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=the-dreams.de Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40pXhY1knvzDrbX for ; Sun, 20 May 2018 16:54:37 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=the-dreams.de X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=the-dreams.de (client-ip=88.99.104.3; helo=pokefinder.org; envelope-from=wsa@the-dreams.de; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=the-dreams.de Received: from pokefinder.org (sauhun.de [88.99.104.3]) by lists.ozlabs.org (Postfix) with ESMTP id 40pXc35p01zDrWV for ; Sun, 20 May 2018 16:50:41 +1000 (AEST) Received: from localhost (p54B33698.dip0.t-ipconnect.de [84.179.54.152]) by pokefinder.org (Postfix) with ESMTPSA id 18E2A3640AB; Sun, 20 May 2018 08:50:38 +0200 (CEST) From: Wolfram Sang To: linux-i2c@vger.kernel.org Subject: [PATCH 2/2] i2c: opal: don't check number of messages in the driver Date: Sun, 20 May 2018 08:50:34 +0200 Message-Id: <20180520065035.7920-3-wsa@the-dreams.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180520065035.7920-1-wsa@the-dreams.de> References: <20180520065035.7920-1-wsa@the-dreams.de> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wolfram Sang , linux-kernel@vger.kernel.org, Paul Mackerras , linuxppc-dev@lists.ozlabs.org, Peter Rosin Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Since commit 1eace8344c02 ("i2c: add param sanity check to i2c_transfer()") and b7f625840267 ("i2c: add quirk checks to core"), the I2C core does this check now. We can remove it here. Signed-off-by: Wolfram Sang Reviewed-by: Peter Rosin --- Only build tested. drivers/i2c/busses/i2c-opal.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-opal.c b/drivers/i2c/busses/i2c-opal.c index 0aabb7eca0c5..dc2a23f4fb52 100644 --- a/drivers/i2c/busses/i2c-opal.c +++ b/drivers/i2c/busses/i2c-opal.c @@ -94,8 +94,6 @@ static int i2c_opal_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, */ memset(&req, 0, sizeof(req)); switch(num) { - case 0: - return 0; case 1: req.type = (msgs[0].flags & I2C_M_RD) ? OPAL_I2C_RAW_READ : OPAL_I2C_RAW_WRITE; @@ -114,8 +112,6 @@ static int i2c_opal_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, req.size = cpu_to_be32(msgs[1].len); req.buffer_ra = cpu_to_be64(__pa(msgs[1].buf)); break; - default: - return -EOPNOTSUPP; } rc = i2c_opal_send_request(opal_id, &req);