mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-09 06:43:09 +00:00
net: ocelot: align macros for consistency
In the ocelot.h file, several read / write macros were split across multiple lines, while others weren't. Split all macros that exceed the 80 character column width and match the style of the rest of the file. Signed-off-by: Colin Foster <colin.foster@in-advantage.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e27d785e60
commit
65c53595bc
@ -742,25 +742,39 @@ struct ocelot_policer {
|
||||
u32 burst; /* bytes */
|
||||
};
|
||||
|
||||
#define ocelot_read_ix(ocelot, reg, gi, ri) __ocelot_read_ix(ocelot, reg, reg##_GSZ * (gi) + reg##_RSZ * (ri))
|
||||
#define ocelot_read_gix(ocelot, reg, gi) __ocelot_read_ix(ocelot, reg, reg##_GSZ * (gi))
|
||||
#define ocelot_read_rix(ocelot, reg, ri) __ocelot_read_ix(ocelot, reg, reg##_RSZ * (ri))
|
||||
#define ocelot_read(ocelot, reg) __ocelot_read_ix(ocelot, reg, 0)
|
||||
#define ocelot_read_ix(ocelot, reg, gi, ri) \
|
||||
__ocelot_read_ix(ocelot, reg, reg##_GSZ * (gi) + reg##_RSZ * (ri))
|
||||
#define ocelot_read_gix(ocelot, reg, gi) \
|
||||
__ocelot_read_ix(ocelot, reg, reg##_GSZ * (gi))
|
||||
#define ocelot_read_rix(ocelot, reg, ri) \
|
||||
__ocelot_read_ix(ocelot, reg, reg##_RSZ * (ri))
|
||||
#define ocelot_read(ocelot, reg) \
|
||||
__ocelot_read_ix(ocelot, reg, 0)
|
||||
|
||||
#define ocelot_write_ix(ocelot, val, reg, gi, ri) __ocelot_write_ix(ocelot, val, reg, reg##_GSZ * (gi) + reg##_RSZ * (ri))
|
||||
#define ocelot_write_gix(ocelot, val, reg, gi) __ocelot_write_ix(ocelot, val, reg, reg##_GSZ * (gi))
|
||||
#define ocelot_write_rix(ocelot, val, reg, ri) __ocelot_write_ix(ocelot, val, reg, reg##_RSZ * (ri))
|
||||
#define ocelot_write_ix(ocelot, val, reg, gi, ri) \
|
||||
__ocelot_write_ix(ocelot, val, reg, reg##_GSZ * (gi) + reg##_RSZ * (ri))
|
||||
#define ocelot_write_gix(ocelot, val, reg, gi) \
|
||||
__ocelot_write_ix(ocelot, val, reg, reg##_GSZ * (gi))
|
||||
#define ocelot_write_rix(ocelot, val, reg, ri) \
|
||||
__ocelot_write_ix(ocelot, val, reg, reg##_RSZ * (ri))
|
||||
#define ocelot_write(ocelot, val, reg) __ocelot_write_ix(ocelot, val, reg, 0)
|
||||
|
||||
#define ocelot_rmw_ix(ocelot, val, m, reg, gi, ri) __ocelot_rmw_ix(ocelot, val, m, reg, reg##_GSZ * (gi) + reg##_RSZ * (ri))
|
||||
#define ocelot_rmw_gix(ocelot, val, m, reg, gi) __ocelot_rmw_ix(ocelot, val, m, reg, reg##_GSZ * (gi))
|
||||
#define ocelot_rmw_rix(ocelot, val, m, reg, ri) __ocelot_rmw_ix(ocelot, val, m, reg, reg##_RSZ * (ri))
|
||||
#define ocelot_rmw_ix(ocelot, val, m, reg, gi, ri) \
|
||||
__ocelot_rmw_ix(ocelot, val, m, reg, reg##_GSZ * (gi) + reg##_RSZ * (ri))
|
||||
#define ocelot_rmw_gix(ocelot, val, m, reg, gi) \
|
||||
__ocelot_rmw_ix(ocelot, val, m, reg, reg##_GSZ * (gi))
|
||||
#define ocelot_rmw_rix(ocelot, val, m, reg, ri) \
|
||||
__ocelot_rmw_ix(ocelot, val, m, reg, reg##_RSZ * (ri))
|
||||
#define ocelot_rmw(ocelot, val, m, reg) __ocelot_rmw_ix(ocelot, val, m, reg, 0)
|
||||
|
||||
#define ocelot_field_write(ocelot, reg, val) regmap_field_write((ocelot)->regfields[(reg)], (val))
|
||||
#define ocelot_field_read(ocelot, reg, val) regmap_field_read((ocelot)->regfields[(reg)], (val))
|
||||
#define ocelot_fields_write(ocelot, id, reg, val) regmap_fields_write((ocelot)->regfields[(reg)], (id), (val))
|
||||
#define ocelot_fields_read(ocelot, id, reg, val) regmap_fields_read((ocelot)->regfields[(reg)], (id), (val))
|
||||
#define ocelot_field_write(ocelot, reg, val) \
|
||||
regmap_field_write((ocelot)->regfields[(reg)], (val))
|
||||
#define ocelot_field_read(ocelot, reg, val) \
|
||||
regmap_field_read((ocelot)->regfields[(reg)], (val))
|
||||
#define ocelot_fields_write(ocelot, id, reg, val) \
|
||||
regmap_fields_write((ocelot)->regfields[(reg)], (id), (val))
|
||||
#define ocelot_fields_read(ocelot, id, reg, val) \
|
||||
regmap_fields_read((ocelot)->regfields[(reg)], (id), (val))
|
||||
|
||||
#define ocelot_target_read_ix(ocelot, target, reg, gi, ri) \
|
||||
__ocelot_target_read_ix(ocelot, target, reg, reg##_GSZ * (gi) + reg##_RSZ * (ri))
|
||||
|
Loading…
Reference in New Issue
Block a user