summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2022-04-21 10:58:00 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-22 16:19:52 +0200
commitf73989f58d54b5b01363a2627dd9c99710770d62 (patch)
tree6772c5969dbbae6c8b04a25e32cea995fe9ba30c /tools/perf/scripts/python/export-to-postgresql.py
parent74c778ec5a272cb100e8d4b7eee04220335794d2 (diff)
serial: icom: switch vague casts to container_of
In icom, there is an ICOM_PORT macro to perform upcasts from struct uart_port to struct icom_port. It's not completely safe and it works only because the first member of icom_port is uart_port. Nowadays, we use container_of for such an upcast instead. So introduce a helper (to_icom_port()) with container_of in it and convert all the ICOM_PORT users to the new helper. Apart from the code and type safety, it's also clear what icom_port (the variable) is. Unlike with the old ICOM_PORT (the macro with the cast). Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20220421085808.24152-3-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions