[PATCH] xen/ACPI: Remove the acpi_string type

2023-07-14 Thread Andrew Cooper
Typedef-ing a naked pointer like this an anti-pattern which is best avoided. Furthermore, it's bad to pass a string literate in a mutable type. Delete the type entirely, and replace it with a plain 'const char *'. This highlights two futher bugs. acpi_get_table() already had a mismatch in types

Re: [PATCH] xen/ACPI: Remove the acpi_string type

2023-07-14 Thread Nicola Vetrini
On 14/07/23 15:04, Andrew Cooper wrote: Typedef-ing a naked pointer like this an anti-pattern which is best avoided. s/this an/this is an/ Furthermore, it's bad to pass a string literate in a mutable type. Delete the s/literate/literal/ type entirely, and replace it with a plain 'const

Re: [PATCH] xen/ACPI: Remove the acpi_string type

2023-07-14 Thread Andrew Cooper
On 14/07/2023 2:44 pm, Nicola Vetrini wrote: > > On 14/07/23 15:04, Andrew Cooper wrote: >> Typedef-ing a naked pointer like this an anti-pattern which is best >> avoided. > > s/this an/this is an/ > >> Furthermore, it's bad to pass a string literate in a mutable type.  >> Delete the > > s/literate

Re: [PATCH] xen/ACPI: Remove the acpi_string type

2023-07-14 Thread Jan Beulich
On 14.07.2023 15:04, Andrew Cooper wrote: > Typedef-ing a naked pointer like this an anti-pattern which is best avoided. > Furthermore, it's bad to pass a string literate in a mutable type. Delete the > type entirely, and replace it with a plain 'const char *'. > > This highlights two futher bugs