Message ID | Y+dnFKut9qiQUxjW@ubun2204.myguest.virtualbox.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1424155wrn; Sat, 11 Feb 2023 02:09:25 -0800 (PST) X-Google-Smtp-Source: AK7set8tSZvp3x0rRMgaVmoUvSVj1blT0FjydsEK6aSwZIngNzZuANu+i7jw3buXlHQ1i+icWjtm X-Received: by 2002:aa7:9798:0:b0:5a8:58b5:bfa5 with SMTP id o24-20020aa79798000000b005a858b5bfa5mr7520777pfp.4.1676110164876; Sat, 11 Feb 2023 02:09:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676110164; cv=none; d=google.com; s=arc-20160816; b=IrI2yxkQ5GR7T+7GlFmxI2JYC0TQ1d8nRYyip3UIc1i88rW2YatgtgMLaFT11tw7qO CSLfFCNn8fRirQNoiY8hIguGeUmd0snBBq5hToXEh4ku/6EOOLZr9q64Mzuox7nRdX7V BsVcL2A+6Ud29HCz+NYp0QX3uBL4RvpQzjJLJnkHhyyYaOBiU2jh4myELqhJCSWid17p G6JmjkKjVXr9qUysJ5y85vqKhrGDHyWHyTpI+bvRCnt4CHrXz7idtvXvlbMv/QOfnWVH etF+u7Jleytwjoc7VgAJxQktMv597BH/g6kvBW6hmPiWG4dkJsvYnksBQQtoOVmrGw3B 9ktw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=zn6EpaU8/jOmdoODfbGBaPcpwLPH4EF1rhJRojuXWTw=; b=k3dQHyxM22lhOuORA6qwB0mbS8GVqyo7+4YZbk24axTX2ugIaGk6bnSHKgzeLdtpqF IZGs6VFAasDtta8/Wk6VptsQmzU90rhvT4q6BXP2O14L+reeVzMK+dEVzZkdKV1p2Mze X0K3UJlNwEI/wfT5xRixkck4I+qjFnPlskwmWNvUejhgQmuIrEEn6t87qwDSNbAHEMVJ G0ZBx5aSoecZrGrX7rkoh0zOgHsf+/UYifFlUQeuYh6xqRlp9djGRILIYgyRCSgDq94d FBlphivenZfF7U4VmP7iVz+zXGRuOVascxzDtVsrGV1to+RuNjK/4cIObpbXtph7xlfa lEiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=LNyUKIjn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s18-20020aa78bd2000000b0059261fe5529si6317164pfd.215.2023.02.11.02.09.11; Sat, 11 Feb 2023 02:09:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=LNyUKIjn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229912AbjBKKAJ (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Sat, 11 Feb 2023 05:00:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbjBKKAH (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 11 Feb 2023 05:00:07 -0500 Received: from msg-2.mailo.com (msg-2.mailo.com [213.182.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA9A2518E4; Sat, 11 Feb 2023 02:00:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1676109597; bh=D8qkab8ssGlw+mVmXbLNkbKTP7mF/04quddJMJ9bcPI=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=LNyUKIjnMXfBc0Wbiu39t9xuDjIuxKXRaULH7tGo+0TeGnEB82BT3QOcSFEVAB4Z/ dVcDgtQcyF+1zgTisYfrq16dnYOYT8NnExj0CQPjFNHHlEo/uTrfZoBGNcGMGgCBRz 5Tm+zlwFyKfrn3xhZRn7Od3I0yOsBdHaLarU9D3U= Received: by b-1.in.mailobj.net [192.168.90.11] with ESMTP via ip-206.mailobj.net [213.182.55.206] Sat, 11 Feb 2023 10:59:51 +0100 (CET) X-EA-Auth: 09/7if+Hd+nnm3A4C9p10cPGy55DiZZia/OkdlQlKSreoSpOCF6BZgSzqKVq3WjWv+uRyDhPs+qAhJTwyPEBN0HMV4S/DA+W Date: Sat, 11 Feb 2023 15:29:48 +0530 From: Deepak R Varma <drv@mailo.com> To: Mark Brown <broonie@kernel.org>, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Saurabh Singh Sengar <ssengar@microsoft.com>, Praveen Kumar <kumarpraveen@linux.microsoft.com>, Deepak R Varma <drv@mailo.com> Subject: [PATCH] spi: Remove extra/duplicate constant from expression Message-ID: <Y+dnFKut9qiQUxjW@ubun2204.myguest.virtualbox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757528892189828930?= X-GMAIL-MSGID: =?utf-8?q?1757528892189828930?= |
Series |
spi: Remove extra/duplicate constant from expression
|
|
Commit Message
Deepak R Varma
Feb. 11, 2023, 9:59 a.m. UTC
Constant SPI_TX_OCTAL is included twice while building the controller
mode bits. Remove the extra constant.
Issue identified using doublebitand.cocci Coccinelle semantic patch.
Signed-off-by: Deepak R Varma <drv@mailo.com>
---
drivers/spi/spi-sn-f-ospi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Le 11/02/2023 à 10:59, Deepak R Varma a écrit : > Constant SPI_TX_OCTAL is included twice while building the controller > mode bits. Remove the extra constant. > Issue identified using doublebitand.cocci Coccinelle semantic patch. > > Signed-off-by: Deepak R Varma <drv-asAA5fHt7EIAvxtiuMwx3w@public.gmane.org> > --- > drivers/spi/spi-sn-f-ospi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/spi/spi-sn-f-ospi.c b/drivers/spi/spi-sn-f-ospi.c > index 348c6e1edd38..19284d6914fc 100644 > --- a/drivers/spi/spi-sn-f-ospi.c > +++ b/drivers/spi/spi-sn-f-ospi.c > @@ -611,7 +611,7 @@ static int f_ospi_probe(struct platform_device *pdev) > return -ENOMEM; > > ctlr->mode_bits = SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL > - | SPI_RX_DUAL | SPI_RX_QUAD | SPI_TX_OCTAL > + | SPI_RX_DUAL | SPI_RX_QUAD Or maybe s/SPI_TX_OCTAL/SPI_RX_OCTAL/ ? CJ > | SPI_MODE_0 | SPI_MODE_1 | SPI_LSB_FIRST; > ctlr->mem_ops = &f_ospi_mem_ops; > ctlr->bus_num = -1;
diff --git a/drivers/spi/spi-sn-f-ospi.c b/drivers/spi/spi-sn-f-ospi.c index 348c6e1edd38..19284d6914fc 100644 --- a/drivers/spi/spi-sn-f-ospi.c +++ b/drivers/spi/spi-sn-f-ospi.c @@ -611,7 +611,7 @@ static int f_ospi_probe(struct platform_device *pdev) return -ENOMEM; ctlr->mode_bits = SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL - | SPI_RX_DUAL | SPI_RX_QUAD | SPI_TX_OCTAL + | SPI_RX_DUAL | SPI_RX_QUAD | SPI_MODE_0 | SPI_MODE_1 | SPI_LSB_FIRST; ctlr->mem_ops = &f_ospi_mem_ops; ctlr->bus_num = -1;