Hi Oleksandr,
>
> 2. Long strings in ptintk violations
> I filed an issue on printk format strings [5]
> ==============================================================================
> @@ -225,9 +231,9 @@ void __init acpi_table_print_madt_entry(struct
> acpi_subtable_header *header)
> printk(KERN_DEBUG PREFIX
> - "GIC Distributor (gic_id[0x%04x] address[0x%"PRIx64"]
> gsi_base[%d])\n",
> - p->gic_id, p->base_address,
> - p->global_irq_base);
> + "GIC Distributor (gic_id[0x%04x] address[0x%" PRIx64
> + "] gsi_base[%d])\n",
> + p->gic_id, p->base_address, p->global_irq_base);
>
> @@ -629,12 +628,14 @@ acpi_parse_one_rmrr(struct acpi_dmar_header *header)
> - printk(XENLOG_ERR VTDPREFIX
> - "Overlapping RMRRs [%"PRIx64",%"PRIx64"] and
> [%"PRIx64",%"PRIx64"]\n",
> - rmrru->base_address, rmrru->end_address,
> - base_addr, end_addr);
> + printk(XENLOG_ERR VTDPREFIX "Overlapping RMRRs [%" PRIx64
> + ",%" PRIx64 "] and [%" PRIx64
> + ",%" PRIx64 "]\n",
> + rmrru->base_address, rmrru->end_address, base_addr,
> + end_addr);
These kind of issues with line break could be adjusted using the right penalty
coefficients in the
clang format config.
>
> 7. Parentheses for empty functions
> ==============================================================================
> --- a/xen/drivers/char/console.c
> +++ b/xen/drivers/char/console.c
> @@ -1311,7 +1307,9 @@ void panic(const char *fmt, ...)
> -static void cf_check suspend_steal_fn(const char *str, size_t nr) { }
> +static void cf_check suspend_steal_fn(const char *str, size_t nr)
> +{}
I think also this can be mitigated with penalty + a rule saying that empty
function can have the brackets
on the same line.
Cheers,
Luca