Re: [PATCH v5 2/2] iio: magnetometer: bmc150_magn: minor formatting cleanup
From: Andy Shevchenko
Date: Sun Feb 08 2026 - 08:36:15 EST
On Sat, Feb 07, 2026 at 08:16:59PM -0500, Neel Bullywon wrote:
> Add spaces inside braces for initializer lists in the sampling
> frequency and preset tables for consistency.
>
> Fix indentation of bmc150_magn_scan_masks array and add trailing
> comma. No functional changes.
...
> +} bmc150_magn_samp_freq_table[] = { { 2, 0x01 },
> + { 6, 0x02 },
> + { 8, 0x03 },
> + { 10, 0x00 },
> + { 15, 0x04 },
> + { 20, 0x05 },
> + { 25, 0x06 },
> + { 30, 0x07 } };
While at it, fix the style, the above is weird one.
} bmc150_magn_samp_freq_table[] = {
{ 2, 0x01 },
{ 6, 0x02 },
{ 8, 0x03 },
{ 10, 0x00 },
{ 15, 0x04 },
{ 20, 0x05 },
{ 25, 0x06 },
{ 30, 0x07 },
// also mind a comma
};
OR alternatively
} bmc150_magn_samp_freq_table[] = {
{ 2, 0x01 }, { 6, 0x02 }, { 8, 0x03 }, { 10, 0x00 }, /* 0 - 3 */
{ 15, 0x04 }, { 20, 0x05 }, { 25, 0x06 }, { 30, 0x07 }, /* 4 - 7 */
};
...
> static const unsigned long bmc150_magn_scan_masks[] = {
> + BIT(AXIS_X) | BIT(AXIS_Y) | BIT(AXIS_Z),
> + 0,
No comma for the terminator, please.
> +};
--
With Best Regards,
Andy Shevchenko