Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1449819yba; Tue, 2 Apr 2019 09:05:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqx7/gUQL636BrlUP8wD6zhGmDj3ls7M0rx28tLs/f1Dd3P7a54ciiEorDi3KXe3IrqbzOaq X-Received: by 2002:a17:902:3283:: with SMTP id z3mr70609378plb.236.1554221117666; Tue, 02 Apr 2019 09:05:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554221117; cv=none; d=google.com; s=arc-20160816; b=fpdNJUaUWkBjwUFkBCTFwe65+wwW3I0qJw42aJdxGbr24ng3D/VPh8KANHMCYegqm+ paiQBJOA3f4KOgX3JJKUeuJMtM9fj1Wa8TBRiXU1Y/ZqnM8dlTw7i7k4lMSGY/P50Hpy pxB/AZR3FajfDLNykmyRV66/zdXNT6knC+ExkUdjHt3b1veShSwvaELxeSYmwwGGSADM sBUN439/heqDPv1TWdv/0gRTOgwdK0cxZnOECywbIMM6/WWaKbzEzRqg6ZbqNCsNyq1j pxsIVvMiS8XdIP9JFOgCFWaJ1+B58ICMDQsO8bVGjUK3B4v6Z3rL53qCsxPZrILyI6dl 8jbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=D/uBRxoSLaw7wt0dOZLsPDgDlRxlgS5VpEnLB3tUVe4=; b=dcyRFjRG69d3hf01Zw0ZB0dN+SHGIoQ+rSASCk2FVvL5y14Md6NPVQGdc4N4vR8ac7 IhcK7VIUVHX6b3f22ZN1bmivS7ZVQm+4YQ7Ln69BzZcmOPkQcc7suKsWiMPCt3fCBzuU uR0uDfJVi/+HxPD4t+P1GSqE5nP3DTURZaTYBz7WPKo24OYKnkc9uDfqk9asoHRxF4L9 uArYu/FU//PaU4nohaJXxtxf+TnYek9tZ4ITve+9FekfY8DhWiCcIWIi5MnOWjVkNBus AwpBSovouMW1IKGUvfulViReh0jJbst6e2FgRzUqUw9H/XVNGEqZQsr++g9Hku5hmqSJ 9tJQ== 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 z31si11797792plb.333.2019.04.02.09.05.02; Tue, 02 Apr 2019 09:05:17 -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 S1729975AbfDBQCm (ORCPT + 99 others); Tue, 2 Apr 2019 12:02:42 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:33367 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729060AbfDBQCm (ORCPT ); Tue, 2 Apr 2019 12:02:42 -0400 Received: by mail-pf1-f196.google.com with SMTP id i19so6605324pfd.0; Tue, 02 Apr 2019 09:02:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=D/uBRxoSLaw7wt0dOZLsPDgDlRxlgS5VpEnLB3tUVe4=; b=RtnziyQ7nqg49SU0mkFngfWLcF0Xss1YuR3fflrso9GPT1PWuXOfUQH7TmSdZIVATB Yi6MCNtw5OgcohMKGLttcVShq4lHgNYQic/I1JdmmmKMW4TSgTHcGcSjTkN1z0La/BAo MS4SL9omiBKA0cmBR/5EQIXfbxHSsp8FT/Gp/5s+FwwALNHLeisrYl3fewiOIJZ8MJdj /Z3BYH5MuMMtJ1MrkDszmaniFrPSngm/7XVLBlhYqiDNTYmisZNZgSfXw+yPu8rtWqpX vBPYG9BABsASX5dFO3ie5LEE7YpABUQuovo1Ul9ZzyYsI+v7wLlLCKOkuk0XxuiW8dHk 0Psg== X-Gm-Message-State: APjAAAVjcF2/c7xGCRYIJlrIeDivK/La86d5CAyjqwmzGjVdTUz4Cy87 q+uoKRukPqhdeojtuS07IZsULY+s X-Received: by 2002:a63:e004:: with SMTP id e4mr15910058pgh.344.1554220960463; Tue, 02 Apr 2019 09:02:40 -0700 (PDT) Received: from ?IPv6:2620:15c:2cd:203:5cdc:422c:7b28:ebb5? ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id a17sm18057191pgd.30.2019.04.02.09.02.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Apr 2019 09:02:39 -0700 (PDT) Message-ID: <1554220958.118779.145.camel@acm.org> Subject: Re: [PATCH v2 3/8] block: Replace all ktype default_attrs with groups From: Bart Van Assche To: Kimberly Brown , Greg Kroah-Hartman , "Rafael J. Wysocki" Cc: Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 02 Apr 2019 09:02:38 -0700 In-Reply-To: References: <20190322201440.GA30814@ubu-Virtual-Machine> Content-Type: text/plain; charset="UTF-7" X-Mailer: Evolution 3.26.2-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2019-04-01 at 22:51 -0400, Kimberly Brown wrote: +AD4 The kobj+AF8-type default+AF8-attrs field is being replaced by the +AD4 default+AF8-groups field. Replace all of the ktype default+AF8-attrs fields in +AD4 the block subsystem with default+AF8-groups and use the ATTRIBUTE+AF8-GROUPS +AD4 macro to create the default groups. +AD4 +AD4 Remove default+AF8-ctx+AF8-attrs+AFsAXQ because it doesn't contain any attributes. +AD4 +AD4 This patch was tested by verifying that the sysfs files for the +AD4 attributes in the default groups were created. +AD4 +AD4 Signed-off-by: Kimberly Brown +ADw-kimbrownkd+AEA-gmail.com+AD4 +AD4 --- +AD4 block/blk-integrity.c +AHw 3 +-+-- +AD4 block/blk-mq-sysfs.c +AHw 8 +-+------- +AD4 block/blk-sysfs.c +AHw 3 +-+-- +AD4 3 files changed, 6 insertions(+-), 8 deletions(-) +AD4 +AD4 diff --git a/block/blk-integrity.c b/block/blk-integrity.c +AD4 index d1ab089e0919..85864c71e858 100644 +AD4 --- a/block/blk-integrity.c +AD4 +-+-+- b/block/blk-integrity.c +AD4 +AEAAQA -365,6 +-365,7 +AEAAQA static struct attribute +ACo-integrity+AF8-attrs+AFsAXQ +AD0 +AHs +AD4 +ACY-integrity+AF8-device+AF8-entry.attr, +AD4 NULL, +AD4 +AH0AOw +AD4 +-ATTRIBUTE+AF8-GROUPS(integrity)+ADs +AD4 +AD4 static const struct sysfs+AF8-ops integrity+AF8-ops +AD0 +AHs +AD4 .show +AD0 +ACY-integrity+AF8-attr+AF8-show, +AD4 +AEAAQA -372,7 +-373,7 +AEAAQA static const struct sysfs+AF8-ops integrity+AF8-ops +AD0 +AHs +AD4 +AH0AOw +AD4 +AD4 static struct kobj+AF8-type integrity+AF8-ktype +AD0 +AHs +AD4 - .default+AF8-attrs +AD0 integrity+AF8-attrs, +AD4 +- .default+AF8-groups +AD0 integrity+AF8-groups, +AD4 .sysfs+AF8-ops +AD0 +ACY-integrity+AF8-ops, +AD4 +AH0AOw +AD4 +AD4 diff --git a/block/blk-mq-sysfs.c b/block/blk-mq-sysfs.c +AD4 index 3f9c3f4ac44c..5315e538b3b1 100644 +AD4 --- a/block/blk-mq-sysfs.c +AD4 +-+-+- b/block/blk-mq-sysfs.c +AD4 +AEAAQA -173,10 +-173,6 +AEAAQA static ssize+AF8-t blk+AF8-mq+AF8-hw+AF8-sysfs+AF8-cpus+AF8-show(struct blk+AF8-mq+AF8-hw+AF8-ctx +ACo-hctx, char +ACo-page) +AD4 return ret+ADs +AD4 +AH0 +AD4 +AD4 -static struct attribute +ACo-default+AF8-ctx+AF8-attrs+AFsAXQ +AD0 +AHs +AD4 - NULL, +AD4 -+AH0AOw +AD4 - +AD4 static struct blk+AF8-mq+AF8-hw+AF8-ctx+AF8-sysfs+AF8-entry blk+AF8-mq+AF8-hw+AF8-sysfs+AF8-nr+AF8-tags +AD0 +AHs +AD4 .attr +AD0 +AHs.name +AD0 +ACI-nr+AF8-tags+ACI, .mode +AD0 0444 +AH0, +AD4 .show +AD0 blk+AF8-mq+AF8-hw+AF8-sysfs+AF8-nr+AF8-tags+AF8-show, +AD4 +AEAAQA -196,6 +-192,7 +AEAAQA static struct attribute +ACo-default+AF8-hw+AF8-ctx+AF8-attrs+AFsAXQ +AD0 +AHs +AD4 +ACY-blk+AF8-mq+AF8-hw+AF8-sysfs+AF8-cpus.attr, +AD4 NULL, +AD4 +AH0AOw +AD4 +-ATTRIBUTE+AF8-GROUPS(default+AF8-hw+AF8-ctx)+ADs +AD4 +AD4 static const struct sysfs+AF8-ops blk+AF8-mq+AF8-sysfs+AF8-ops +AD0 +AHs +AD4 .show +AD0 blk+AF8-mq+AF8-sysfs+AF8-show, +AD4 +AEAAQA -214,13 +-211,12 +AEAAQA static struct kobj+AF8-type blk+AF8-mq+AF8-ktype +AD0 +AHs +AD4 +AD4 static struct kobj+AF8-type blk+AF8-mq+AF8-ctx+AF8-ktype +AD0 +AHs +AD4 .sysfs+AF8-ops +AD0 +ACY-blk+AF8-mq+AF8-sysfs+AF8-ops, +AD4 - .default+AF8-attrs +AD0 default+AF8-ctx+AF8-attrs, +AD4 .release +AD0 blk+AF8-mq+AF8-ctx+AF8-sysfs+AF8-release, +AD4 +AH0AOw +AD4 +AD4 static struct kobj+AF8-type blk+AF8-mq+AF8-hw+AF8-ktype +AD0 +AHs +AD4 .sysfs+AF8-ops +AD0 +ACY-blk+AF8-mq+AF8-hw+AF8-sysfs+AF8-ops, +AD4 - .default+AF8-attrs +AD0 default+AF8-hw+AF8-ctx+AF8-attrs, +AD4 +- .default+AF8-groups +AD0 default+AF8-hw+AF8-ctx+AF8-groups, +AD4 .release +AD0 blk+AF8-mq+AF8-hw+AF8-sysfs+AF8-release, +AD4 +AH0AOw +AD4 +AD4 diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c +AD4 index 422327089e0f..7a95a1eb27e1 100644 +AD4 --- a/block/blk-sysfs.c +AD4 +-+-+- b/block/blk-sysfs.c +AD4 +AEAAQA -769,6 +-769,7 +AEAAQA static struct attribute +ACo-default+AF8-attrs+AFsAXQ +AD0 +AHs +AD4 +ACM-endif +AD4 NULL, +AD4 +AH0AOw +AD4 +-ATTRIBUTE+AF8-GROUPS(default)+ADs +AD4 +AD4 +ACM-define to+AF8-queue(atr) container+AF8-of((atr), struct queue+AF8-sysfs+AF8-entry, attr) +AD4 +AD4 +AEAAQA -890,7 +-891,7 +AEAAQA static const struct sysfs+AF8-ops queue+AF8-sysfs+AF8-ops +AD0 +AHs +AD4 +AD4 struct kobj+AF8-type blk+AF8-queue+AF8-ktype +AD0 +AHs +AD4 .sysfs+AF8-ops +AD0 +ACY-queue+AF8-sysfs+AF8-ops, +AD4 - .default+AF8-attrs +AD0 default+AF8-attrs, +AD4 +- .default+AF8-groups +AD0 default+AF8-groups, +AD4 .release +AD0 blk+AF8-release+AF8-queue, +AD4 +AH0AOw I think this should have been four patches instead of one. Anyway: Reviewed-by: Bart Van Assche +ADw-bvanassche+AEA-acm.org+AD4