Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2705766imm; Sun, 30 Sep 2018 03:07:22 -0700 (PDT) X-Google-Smtp-Source: ACcGV626d+bHiXBRek5JE4rJOLQ4nzffMW5EB91N5wn6zj5Bhdzm5yjnnBu4kyWvwI5APwtslZSJ X-Received: by 2002:a17:902:4281:: with SMTP id h1-v6mr6719501pld.134.1538302042630; Sun, 30 Sep 2018 03:07:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538302042; cv=none; d=google.com; s=arc-20160816; b=o5pGYBiw1JeLHHCMjhWKgoCPt5qhs5Nn2BQU8S54H841/9yYiDzDzxHWk6BhDoY6QX Sgb8ul13BReT+pWHFTwhKSNmfdDa6QooqMfxK9HCTtTDQ36vCEvTLmDRuLoGMlkZrNDm onNYh3ZF5dNISmT9HdQxSrYTrsyLmJT+Wya1XjJq1o187Z/3ZdgAXpL06Rm9KY31IhU2 OyKxeoiB2MjO2IhWDEnJQA1wEN/WGsI+VzrSYJZW3Z1p7XgDX86xr52IezNQ0uuFNOka gXD+2DNaBjwXZLZxxuhAha4IMFkXU5UjGH54zc97cZflI+C05rNOl73KgTu0gvgB29XY jUGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=0XvMNdHAQ+PuTTejMQPORGvTvBMmr7yyZq20UvLOXzU=; b=vDgYPkcN9DqxaVbARVP/cwtD9KChz9pAUtwXb5otIe7lrQz7C0k0+9snSBFdzkge71 PGixmDW5kc3wQ3UHrdppXehaBKEU5vQA5Mtzcwb+y2vf8eyCglLVGE6UPBJMP0QCltB2 eJe51q8sJPSvrmKrwxMI26SARVde7FVfCobzIREfKBHk9LgOo/a5Ee+d51mHM6S+Cz7s PesfM+EVvI8YdBjvDC6HlWR42f81wckzM4bEaBxu0H1E8iNmVZF343kZIOeeFLUs9mgL x/b9jq3kNFjWdIJPFJwRg3kxUOFu/5RPQoKlEtyt+YHRgUzCo/vyREvcaU1pwxaNY8jI w6Yw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5-v6si9419598plh.312.2018.09.30.03.07.07; Sun, 30 Sep 2018 03:07:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728144AbeI3QjY (ORCPT + 99 others); Sun, 30 Sep 2018 12:39:24 -0400 Received: from mail.bootlin.com ([62.4.15.54]:38420 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728035AbeI3QjY (ORCPT ); Sun, 30 Sep 2018 12:39:24 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id EDF91207D8; Sun, 30 Sep 2018 12:06:59 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (unknown [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id B6D50206A2; Sun, 30 Sep 2018 12:06:59 +0200 (CEST) Date: Sun, 30 Sep 2018 12:06:59 +0200 From: Boris Brezillon To: Chuanhua Han Cc: broonie@kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, eha@deif.com Subject: Re: [PATCH v2 2/4] spi: spi-fsl-dspi: Fix delete the processing of undefined bitmask for rxdata Message-ID: <20180930120659.71b0e1e5@bbrezillon> In-Reply-To: <20180930092535.24544-2-chuanhua.han@nxp.com> References: <20180930092535.24544-1-chuanhua.han@nxp.com> <20180930092535.24544-2-chuanhua.han@nxp.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 30 Sep 2018 17:25:33 +0800 Chuanhua Han wrote: > This patch fixes the problem of rxdata being equal to 0 during the XSPI > mode transfer of the dspi controller. > In XSPI mode, If it is not deleted, the value of rxdata will be equal > to 0, and the data received will not be received correctly, causing the > receiving transfer of the spi to fail. > > Signed-off-by: Chuanhua Han > --- > Changes in v2: > -The original patch is divided into multiple patches(the original > patch theme is "spi: spi-fsl-dspi: Fix support for XSPI transport > mode"),one of which is segmented. > > drivers/spi/spi-fsl-dspi.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c > index 3082e72e4f6c..4dc1064bf408 100644 > --- a/drivers/spi/spi-fsl-dspi.c > +++ b/drivers/spi/spi-fsl-dspi.c > @@ -243,9 +243,6 @@ static void dspi_push_rx(struct fsl_dspi *dspi, u32 rxdata) > if (!dspi->rx) > return; > > - /* Mask of undefined bits */ > - rxdata &= (1 << dspi->bits_per_word) - 1; > - Why not if (dspi->bits_per_word) rxdata &= (1 << dspi->bits_per_word) - 1; > if (dspi->bytes_per_word == 1) > *(u8 *)dspi->rx = rxdata; > else if (dspi->bytes_per_word == 2)