Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3522618imm; Mon, 4 Jun 2018 05:08:15 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJHxbct8QT0Ry65MttUP7t3dXMw3F0OR91cRwup6I7fB3GnAU9svypVJ3EdHIeiTGZzNu1x X-Received: by 2002:a63:24c4:: with SMTP id k187-v6mr14328702pgk.434.1528114095884; Mon, 04 Jun 2018 05:08:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528114095; cv=none; d=google.com; s=arc-20160816; b=gtHKT/ZtjuvFTUs+9ddVHyDixD2MWOcVyssOwBt+Smg/Vf2kzHqtsBp9IqBJ7uTTpN 6Z45OY5CNwzUgpYy7gTArxUJ7YJ4hgKaDhK/n1icIou2Md7f0TFIz6D97wpScd/stya6 laHQCHE3Qnsu4MCYty4Sfa5Yp4ZCj92FqKwtdqzF33ZiswV9Sm5hadgjHmfpZIaoL4qh ti+REKcCrR9yDc52F9YKDWo3PnZ8vD7LxG8utoJLqF6IXdWEGnrNnA9Wzhm2k2vhRr7p kCB3aI4+VCQsI0WQQbbn94qNKCxzT0AQCAlX2dgz/+sywitDutBBRLlh5qzWlMBAma4d MsSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:arc-authentication-results; bh=VSWA7f629Ad+QHDqYUXv1Z6HxYGWs/+dxuiKJRXSoug=; b=KOD5PJoDKHiZA7hoRh6r1D13G/F/102+wk4uqVgy7Q2zjLmUWqODpMMiYFT0KAKIxZ l7rlGOnpeSy6032F1r/Lcp6QcK6e9K5VflN7hMkBJlRnJkx67ILKaxHMMHOaG1y5rnQB nSgRRyqK8lR0rUQhsqIjr4Nlx55tqLYvaQV0zhtauIkEwks4sAXkqQgD+vuAA9YQ6Nhr aKaWwU44e8Es5kYLA90ZJyYPIt6Ez1eyph9i3aIinOLCMxbRAZfARKO5ofm141YXYgHS d1srMhBT9TnxxQ1/uHqPGznTDwPxQsOxvUVOw8hdIWYtGdRzGMHTBgagoYiapWh2zt6w Kkeg== 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 s184-v6si19175148pgb.172.2018.06.04.05.08.01; Mon, 04 Jun 2018 05:08:15 -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 S1752852AbeFDMHB (ORCPT + 99 others); Mon, 4 Jun 2018 08:07:01 -0400 Received: from mail-ot0-f195.google.com ([74.125.82.195]:42851 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752762AbeFDMG6 (ORCPT ); Mon, 4 Jun 2018 08:06:58 -0400 Received: by mail-ot0-f195.google.com with SMTP id 92-v6so2390807otw.9; Mon, 04 Jun 2018 05:06:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VSWA7f629Ad+QHDqYUXv1Z6HxYGWs/+dxuiKJRXSoug=; b=rb1ongvbXblASmKHZkSRxVSiYMpghkmLJfxbIyDjh+cjn247OZzwfJIynKPA/UCDkN cpoYm/58G+i1y3g9SpUoHq56sjWJvQg+Qv+zGcrxpBnNKTb2LqgHnTk1uLUzWqc3+Y6m gMd1ukLyslVRe3Ng2L4s3uHRi5/kNY9QpZJjz/iDcxcaYXfpNf9HlZwPA9eoB9odKZuN UhDLQyvECjtuy2fGmDIkGrux0KXuCynqtQOtdQpGpdENELd3ciBCjo8BSOCqRaw+9j2d HuY1jx7kC6PDjyn0CwOGv0F7uwUXoTkP2AmOPvBKp5OYSPgGW9GxgI/uue07SVZaJ/Cf w2Zg== X-Gm-Message-State: APt69E0vfkX2j+QYp6LWBjzMxRfZtLZ3VDT3uOMO1nvhkYHeoAmBVc94 tri+oZPy/sT3vlSB2/XgM32km7/QDy1kA+ZVahU= X-Received: by 2002:a9d:3047:: with SMTP id w7-v6mr4735634otd.281.1528114018225; Mon, 04 Jun 2018 05:06:58 -0700 (PDT) MIME-Version: 1.0 References: <20180604115842.7c4vzge3igjbnblt@kili.mountain> In-Reply-To: <20180604115842.7c4vzge3igjbnblt@kili.mountain> From: Mathieu Malaterre Date: Mon, 4 Jun 2018 14:06:45 +0200 Message-ID: Subject: Re: [PATCH] fsl/qe: ucc: copy and paste bug in ucc_get_tdm_sync_shift() To: Dan Carpenter Cc: qiang.zhao@nxp.com, kernel-janitors@vger.kernel.org, linuxppc-dev , LKML , leoyang.li@nxp.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Where did the original go ? https://patchwork.ozlabs.org/patch/868158/ On Mon, Jun 4, 2018 at 2:02 PM 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. > > 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;