From patchwork Tue Feb 25 11:18:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3715651 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DD3C4BF13A for ; Tue, 25 Feb 2014 11:18:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C112D201C7 for ; Tue, 25 Feb 2014 11:18:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 94448201BF for ; Tue, 25 Feb 2014 11:18:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751317AbaBYLSg (ORCPT ); Tue, 25 Feb 2014 06:18:36 -0500 Received: from mail-pb0-f45.google.com ([209.85.160.45]:52328 "EHLO mail-pb0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751220AbaBYLSf (ORCPT ); Tue, 25 Feb 2014 06:18:35 -0500 Received: by mail-pb0-f45.google.com with SMTP id un15so7925539pbc.18 for ; Tue, 25 Feb 2014 03:18:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-type:mime-version:content-transfer-encoding; bh=ZE55GI5KE0wKnH65ZA/XHD4TxPhqGBoxr1U2EvDpIqY=; b=NEp0YMe249OkoxteylWVC+SzxmhZmw45xiV20gYAbhep527vBI4TqBjeWBbhK0YItk Dz+sjBAPe3kTpJRlPUx6g68vc+WlKdqfp3JayiLpHLZFbzLJWNenqzBHVkh1v4kZdR8L ZVoWqMZsSHaQhPqb5+C9k6ZlgBBuYGq3rl5k++D5PPBvIXKVKo5QE4oi6VkxyCNDLLt5 kmU1EjdEu5xTiSaF//izzdL4a9Pr+lYS/T7fUd9X/atFKJJ8MNb1R4KGR9SS5RbCiXJh JgvzGSt3jauyrClMMTOfh+Wcr1QT6pwg2pr8FaV/ph6K0BnwFhl1EnsELn/v8UXxlMyU 8vxA== X-Gm-Message-State: ALoCoQlz19GcgAt3Ak7mQjp8jnwAqWngD5EWa2SrloXmxRWN4TZdW1/pV1KYgoVx7mb1lZwwHDdR X-Received: by 10.68.244.8 with SMTP id xc8mr5912051pbc.164.1393327114921; Tue, 25 Feb 2014 03:18:34 -0800 (PST) Received: from [220.138.156.149] (220-138-156-149.dynamic.hinet.net. [220.138.156.149]) by mx.google.com with ESMTPSA id f5sm140985130pat.11.2014.02.25.03.18.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Feb 2014 03:18:34 -0800 (PST) Message-ID: <1393327109.6723.3.camel@phoenix> Subject: [PATCH 2/3] spi: s3c64xx: Let spi core handle validating transfer length From: Axel Lin To: Mark Brown Cc: Jaswinder Singh , linux-spi@vger.kernel.org Date: Tue, 25 Feb 2014 19:18:29 +0800 In-Reply-To: <1393327017.6723.1.camel@phoenix> References: <1393327017.6723.1.camel@phoenix> X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP spi core will handle validating transfer length since commit 4d94bd21b333 "spi: core: Validate length of the transfers in message". So remove the same checking in this driver. Signed-off-by: Axel Lin --- drivers/spi/spi-s3c64xx.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 9ad5e3e..f19cd97 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -697,13 +697,6 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master, bpw = xfer->bits_per_word; speed = xfer->speed_hz ? : spi->max_speed_hz; - if (xfer->len % (bpw / 8)) { - dev_err(&spi->dev, - "Xfer length(%u) not a multiple of word size(%u)\n", - xfer->len, bpw / 8); - return -EIO; - } - if (bpw != sdd->cur_bpw || speed != sdd->cur_speed) { sdd->cur_bpw = bpw; sdd->cur_speed = speed;