Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5586863rwi; Tue, 18 Oct 2022 00:55:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4vo+oF4qFamiQJLKKMiLxxe4YqC/x5xlwEHyYF3cjIYiQtVqE9LuEtLLJRe6M4+r8VKQqg X-Received: by 2002:a63:f103:0:b0:439:398f:80f8 with SMTP id f3-20020a63f103000000b00439398f80f8mr1619533pgi.494.1666079703442; Tue, 18 Oct 2022 00:55:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666079703; cv=none; d=google.com; s=arc-20160816; b=PM+TBtFV4tyaaBSgyhAaD8s5aFTmZjOfs8B08101Wk2phxYnMo8rCMPsWxsDItPSIN J157hKhiiOYtqYX3kSaLTcKzyBpvVxMcoou8bi3FE1Rzzj9HKsS/3N9CaF2YsLHiSrEz 8op9gRL7aq3Gmx9Q/WOH7ceyLeIAvVN5/IfntWjc6ZZEiNeU2KNbI0xDgRib2wlZ1vsT EcYzNdwAuT7xtV3GhblRjaXHwQYkkRAwJANAbTU4bW8a24+sCeXrDOIevzAnbgUXunrZ Ueiwdp+LfAXmtWtNelLVnPrkse+N1osB79LhnA5fNIASX1fgwNLhatr4G9Jn3HVWvbtN kxZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=15NCkKgLMuQLzxL5npYUzX5h0+d6v+LAZHYlqwZhX/I=; b=pyvSo6hyHB3JXHml/3I5RC+r9e0bfgInC5onHj5J0PN8nvmniddgEWixG91wA3Eg2B ZFB37i5HrgMcNTPUL3XmV+ZtdYekkMy7o9euYu1pPSc51DD77buOZdli9bsFWQPUyBAl cganRsFq1ctqQtrVtcXENpKscRsPRYCvWyi0aEVNSmbyPO3JTXN5rd8vsmyRGf+2szWi LyzWcgCCgwltsCcRXkDRAYemFxotr0SmrPfyT102IGb6RkTa3E2UqldGg/wTv7qu5CxE 0oLU+00lAFtHIF67cVknf+ryjZvNmcC8f5j9IxfKlf3AxvVovUaOz6nPTYxZ+IottnfC aOTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=2dIxVBCx; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u11-20020a655c0b000000b0043a93738a14si14077080pgr.167.2022.10.18.00.54.47; Tue, 18 Oct 2022 00:55:03 -0700 (PDT) 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=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=2dIxVBCx; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229491AbiJRHkm (ORCPT + 99 others); Tue, 18 Oct 2022 03:40:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbiJRHki (ORCPT ); Tue, 18 Oct 2022 03:40:38 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 844F31135; Tue, 18 Oct 2022 00:40:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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; bh=15NCkKgLMuQLzxL5npYUzX5h0+d6v+LAZHYlqwZhX/I=; b=2dIxVBCxo2PVGleuIxWGtdFE4F QJilqrPtxuclT82GK8v+7gMZ/13PkPJ/kSX55DNAzqWjeWN4vgvPt9GSrFoLSsGDWpYVDYB4wXkjv xH7aANVoXcAJqZTYvpp+jS/C7TgkSksI3LMnOs96my1zy6iopjyadaUmS18oR+jxmjz1hVp/6aZGQ 72l1cvLe9G7BD9BXi2BIGhpX//i7U2XXJ75syBnsGW3apLnV6G8Vlsx63uVT4BDsMA1yB4fn1395Z nkgqit5UUlOeAH2RHd9A+25JkP/JUTe2Wox7xz00ORvqZxVDqRatF1fQUnTjP1wGte3b+7zwR2ydK 2sV7kdAQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1okhD9-003vLl-QV; Tue, 18 Oct 2022 07:40:27 +0000 Date: Tue, 18 Oct 2022 00:40:27 -0700 From: Christoph Hellwig To: Ye Bin Cc: axboe@kernel.dk, rostedt@goodmis.org, mhiramat@kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next 1/3] blktrace: introduce 'blk_trace_swicth_state' helper Message-ID: References: <20221017065321.2846017-1-yebin10@huawei.com> <20221017065321.2846017-2-yebin10@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221017065321.2846017-2-yebin10@huawei.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 17, 2022 at 02:53:19PM +0800, Ye Bin wrote: > +static int blk_trace_switch_state(struct blk_trace *bt, int start) This is a very confusing helper. Please split it into two helpers (e.g. blk_trace_{start,stop}) instead of the awakward int used as boolean argument that makes it do two entirely unrelated things.