Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp299537yba; Sat, 13 Apr 2019 01:02:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqlHzVVrmDl3BlCglJ5oiwCJSCvHNAZKiQ9d/N8ZHX0f+8o2YCURiFA+AJoX+K/0abuo/X X-Received: by 2002:a17:902:bf07:: with SMTP id bi7mr33202251plb.87.1555142570048; Sat, 13 Apr 2019 01:02:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555142570; cv=none; d=google.com; s=arc-20160816; b=kJUgrafIiJ88ijXBhZvz3Lwz0FIIS71FPO0cNcjJoFA7mpm+XSQ+ogg6Bgrwt08rTM K39e71qZqYSIX7sBp9K4oCo18EkZs2opnrr1AVCJS0QLmwq7A6A64MI2qSdB+96OtO8F sa1iCzKrQsmh6OZC1xDIAlWvAw/I3qhi/epUsYKGxO6GGbJDd/IVb5v2KO7zfnD8jzHs KD3IKZiokFkZbSE36D8T8eoYQZgSQuLyG13SEblwR+00h+EtqeUCDGGwvGt5tGD45Ez7 Wg14fkATC8oCl+wJ/lMkaUi2ZmbjdHz18TQbEiApPak/fQQOmwmgCtgLVjQUo6N4Mawo HpYA== 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; bh=3vllFzFMPO37wu0NMKvD5Z8CRVSUwa/lYv/Pg2RfA5M=; b=pWJeSWuamDpjb3b8Drt5KxP1DPf3Xslg73P3psofa63JS2iOd4lUg0cHMDdNQQ1hn5 I5ycMOoOtZ3snjfc1ye0pNskpdTJOHjkBiU7TwKAA/NZpRjR2Trk7/JqXgddUll7a2MN UowV1UOuAiW7oF5boYQ+I60B736mVwg9FZWShIpA1/19ZgEEkY2Kq9Jy0A8G3cGUz4Wk hOVrM31KLUME71+QaC6WrgLujRyh4LvSWxpzQHZQjie3L75hwSiPbMSyASpk3GrcdUkg b7JxmyedGHPzmwpJdbiwOP7sO/cGzfq1/HFyhDNyj4dxxVIQIoad+YQsXELqAM4ag3FI trxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=IAe1TLu1; 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 v186si22492032pgd.466.2019.04.13.01.02.33; Sat, 13 Apr 2019 01:02:50 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=IAe1TLu1; 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 S1727069AbfDMIB7 (ORCPT + 99 others); Sat, 13 Apr 2019 04:01:59 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:42850 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726258AbfDMIB6 (ORCPT ); Sat, 13 Apr 2019 04:01:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3vllFzFMPO37wu0NMKvD5Z8CRVSUwa/lYv/Pg2RfA5M=; b=IAe1TLu1o1Z6y6/xMwIHH1N23 FhX1USEYTM/bQS7Xcsz+0hjWV99pEzZxYJxw+IXRsY4H4nn9y3ubcbsOJd05sYZtxvmYez2OIff2P Qvoo/KmhTBm0uU/8o566+RgQVX0lUuet7OP9fVPchAZH+zHx87eEdOVB9kwLjA46+grPXtPQ95Z0R cOiGnZ6nDSd/YmjCtoGTdkM4mSVGzYU10iyf6Uyz0BNdx15j674HQKcQkY69gXQZ4m8M7io1kIevk mJdTPg0bpwqUoJhirzSMSharYlRr3HvrERyCcaYeKV8gtIskS62TsFBbZWUqRQfqXzD6HhFn1aV0o j/jivQkOQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFDbq-0002fX-A2; Sat, 13 Apr 2019 08:01:58 +0000 Date: Sat, 13 Apr 2019 01:01:58 -0700 From: Christoph Hellwig To: Mao Han Cc: Christoph Hellwig , linux-kernel@vger.kernel.org, guoren@kernel.org Subject: Re: [PATCH 2/3] riscv: Add support for perf registers sampling Message-ID: <20190413080158.GA3891@infradead.org> References: <20190411141435.GA8343@infradead.org> <20190412093851.GA4961@vmh-VirtualBox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190412093851.GA4961@vmh-VirtualBox> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 12, 2019 at 05:38:53PM +0800, Mao Han wrote: > > > > > + fp = user_backtrace(entry, fp, regs->ra); > > > + while ((entry->nr < entry->max_stack) && > > > + fp && !((unsigned long)fp & 0x3)) > > > + fp = user_backtrace(entry, fp, 0); > > > > Please don't indent the condition continuation and the loop body > > by the same amount. > > Like this? > while ((entry->nr < entry->max_stack) && > fp && !((unsigned long)fp & 0x3)) > fp = user_backtrace(entry, fp, 0); We tend to either use indentations to the same level as the condition, or two tabs indents. But I also noticed that we shouldn't even need the cast here as fp already is unsigned long, so it should all fit on one line anyway: while (fp && !(fp & 0x3) && entry->nr < entry->max_stack) fp = user_backtrace(entry, fp, 0);