All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: linux-acpi@vger.kernel.org, rafael@kernel.org
Subject: Re: [PATCH v3 4/8] ACPI: property: Move property ref argument parsing into a new function
Date: Fri, 27 May 2022 17:37:05 +0300	[thread overview]
Message-ID: <YpDiERZcjLzpo6cP@paasikivi.fi.intel.com> (raw)
In-Reply-To: <Yo5nWSQFqPxnIfqh@smile.fi.intel.com>

Hi Andy,

On Wed, May 25, 2022 at 08:28:57PM +0300, Andy Shevchenko wrote:
> On Wed, May 25, 2022 at 04:01:19PM +0300, Sakari Ailus wrote:
> > Split out property reference argument parsing out of the
> > __acpi_node_get_property_reference() function into a new one,
> > acpi_get_ref_args(). The new function will be needed also for parsing
> > string references soon.
> 
> ...
> 
> > +static int
> > +acpi_get_ref_args(struct fwnode_reference_args *args,
> 
> You can at least make these two on one line.

Agreed.

> 
> > +		  struct fwnode_handle *ref_fwnode,
> 
> Calling it fwnode would save a few lines of code even with your strictness
> of 80.

I'm just moving the code as much as possible as-is from elsewhere, thus
preferring to keep the naming.

> 
> > +		  const union acpi_object **element,
> > +		  const union acpi_object *end, size_t num_args)
> > +{
> > +	u32 nargs = 0, i;
> > +
> > +	/*
> > +	 * Find the referred data extension node under the
> > +	 * referred device node.
> > +	 */
> > +	for (; *element < end && (*element)->type == ACPI_TYPE_STRING;
> > +	     (*element)++) {
> > +		const char *child_name = (*element)->string.pointer;
> 
> I believe this on one line is better to read.

I assume you mean the for loop.

I have to disargee. Everything doesn't automatically become better by
putting more stuff on the same line.

> 
> > +		ref_fwnode = acpi_fwnode_get_named_child_node(ref_fwnode,
> > +							      child_name);
> 
> This too.

I think this would be affected less than the loop. 

-- 
Kind regards,

Sakari Ailus

  reply	other threads:[~2022-05-27 14:37 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 13:01 [PATCH v3 0/8] ACPI: Buffer property and reference as string support Sakari Ailus
2022-05-25 13:01 ` [PATCH v3 1/8] ACPI: property: Return type of acpi_add_nondev_subnodes() should be bool Sakari Ailus
2022-05-25 17:15   ` Andy Shevchenko
2022-05-25 13:01 ` [PATCH v3 2/8] ACPI: property: Tie data nodes to acpi handles Sakari Ailus
2022-05-25 17:20   ` Andy Shevchenko
2022-05-27 14:35     ` Sakari Ailus
2022-05-26 19:19   ` Rafael J. Wysocki
2022-05-27  9:02     ` Sakari Ailus
2022-05-27 17:04       ` Rafael J. Wysocki
2022-05-27 20:59         ` Sakari Ailus
2022-05-28 13:56           ` Rafael J. Wysocki
2022-05-25 13:01 ` [PATCH v3 3/8] ACPI: property: Use acpi_object_type consistently in property ref parsing Sakari Ailus
2022-05-25 17:23   ` Andy Shevchenko
2022-05-25 13:01 ` [PATCH v3 4/8] ACPI: property: Move property ref argument parsing into a new function Sakari Ailus
2022-05-25 17:28   ` Andy Shevchenko
2022-05-27 14:37     ` Sakari Ailus [this message]
2022-05-25 13:01 ` [PATCH v3 5/8] ACPI: property: Switch node property referencing from ifs to a switch Sakari Ailus
2022-05-25 17:30   ` Andy Shevchenko
2022-05-25 13:01 ` [PATCH v3 6/8] ACPI: property: Unify integer value reading functions Sakari Ailus
2022-05-25 17:14   ` Andy Shevchenko
2022-05-27 15:12     ` Sakari Ailus
2022-05-25 13:01 ` [PATCH v3 7/8] ACPI: property: Add support for parsing buffer property UUID Sakari Ailus
2022-05-25 17:44   ` Andy Shevchenko
2022-05-27 12:43     ` Sakari Ailus
2022-05-25 13:01 ` [PATCH v3 8/8] ACPI: property: Read buffer properties as integers Sakari Ailus
2022-05-25 17:36   ` Andy Shevchenko
2022-05-27 10:01     ` Sakari Ailus
2022-06-09 18:38 ` [PATCH v3 0/8] ACPI: Buffer property and reference as string support Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YpDiERZcjLzpo6cP@paasikivi.fi.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rafael@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.