From patchwork Wed Apr 15 11:13:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 461490 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 53E4114021A for ; Wed, 15 Apr 2015 21:13:42 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D23D0A743F; Wed, 15 Apr 2015 13:13:39 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vDYDtlteYpEl; Wed, 15 Apr 2015 13:13:39 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 25F14A742B; Wed, 15 Apr 2015 13:13:39 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 83105A742B for ; Wed, 15 Apr 2015 13:13:35 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3hsfD2G5CT78 for ; Wed, 15 Apr 2015 13:13:35 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by theia.denx.de (Postfix) with ESMTPS id 549E6A7425 for ; Wed, 15 Apr 2015 13:13:31 +0200 (CEST) Received: by wiun10 with SMTP id n10so55715795wiu.1 for ; Wed, 15 Apr 2015 04:13:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=uZevIImsATINXhZ9Nr77nzn8WLc3ZoPgGYannvpGZDo=; b=RUzfIRsgwPLJpaYk3hE+Phcco1A4Y3HipLP2Ytl64PPZoxHQjZzhEY879LKNtA2ZRW a5orIHtOAanksbn1xP7bK/RZVnm/S8V6VoZClbQsiGkBPnGYZrndWO0DzeqI9puAqUGa TFoNygrefYXkqjU6gfo4uaEP/P8gZ0KapNWAH9+/BRmx2YSghEYsOqxSxroDNozg+AT0 rJwFdvyXQNtNBq7PsinZwqmSpEVnnygQp4tqST2LTPQ/AvB2SDcj7OVq6iu373jfk/mH LIVff3dnqgc7Lx14RiOscn/Nl6aJtlaPps0P4Sc/OF2XeZPhFl4VLI6myNnY45+YOBxV t6Cg== X-Gm-Message-State: ALoCoQkBvJckT0jUMj58JAZv8dpmg9reT1BNvFwkbjn+KzQR4kXGI+BRfXQgFqMw/HpRCmootXGV X-Received: by 10.194.121.136 with SMTP id lk8mr46426339wjb.49.1429096411615; Wed, 15 Apr 2015 04:13:31 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by mx.google.com with ESMTPSA id bi3sm11474954wib.5.2015.04.15.04.13.30 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Wed, 15 Apr 2015 04:13:30 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de Date: Wed, 15 Apr 2015 13:13:28 +0200 Message-Id: <89267fe89c1608e20149e7dbf43684a581ee9c2b.1429096406.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.3.5 Cc: Tom Rini , Siva Durga Prasad Paladugu Subject: [U-Boot] [PATCH] zynq: spi: Remove unnecessary error condition X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Siva Durga Prasad Paladugu Removed the unnecessary error check from spi_xfer as the bitlen zero is possible now to deassert the chip select for which no data is required to be transfered. Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- drivers/spi/zynq_spi.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/spi/zynq_spi.c b/drivers/spi/zynq_spi.c index 5da87591ceef..e9129da79d99 100644 --- a/drivers/spi/zynq_spi.c +++ b/drivers/spi/zynq_spi.c @@ -227,9 +227,6 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, debug("spi_xfer: bus:%i cs:%i bitlen:%i len:%i flags:%lx\n", slave->bus, slave->cs, bitlen, len, flags); - if (bitlen == 0) - return -1; - if (bitlen % 8) { debug("spi_xfer: Non byte aligned SPI transfer\n"); return -1;