Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3602210imm; Mon, 4 Jun 2018 06:27:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI5StnNTxckWeLBQXKtOHVMDk7TKgDpgJUua/IV3zPpUmN01d3Aj3I7ak2PigiXDdCv8/nu X-Received: by 2002:a62:20c7:: with SMTP id m68-v6mr21129445pfj.110.1528118837993; Mon, 04 Jun 2018 06:27:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528118837; cv=none; d=google.com; s=arc-20160816; b=TbMZPjVPYu+BysQ0JOmfENv8qEan6nOzGnXvipZTJp4sx2Q9K+ZIrKYRMz9gmvP4kr ErfiansbulcSWURjFI5aXUwABOTdp/7PtPFwICRMF2W21nATKR6ty9bXSBxp3WLoW0c9 trJ2MR75bFfmsomJoApvY351JHCzosTJIJIp2iXBFVNjPMCcyt97kIdJgduLNiiH9RzX yPR0ye5nXk0R87xKyWQKoTT0TiOCzUNOpFsGuFjkGXsJSdhN9yXB5PNrE0g84QN+K5mW bvm+d6pqLtWJ/PpMYHGVZKP+0BCsOkMT1VvOpBTEzCka/4+bDbxNeIbZipNp8gD46M+N WmIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=EZArNpDOPNWF4jmoWMfz8uaOY1iStD3pwE6SWxvG2PI=; b=T+6POLW2eoGTCELpnZFiWtor8/B5puqe30Pj2jTfM5/bQEh8zgmlKlizy2kROtxf8Q FElielNIMM/93jALXGbPQf4pUXc3jqeckdRvtZerw0NMEvXjko7jwu0AgF5aVASie1zM FCwt8WAXcdsGnFyWo6JGU6WgPMjOKWpGumrWHzY18jj5uaHlrwivmHiq+p9AZPAcWVbL AktSa5RiU3Kv01F/1hPHdwHUKoQtX6mkMfw2EPWErWzH80KjfA3gtqrZohTeRChYoJ+Q HVbXzfWe2n6+axzwl9D/sjzbW858ORGr5ivKgA+c9wRMBz0xlGe1WPrxfcaa/ZdhkCfJ Sugw== 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 o1-v6si36837615pgp.273.2018.06.04.06.27.03; Mon, 04 Jun 2018 06:27:17 -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 S1753206AbeFDNZ0 (ORCPT + 99 others); Mon, 4 Jun 2018 09:25:26 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:27584 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753036AbeFDNZY (ORCPT ); Mon, 4 Jun 2018 09:25:24 -0400 X-IronPort-AV: E=Sophos;i="5.49,476,1520895600"; d="scan'208";a="267548847" Received: from 115-178-117-63.flets.shareline.jp (HELO [10.5.3.74]) ([115.178.117.63]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jun 2018 15:25:19 +0200 Date: Mon, 4 Jun 2018 22:25:14 +0900 (JST) From: Julia Lawall X-X-Sender: jll@hadrien To: Dan Carpenter cc: Qiang Zhao , Li Yang , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] fsl/qe: ucc: copy and paste bug in ucc_get_tdm_sync_shift() In-Reply-To: <20180604115842.7c4vzge3igjbnblt@kili.mountain> Message-ID: References: <20180604115842.7c4vzge3igjbnblt@kili.mountain> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 4 Jun 2018, Dan Carpenter wrote: > There is a copy and paste bug so we accidentally use the RX_ shift when > we're in TX_ mode. > > Fixes: bb8b2062aff3 ("fsl/qe: setup clock source for TDM mode") > Signed-off-by: Dan Carpenter > --- > Static analysis work. Not tested. This affects the success path, so > we should probably test it. Maybe this is another one? I don't have time to look into it at the moment... drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c /* For strict priority entries defines the number of consecutive * slots for the highest priority. */ REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_NUM_STRICT_ARB_SLOTS : NIG_REG_P1_TX_ARB_NUM_STRICT_ARB_SLOTS, 0x100); /* Mapping between the CREDIT_WEIGHT registers and actual client * numbers */ I find some others that choose between constants, such as ... ? 0 : 0. julia > > diff --git a/drivers/soc/fsl/qe/ucc.c b/drivers/soc/fsl/qe/ucc.c > index c646d8713861..681f7d4b7724 100644 > --- a/drivers/soc/fsl/qe/ucc.c > +++ b/drivers/soc/fsl/qe/ucc.c > @@ -626,7 +626,7 @@ static u32 ucc_get_tdm_sync_shift(enum comm_dir mode, u32 tdm_num) > { > u32 shift; > > - shift = (mode == COMM_DIR_RX) ? RX_SYNC_SHIFT_BASE : RX_SYNC_SHIFT_BASE; > + shift = (mode == COMM_DIR_RX) ? RX_SYNC_SHIFT_BASE : TX_SYNC_SHIFT_BASE; > shift -= tdm_num * 2; > > return shift; > -- > To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >