NVDIMM Device and Persistent Memory development
 help / color / mirror / Atom feed
From: "Wilczynski, Michal" <michal.wilczynski@intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: <linux-acpi@vger.kernel.org>, <dan.j.williams@intel.com>,
	<vishal.l.verma@intel.com>, <lenb@kernel.org>,
	<dave.jiang@intel.com>, <ira.weiny@intel.com>,
	<rui.zhang@intel.com>, <linux-kernel@vger.kernel.org>,
	<nvdimm@lists.linux.dev>
Subject: Re: [PATCH v5 08/10] acpi/nfit: Improve terminator line in acpi_nfit_ids
Date: Fri, 30 Jun 2023 11:52:05 +0200	[thread overview]
Message-ID: <699b327d-acea-c51d-874a-85133b74a73c@intel.com> (raw)
In-Reply-To: <CAJZ5v0hPY=nermvRKiyqGg4R+jLW13B-MUr0exEuEnw33VUj7g@mail.gmail.com>



On 6/29/2023 6:14 PM, Rafael J. Wysocki wrote:
> On Fri, Jun 16, 2023 at 6:51 PM Michal Wilczynski
> <michal.wilczynski@intel.com> wrote:
>> Currently terminator line contains redunant characters.
> Well, they are terminating the list properly AFAICS, so they aren't
> redundant and the size of it before and after the change is actually
> the same, isn't it?

This syntax is correct of course, but we have an internal guidelines specifically
saying that terminator line should NOT contain a comma at the end. Justification:

"Terminator line is established for the data structure arrays which may have unknown,
to the caller, sizes. The purpose of it is to stop iteration over an array and avoid
out-of-boundary access. Nevertheless, we may apply a bit more stricter rule to avoid
potential, but unlike, event of adding the entry after terminator, already at compile time.
This will be achieved by not putting comma at the end of terminator line"

>
>> Remove them and also remove a comma at the end.
> I suppose that this change is made for consistency with the other ACPI
> code, so this would be the motivation to give in the changelog.
>
> In any case, it doesn't seem to be related to the rest of the series.
>
>> Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
>> ---
>>  drivers/acpi/nfit/core.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
>> index aff79cbc2190..95930e9d776c 100644
>> --- a/drivers/acpi/nfit/core.c
>> +++ b/drivers/acpi/nfit/core.c
>> @@ -3455,7 +3455,7 @@ EXPORT_SYMBOL_GPL(__acpi_nfit_notify);
>>
>>  static const struct acpi_device_id acpi_nfit_ids[] = {
>>         { "ACPI0012", 0 },
>> -       { "", 0 },
>> +       {}
>>  };
>>  MODULE_DEVICE_TABLE(acpi, acpi_nfit_ids);
>>
>> --
>> 2.41.0
>>


  reply	other threads:[~2023-06-30  9:52 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-16 16:50 [PATCH v5 00/10] Remove .notify callback in acpi_device_ops Michal Wilczynski
2023-06-16 16:50 ` [PATCH v5 01/10] acpi/bus: Introduce wrappers for ACPICA event handler install/remove Michal Wilczynski
2023-06-16 16:50 ` [PATCH v5 02/10] acpi/bus: Set driver_data to NULL every time .add() fails Michal Wilczynski
2023-06-16 16:50 ` [PATCH v5 03/10] acpi/ac: Move handler installing logic to driver Michal Wilczynski
2023-06-29 15:55   ` Rafael J. Wysocki
2023-06-30  9:39     ` Wilczynski, Michal
2023-06-30  9:41       ` Rafael J. Wysocki
2023-06-30  9:45         ` Rafael J. Wysocki
2023-06-16 16:50 ` [PATCH v5 04/10] acpi/video: " Michal Wilczynski
2023-06-29 15:58   ` Rafael J. Wysocki
2023-06-30  9:42     ` Wilczynski, Michal
2023-06-16 16:50 ` [PATCH v5 05/10] acpi/battery: " Michal Wilczynski
2023-06-29 16:05   ` Rafael J. Wysocki
2023-06-30  9:48     ` Wilczynski, Michal
2023-06-16 16:50 ` [PATCH v5 06/10] acpi/hed: " Michal Wilczynski
2023-06-16 16:50 ` [PATCH v5 07/10] acpi/nfit: Move acpi_nfit_notify() before acpi_nfit_add() Michal Wilczynski
2023-06-29 16:06   ` Rafael J. Wysocki
2023-06-30  9:48     ` Wilczynski, Michal
2023-06-30 10:52       ` Rafael J. Wysocki
2023-06-16 16:50 ` [PATCH v5 08/10] acpi/nfit: Improve terminator line in acpi_nfit_ids Michal Wilczynski
2023-06-29 16:14   ` Rafael J. Wysocki
2023-06-30  9:52     ` Wilczynski, Michal [this message]
2023-06-30 11:04       ` Rafael J. Wysocki
2023-06-30 11:13         ` Rafael J. Wysocki
2023-06-30 12:02           ` Wilczynski, Michal
2023-06-29 20:51   ` Dan Williams
2023-06-30 10:10     ` Wilczynski, Michal
2023-06-16 16:50 ` [PATCH v5 09/10] acpi/nfit: Move handler installing logic to driver Michal Wilczynski
2023-06-29 16:18   ` Rafael J. Wysocki
2023-06-30  9:55     ` Wilczynski, Michal
2023-06-30 11:00       ` Rafael J. Wysocki
2023-06-29 20:54   ` Dan Williams
2023-06-30 16:56     ` Wilczynski, Michal
2023-06-30 17:19       ` Dan Williams
2023-06-30 17:26         ` Wilczynski, Michal
2023-06-16 16:50 ` [PATCH v5 10/10] acpi/thermal: " Michal Wilczynski

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=699b327d-acea-c51d-874a-85133b74a73c@intel.com \
    --to=michal.wilczynski@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nvdimm@lists.linux.dev \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=vishal.l.verma@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox