Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3617603imm; Mon, 4 Jun 2018 06:41:51 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLx/ri/KOIFJmmKqoYwYPgefu0QhEHhtl1W2Hu5wUGwAcXa5VpsurV1SzpOKXC3ulMkdvif X-Received: by 2002:a62:5fc5:: with SMTP id t188-v6mr21419568pfb.214.1528119711819; Mon, 04 Jun 2018 06:41:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528119711; cv=none; d=google.com; s=arc-20160816; b=x7L7O4uHRC0jyuaFQq8gSx+LGOmwoNaSyOs+8wFTSof78arlQxMC0fQMQZ3di8L8Th zvL5sRonratGBP8HQ5J2Cxt+XebA4HRnO60KxC4jxgpK+Jaw4SNSNoO7oUcvEwLrW6Xl sGRCu3a2CrFSq5ZWBjcl5i5nWiU+3/oQKTrlge4bRidsBHDYuU3dcTCL+kFbwS8fILJ6 Cy3VFNLho0iz4e9UzlHKZEzNLDdAvqiIFt9D4PMXKJ1JdlxzM4SZMNw4N+7uwkl8zSyh 853QxI5PZrrwW3Gzd3PfE5Zduy9n8QSzA9npzsBh868slryHN/XboNFZQxX1Bd4IIJib 3pcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=oSeFEF7/0eskjKsQ4EyxxJsZclfcoxPJBDw9+4c5Bmw=; b=SVMe8ffOtIVyjvdxMW/Ta2FirjUkE2cgjAf8Z8RlGBkVK2z9BxNTPKU94iEG4ez5ej /StJ6bYcD9ZU9PiSj//2o/JL4+BW45NSPm5zJhEOxmYzqXuLPCOktloXbXCGg+qyo41G 3GueJTRlfhAEPlvXy2CNjf7ZoMRvAnWra+UpG5250Xd2Mm/WVSQWKBIqOlQiMmdkcUpZ y2KbVNQAufs8DRL7pIxr4CEP6qyDLKWgaIjQkzrm/2dvS6riQFcpk3Olv7Wtb9j0v1AZ StbYvrQAm063r+0psVUz8KYdaokwKqfH5SEVxVnmVpeZLMLce9+wGbUor0U3uzISaxiY Zo6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=LRRyC03t; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31-v6si33667829plj.216.2018.06.04.06.41.37; Mon, 04 Jun 2018 06:41:51 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=LRRyC03t; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753238AbeFDNks (ORCPT + 99 others); Mon, 4 Jun 2018 09:40:48 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:57634 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752800AbeFDNkq (ORCPT ); Mon, 4 Jun 2018 09:40:46 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w54DUju7195895; Mon, 4 Jun 2018 13:40:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=oSeFEF7/0eskjKsQ4EyxxJsZclfcoxPJBDw9+4c5Bmw=; b=LRRyC03tauX8UUZw+0QA77ygG0JiKIwaQiaS2/Rx+sv4enePDCUab2U91AuMdVmcviW7 z6y1W/6JUeX+mzSYlDUtNNspjdopP9C4NRJPAJ4tM/Pqxf9sXLFJQHjqG2NSu6qG/s+G WSMh+iSLbl5GTXLkV49KCpg1x8uze8cKAhKs89B0FSzU+cSGdykrUgaO/zeiprNTYoVq QCAApynaSdcI5ujhT78zCoSFUNJuVKv20VxqyjYL9KKE8SKeI7eKC8FDi+Drim4sdJgN aLwMEsFIXuMPemMdYdc9CjVHSK2RDjdd+txHRVd8eldl9m8vxrWVucrixkPZLUo5ciC3 kQ== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2jbvynuk1f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 Jun 2018 13:40:36 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w54DeZTP021360 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 4 Jun 2018 13:40:35 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w54DeZU0013847; Mon, 4 Jun 2018 13:40:35 GMT Received: from mwanda (/41.202.241.46) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 04 Jun 2018 06:40:34 -0700 Date: Mon, 4 Jun 2018 16:40:24 +0300 From: Dan Carpenter To: Julia Lawall 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() Message-ID: <20180604134024.dmd7mn2wggqpmkcq@mwanda> References: <20180604115842.7c4vzge3igjbnblt@kili.mountain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8914 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=559 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806040161 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 04, 2018 at 10:25:14PM +0900, Julia Lawall wrote: > > > 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. I feel like it should warn about all of those because people shouldn't be submitting unfinished written code to the kernel. Coccinelle is a lot better for this than Smatch is because it's pre-processor stuff. regards, dan carpenter