From: Borislav Petkov <bp@alien8.de> To: "Kani, Toshimitsu" <toshi.kani@hpe.com> Cc: "rjw@rjwysocki.net" <rjw@rjwysocki.net>, "lenb@kernel.org" <lenb@kernel.org>, "mchehab@kernel.org" <mchehab@kernel.org>, "tony.luck@intel.com" <tony.luck@intel.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>, "linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org> Subject: Re: [PATCH v3 1/5] ACPI / blacklist: add acpi_match_platform_list() Date: Mon, 21 Aug 2017 19:04:15 +0200 [thread overview] Message-ID: <20170821170415.kttnqiwj2fkntsc7@pd.tnic> (raw) In-Reply-To: <1503333107.2042.163.camel@hpe.com> On Mon, Aug 21, 2017 at 04:41:38PM +0000, Kani, Toshimitsu wrote: > Putting to a single line leads to "line over 80 characters" warning > from checkpatch.pl. Would you still advice to do that? Yes, the 80 cols rule is not a hard one. Rather, it should be overridden by human good judgement, like making the code more readable. > strncmp() is fine without these, but it'd be prudent in case someone > decides to print these strings with printk(). Will do. Someone does already use them in printk(): + pr_err(PREFIX "Vendor \"%6.6s\" System \"%8.8s\" Revision 0x%x has a known ACPI BIOS problem.\n", + acpi_blacklist[i].oem_id, + acpi_blacklist[i].oem_table_id, + acpi_blacklist[i].oem_revision); > 'data' here is private to the caller. So, I do not think we need to > define the bits. Shall I change the name to 'driver_data' to make it > more explicit? You changed it to 'data'. It was a u32-used-as-boolean is_critical_error before. So you can just as well make it into flags and people can extend those flags if needed. A flag bit should be enough in most cases anyway. If they really need driver_data, then they can add a void * member. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.
WARNING: multiple messages have this Message-ID (diff)
From: Borislav Petkov <bp@alien8.de> To: "Kani, Toshimitsu" <toshi.kani@hpe.com> Cc: "rjw@rjwysocki.net" <rjw@rjwysocki.net>, "lenb@kernel.org" <lenb@kernel.org>, "mchehab@kernel.org" <mchehab@kernel.org>, "tony.luck@intel.com" <tony.luck@intel.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>, "linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org> Subject: [v3,1/5] ACPI / blacklist: add acpi_match_platform_list() Date: Mon, 21 Aug 2017 19:04:15 +0200 [thread overview] Message-ID: <20170821170415.kttnqiwj2fkntsc7@pd.tnic> (raw) On Mon, Aug 21, 2017 at 04:41:38PM +0000, Kani, Toshimitsu wrote: > Putting to a single line leads to "line over 80 characters" warning > from checkpatch.pl. Would you still advice to do that? Yes, the 80 cols rule is not a hard one. Rather, it should be overridden by human good judgement, like making the code more readable. > strncmp() is fine without these, but it'd be prudent in case someone > decides to print these strings with printk(). Will do. Someone does already use them in printk(): + pr_err(PREFIX "Vendor \"%6.6s\" System \"%8.8s\" Revision 0x%x has a known ACPI BIOS problem.\n", + acpi_blacklist[i].oem_id, + acpi_blacklist[i].oem_table_id, + acpi_blacklist[i].oem_revision); > 'data' here is private to the caller. So, I do not think we need to > define the bits. Shall I change the name to 'driver_data' to make it > more explicit? You changed it to 'data'. It was a u32-used-as-boolean is_critical_error before. So you can just as well make it into flags and people can extend those flags if needed. A flag bit should be enough in most cases anyway. If they really need driver_data, then they can add a void * member.
next prev parent reply other threads:[~2017-08-21 17:04 UTC|newest] Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-08-18 19:46 [PATCH v3 0/5] enable ghes_edac on selected platforms Toshi Kani 2017-08-18 19:46 ` [PATCH v3 1/5] ACPI / blacklist: add acpi_match_platform_list() Toshi Kani 2017-08-18 19:46 ` [v3,1/5] " Toshi Kani 2017-08-21 11:27 ` [PATCH v3 1/5] " Borislav Petkov 2017-08-21 11:27 ` [v3,1/5] " Borislav Petkov 2017-08-21 12:25 ` [PATCH v3 1/5] " Rafael J. Wysocki 2017-08-21 12:25 ` [v3,1/5] " Rafael J. Wysocki 2017-08-21 13:20 ` [PATCH] ACPICA: Check whether ACPI is disabled before getting a table Borislav Petkov 2017-08-21 13:20 ` Borislav Petkov 2017-08-21 13:30 ` [PATCH] " Rafael J. Wysocki 2017-08-21 13:30 ` Rafael J. Wysocki 2017-08-21 15:34 ` [PATCH] " Borislav Petkov 2017-08-21 15:34 ` Borislav Petkov 2017-09-03 0:43 ` [PATCH] " kbuild test robot 2017-09-03 0:43 ` kbuild test robot 2017-08-21 16:41 ` [PATCH v3 1/5] ACPI / blacklist: add acpi_match_platform_list() Kani, Toshimitsu 2017-08-21 16:41 ` [v3,1/5] " Toshi Kani 2017-08-21 17:04 ` Borislav Petkov [this message] 2017-08-21 17:04 ` Borislav Petkov 2017-08-21 17:23 ` [PATCH v3 1/5] " Kani, Toshimitsu 2017-08-21 17:23 ` [v3,1/5] " Toshi Kani 2017-08-21 17:36 ` [PATCH v3 1/5] " Borislav Petkov 2017-08-21 17:36 ` [v3,1/5] " Borislav Petkov 2017-08-21 20:31 ` [PATCH v3 1/5] " Rafael J. Wysocki 2017-08-21 20:31 ` [v3,1/5] " Rafael J. Wysocki 2017-08-21 21:06 ` [PATCH v3 1/5] " Kani, Toshimitsu 2017-08-21 21:06 ` [v3,1/5] " Toshi Kani 2017-08-21 21:49 ` [PATCH v3 1/5] " Rafael J. Wysocki 2017-08-21 21:49 ` [v3,1/5] " Rafael J. Wysocki 2017-08-21 22:21 ` [PATCH v3 1/5] " Kani, Toshimitsu 2017-08-21 22:21 ` [v3,1/5] " Toshi Kani 2017-08-21 22:26 ` [PATCH v3 1/5] " Rafael J. Wysocki 2017-08-21 22:26 ` [v3,1/5] " Rafael J. Wysocki 2017-08-18 19:46 ` [PATCH v3 2/5] intel_pstate: convert to use acpi_match_platform_list() Toshi Kani 2017-08-18 19:46 ` [v3,2/5] " Toshi Kani 2017-08-21 17:53 ` [PATCH v3 2/5] " Srinivas Pandruvada 2017-08-21 17:53 ` [v3,2/5] " Srinivas Pandruvada 2017-08-23 15:46 ` [PATCH v3 2/5] " Borislav Petkov 2017-08-23 15:46 ` [v3,2/5] " Borislav Petkov 2017-08-23 15:56 ` [PATCH v3 2/5] " Kani, Toshimitsu 2017-08-23 15:56 ` [v3,2/5] " Toshi Kani 2017-08-23 15:56 ` [PATCH v3 2/5] " Kani, Toshimitsu 2017-08-18 19:46 ` [PATCH v3 3/5] ghes_edac: add platform check to enable ghes_edac Toshi Kani 2017-08-18 19:46 ` [v3,3/5] " Toshi Kani 2017-08-23 16:20 ` [PATCH v3 3/5] " Borislav Petkov 2017-08-23 16:20 ` [v3,3/5] " Borislav Petkov 2017-08-23 16:20 ` [PATCH v3 3/5] " Borislav Petkov 2017-08-23 20:46 ` Rafael J. Wysocki 2017-08-23 20:46 ` [v3,3/5] " Rafael J. Wysocki 2017-08-24 7:54 ` [PATCH v3 3/5] " Borislav Petkov 2017-08-24 7:54 ` [v3,3/5] " Borislav Petkov 2017-08-18 19:46 ` [PATCH v3 4/5] EDAC: add edac_get_owner() to check MC owner Toshi Kani 2017-08-18 19:46 ` [v3,4/5] " Toshi Kani 2017-08-18 19:46 ` [PATCH v3 5/5] edac drivers: add MC owner check in init Toshi Kani 2017-08-18 19:46 ` [v3,5/5] " Toshi Kani
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=20170821170415.kttnqiwj2fkntsc7@pd.tnic \ --to=bp@alien8.de \ --cc=lenb@kernel.org \ --cc=linux-acpi@vger.kernel.org \ --cc=linux-edac@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mchehab@kernel.org \ --cc=rjw@rjwysocki.net \ --cc=tony.luck@intel.com \ --cc=toshi.kani@hpe.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: linkBe 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.