Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3540022rdb; Wed, 13 Sep 2023 15:37:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEkXfebUnTLEJ2wftHBCHMEoU15ns6V/492daETE1KTi/7A0IDqhxRYG8YbMv+QwcP/Hi6B X-Received: by 2002:a17:903:2311:b0:1b9:e241:ad26 with SMTP id d17-20020a170903231100b001b9e241ad26mr5474086plh.9.1694644678406; Wed, 13 Sep 2023 15:37:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694644678; cv=none; d=google.com; s=arc-20160816; b=kIPY9ra2MqPyqCUOeXD9iNcA0zgPTo9pDvf9AspMsNIXvsMTDgVGrd3I1GcxL1bT01 Ibk7zR2m4416LrNwF37Uyp9X5Ck8hFBMtiHiYHI6Y3vqvmYzAYdKKVdCyGvOvgnGxdof OQGOly0etRlfws8IDh5FTePcngLkateexEDeOuQePNl0SgC1H1mLH3LrzD2W0+bRR+5D /z40bpD7misKyLN3cSo3Cn/xwRAe356kM/Ny6B8zEg/GWcrH4x6trCnvsNGFcAoONwP7 U+ZbZjPefqpdOj/W0eNQieUCOlERwbUttgH7/LNpGNhyZp7/RfjI+aRPdjU9RLVny0tX WN5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=hDMnMFEVgVQYgu0uL8xP0aF9PiMchlPTrMrDMHzcgK8=; fh=Fqlr1kudrGXkdRtnKIMtRhH8zP2R9wa8ilFo7aBwq60=; b=HQSwo0DW73AXEtHgnmzo2OKT3DzHD3x2ZS3jTX/Cd3P7kuKPgDSNev3Yx6XunFGshV 4v8j/4orrsRKajUPQ7aeswbnYovmO5Q17yv0ipF71CGJvAEz1Ae8I/9mOwGB546ozfqw ro8agKwuX8ndzD7JxgU48mJov5u0ofFd8HZcbpf49lrUvr/fdGlEQCyBaJLQuf9yayf1 mnfEL2OOthV7ceafqx5gwjKKYauLAWe9FPY6pVGyF4n48HkPfsHRyX9xFD7Rdc8bgpok yM33kllAf3LgzXZd5y8osfGgFLuIIyUxqg2UcxIkjUil2yd+oYIpTMYU4jQzDjctnpkm sTQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Erj0fkk9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id q6-20020a170902dac600b001b8b437b01esi299067plx.350.2023.09.13.15.37.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 15:37:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Erj0fkk9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 803E5816691A; Wed, 13 Sep 2023 03:32:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231643AbjIMKck (ORCPT + 99 others); Wed, 13 Sep 2023 06:32:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbjIMKcj (ORCPT ); Wed, 13 Sep 2023 06:32:39 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94C57D3; Wed, 13 Sep 2023 03:32:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694601155; x=1726137155; h=date:from:to:cc:subject:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5t3z4o6kZ1KUc08UcPLGB8pqxJnJEeeNk5Oanyn4G7c=; b=Erj0fkk9eQWJkl1coWw2WlRCxM0mbF8PyuzunhjzVI9p1UXnrPwyrpV0 XzvXBIliNPuyfqhQqfXvkDVs5LJJGzhj3wFjgDjGOObYiYgSlrUqcdW6c ThebzULD3PTJSnqxzK3ne6jpnxZAVB9J04ZYk7MJEdoE7M9+SIcEOXIOK e+kyFqs/D707EWJg9yEQ5CjO8jVo/7aSArnpuBzhEGiAMXavml68aRWPp OpCs3lE8h220Jleuneo63kOXT8zgXT5hE25JYLc8DFyNdsJyggfM6ac2I NmBBwFDUiygZNzmt37kamzAwTiHf8zDXKNdPI5AFvE/l4EDxWVziUFlRP w==; X-IronPort-AV: E=McAfee;i="6600,9927,10831"; a="377534551" X-IronPort-AV: E=Sophos;i="6.02,142,1688454000"; d="scan'208";a="377534551" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2023 03:32:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10831"; a="990870447" X-IronPort-AV: E=Sophos;i="6.02,142,1688454000"; d="scan'208";a="990870447" Received: from mtkaczyk-mobl.ger.corp.intel.com (HELO localhost) ([10.249.145.205]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2023 03:32:26 -0700 Date: Wed, 13 Sep 2023 12:32:22 +0200 From: Mariusz Tkaczyk To: Yu Kuai Cc: song@kernel.org, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, yi.zhang@huawei.com, yangerkun@huawei.com, "yukuai (C)" Subject: Re: [PATCH -next] md: simplify md_seq_ops Message-ID: <20230913123222.00006a8e@linux.intel.com> In-Reply-To: References: <20230911065010.3530461-1-yukuai1@huaweicloud.com> <20230911160540.0000060e@linux.intel.com> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 13 Sep 2023 03:32:47 -0700 (PDT) On Tue, 12 Sep 2023 09:02:19 +0800 Yu Kuai wrote: > >> +static void *md_seq_next(struct seq_file *seq, void *v, loff_t *pos) > >> +{ > >> + return seq_list_next(v, &all_mddevs, pos); > >> +} > > Can it be so simple? Why previous versions takes care of holding "(void)*1" > > and "(void)*2" then? Could you elaborate? > > "1" means printing "Personalities", which is now moved to md_seq_start, > and "2" means printing "unsed devices" which is now moved to > md_seq_stop. And now md_seq_next is only used to iterate the mddev list. > Ok, LGTM. Mariusz