Re: [PATCH 4/4] scsi: ufs: tegra: Add Tegra264 UFS host controller driver

From: Uwe Kleine-König

Date: Thu Sep 10 2026 - 07:33:44 EST


On Wed, Sep 09, 2026 at 09:10:26AM -0700, Bart Van Assche wrote:
> On 9/9/26 7:20 AM, Uwe Kleine-König wrote:
> > > + {}
> >
> > { } please (i.e. a space between the braces)
>
> The preferred style for Linux kernel code is {} (no space).

Looking at the style in of_device_id arrays in next-20260909:

$ git grep -l of_device_id | xargs -n 1 perl -g -n -e 'print "$1\n" if m/of_device_id\s*[a-zA-Z_0-9]*\[\]\s*=\s*{(?:\s*{[^}]*},\s*({\s*}))/' | sort | uniq -c
1 }
1 {
3 { }
1410 { }
1098 {}

and extending to *_device_id:

$ git grep -l device_id | xargs -n 1 perl -g -n -e 'print "$1\n" if m/device_id\s*[a-zA-Z_0-9]*\[\]\s*=\s*{(?:\s*{[^}]*},\s*({\s*}))/' | sort | uniq -c
2 }
2 {
7 { }
2492 { }
1304 {}

So { } is slightly more usual and also better matches the spaces used in

{ .compatible = "nvidia,tegra264-ufs", },

(but I agree, the latter might be subjective).

What makes you claim that {} is preferred?

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature