From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 514F4C004D2 for ; Sun, 30 Sep 2018 10:07:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0977F2075E for ; Sun, 30 Sep 2018 10:07:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0977F2075E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728175AbeI3QjY (ORCPT ); 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) 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)