From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04A86C433F5 for ; Wed, 18 May 2022 08:47:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233574AbiERIrK (ORCPT ); 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> 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