Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1741994ybt; Mon, 15 Jun 2020 08:16:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiMQ0tT36dbGCQAsKVPommQIN+R+khji1/aODJAkgEj15KQYJI8fcMoxDv1/acOdsCXZhJ X-Received: by 2002:a50:fe0d:: with SMTP id f13mr24682075edt.204.1592234195905; Mon, 15 Jun 2020 08:16:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592234195; cv=none; d=google.com; s=arc-20160816; b=bPQ7zFo7prv8HVV8q0tJvN2OlwgPC7++gV+zCjYBDX9ihTe/CbdG6r1Z4Fh4Zc0Jmx T0X4Ie8zWh0QY24gzUCMp0iitxOdBo/WUXgecHu+lrVaeBZGzI70TlDaynyUzeywPgZB JTzHoen5L+z5tOrAiVS6rx9HvhBq34y9xvdvEtMFcS3hMlDgfwkHFecjy/YPZ0kQ3dbp MN2zQnWnpu87d+C3t7pRdoZtspLkwwingfUZFmAItwCA4VqgrE7ETfTftEVeyWPb2bEs SxgI5eSAE3kGZtxydqPkZxqZMZ0xOcmJekhPoDUyP6way/jY5RvH7xadv3jgPIxCWXGj 2NIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=a1Q8hVvrVA3iKGAKwNR026VhX5Logm8bPXYQZf60fus=; b=Yga72esEU0CUrCJllpuYx+0nIS4wkn95nkg+8ZP+VZTwJ6hBAza6Sa7q4oDeFs7ePL mR3h0kdqIFi9/IT4KCowRrFNdBWuA7ZJ8JPTzyo3J3/s+xwazod7iFU+8SFwqe9EelwL 6fdV00n39eZqoOm/AeKM4wsYzYT6YQMsGRyH0XEvDkUP3L0ucxulB3yS89BlUnPaWpgr zpb1+KTEVcW/rD/jZBo24QM/l7yOtyA4k8/mw24z27NhPRs2ShHTTw9ASkeNAv+6vdUx wPFPr291o7S06gLBYnIKaRP/KRBeDHougpiA/lw1RqvLuzmt4tOrQwkh+oPyrLqZZbh/ dRYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d14si8974200edp.573.2020.06.15.08.16.12; Mon, 15 Jun 2020 08:16:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730838AbgFOPOR (ORCPT + 99 others); Mon, 15 Jun 2020 11:14:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:46680 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730766AbgFOPOQ (ORCPT ); Mon, 15 Jun 2020 11:14:16 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 60AF8AF3F; Mon, 15 Jun 2020 15:14:19 +0000 (UTC) Date: Mon, 15 Jun 2020 17:14:14 +0200 From: Petr Mladek To: Jim Cromie Cc: jbaron@akamai.com, linux-kernel@vger.kernel.org, akpm@linuxfoundation.org, gregkh@linuxfoundation.org, linux@rasmusvillemoes.dk Subject: Re: [PATCH v2 13/24] dyndbg: combine flags & mask into a struct, use that Message-ID: <20200615151414.GI31238@alley> References: <20200613155738.2249399-1-jim.cromie@gmail.com> <20200613155738.2249399-14-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200613155738.2249399-14-jim.cromie@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat 2020-06-13 09:57:27, Jim Cromie wrote: > combine flags & mask into a struct, and replace those 2 parameters in > 3 functions: ddebug_change, ddebug_parse_flags, ddebug_read_flags, > altering the derefs in them accordingly. > > This simplifies the 3 function sigs, preparing for more changes. > We dont yet need mask from ddebug_read_flags, but will soon. > --- > lib/dynamic_debug.c | 46 +++++++++++++++++++++++---------------------- > 1 file changed, 24 insertions(+), 22 deletions(-) > > diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c > index 93c627e9c094..8dc073a6e8a4 100644 > --- a/lib/dynamic_debug.c > +++ b/lib/dynamic_debug.c > @@ -62,6 +62,11 @@ struct ddebug_iter { > unsigned int idx; > }; > > +struct flagsettings { Please. use underscore to help with parsing such a long names. I mean use: flags_settings. > + unsigned int flags; > + unsigned int mask; > +}; static int ddebug_change(const struct ddebug_query *query, > - unsigned int pflags, unsigned int mask) > + struct flagsettings *mods) > -static int ddebug_read_flags(const char *str, unsigned int *flags) > +static int ddebug_read_flags(const char *str, struct flagsettings *f) > -static int ddebug_parse_flags(const char *str, unsigned int *flagsp, > - unsigned int *maskp) > +static int ddebug_parse_flags(const char *str, struct flagsettings *mods) What "mods" stands for, please? I have to say that using a parameter called "mods" in a function called parse_flags() is inconsistent and confusing. Best Regards, Petr