Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp274951iob; Wed, 18 May 2022 01:49:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXjgz3azliwp0psseUCoytMwqCxY+aEypyRhjyklHN64F6rojpzNrsDYh+6JsjrHlwZjpV X-Received: by 2002:a63:115b:0:b0:3c1:eb46:6f5 with SMTP id 27-20020a63115b000000b003c1eb4606f5mr23203485pgr.277.1652863799112; Wed, 18 May 2022 01:49:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652863799; cv=none; d=google.com; s=arc-20160816; b=mQqgrGDVsFdFK0Vc6Ut59VyKAIUncTH5DRINq/wJZkQ54cyK5O9Xj88ImDLGXqZVNv OT8pfMrEbmPM9Pd7Ii2MyIlHPJblOzZK+NEzoPUcJKNKIFa9Vfoabk554Ov/cClHEABR xWlmAcgH6MBoB3czwyy9vM1SheCODOaNurpCZ6G0DS8RhwW+sa1f8SMs6lo/c6t0xE5H UABui4xaFxaPGAYG0/XGQqMB1ObeKrmVdNDZkJGp0gOhTny+6siU6sMNDuO2xQN6r4tY rmwpsE7gandcQBcpkAPlSVqXHUblKl3WVPhEPq4okya7jUmatwEvoLBqVHAlZ/JGIeiS 0DCA== 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 :dkim-signature; bh=FlPkdgn8or7cOD0dFZAp9xWwMym0uxOvLKSBp6Vy4SY=; b=eJaOcG8vZwtVnA6ZZOMZws3ahAvC3Ve+7r4n4r1wDSc5mdPPawRVo/rLKmb7LoEjQD jysY0Xya7KDeLbfmDS/kfWJT19zZx6dX4TlNRzTz3WZsXpHorsUZ5BQ6qHyX9mFvyiIP JB+ymavmt7UjasKbg1xLBCinEEXP9ychQMtzL+iNjLMd3g2WRlQnFmS5sPtnTl2DIWd9 tc0aswhojgSwxTWmIaIzIjx6txOgP+81L/S6Jf4XDXzg5SzkB/2zjt8fpoUaTVC8WQsq z7I5Oaf25zTjUdBqcMovq01va3jq0FIT0yyAbcNg0gIlm6jmvDrTM0pu2wt7WeQtHCzM 5oFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=JWjY8wyp; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=na6pnh0W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id nn6-20020a17090b38c600b001dc82308e3asi2254339pjb.96.2022.05.18.01.49.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 01:49:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=JWjY8wyp; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=na6pnh0W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 508D5134E18; Wed, 18 May 2022 01:47:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233571AbiERIrK (ORCPT + 99 others); Wed, 18 May 2022 04:47:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233522AbiERIrJ (ORCPT ); Wed, 18 May 2022 04:47:09 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 400201339FC for ; Wed, 18 May 2022 01:47:07 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 85EE71F9AC; Wed, 18 May 2022 08:47:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1652863626; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FlPkdgn8or7cOD0dFZAp9xWwMym0uxOvLKSBp6Vy4SY=; b=JWjY8wypHUQjmwOfc3uhxtY8Kaxzz5tmnZFvjQuREInRLCmnp+G6VSGeIFZcevjkw1rptv JdiZHLM8BlEEZrXEm7PyEzBNla7TLogbnkrXECeo7NtAkYiTg9A9wRB0Uu/N8zD08nEhuc zCGLDnUPfRsQyvOvbJGrSUT8JRrxZdI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1652863626; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FlPkdgn8or7cOD0dFZAp9xWwMym0uxOvLKSBp6Vy4SY=; b=na6pnh0W5X/r+JL2Dk8w6pClreKVv6/8TAhnoyFN90NO9b8/0doTEzPvbc6QVb54Sxacgm ViG9vspk5VpjVPAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 90CB213A6D; Wed, 18 May 2022 08:47:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id /kxMIIeyhGKNdQAAMHmgww (envelope-from ); Wed, 18 May 2022 08:47:03 +0000 Date: Wed, 18 May 2022 10:46:58 +0200 From: Oscar Salvador To: Miaohe Lin Cc: akpm@linux-foundation.org, willy@infradead.org, vbabka@suse.cz, dhowells@redhat.com, neilb@suse.de, apopple@nvidia.com, david@redhat.com, surenb@google.com, peterx@redhat.com, naoya.horiguchi@nec.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/15] mm/swap: use helper macro __ATTR_RW Message-ID: References: <20220509131416.17553-1-linmiaohe@huawei.com> <20220509131416.17553-3-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220509131416.17553-3-linmiaohe@huawei.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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, May 09, 2022 at 09:14:03PM +0800, Miaohe Lin wrote: > Use helper macro __ATTR_RW to define vma_ra_enabled_attr to make code more > clear. Minor readability improvement. > > Signed-off-by: Miaohe Lin Reviewed-by: Oscar Salvador > --- > mm/swap_state.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/mm/swap_state.c b/mm/swap_state.c > index 240b39ed5922..9f99d8137ffd 100644 > --- a/mm/swap_state.c > +++ b/mm/swap_state.c > @@ -881,9 +881,7 @@ static ssize_t vma_ra_enabled_store(struct kobject *kobj, > > return count; > } > -static struct kobj_attribute vma_ra_enabled_attr = > - __ATTR(vma_ra_enabled, 0644, vma_ra_enabled_show, > - vma_ra_enabled_store); > +static struct kobj_attribute vma_ra_enabled_attr = __ATTR_RW(vma_ra_enabled); > > static struct attribute *swap_attrs[] = { > &vma_ra_enabled_attr.attr, > -- > 2.23.0 > > -- Oscar Salvador SUSE Labs