uuid updates for 4.13-rc
Subsystems (3)
Hi all,
this series removes fixes a bug in the previous uuid pull request and removes the the uuid_be type. I had planned to send the last patch for -rc1 already but held off to avoid merge conflicts in linux-next.
In the meantime the thunderbolt code added a few new instances, so patch once removes them. I'd like to get this small series into 4.13-rc so that 4.13 is released without the uuid_be type.
PATCH 1/3 uuid: fix incorrect uuid_equal conversion in test_uuid_test
--- lib/test_uuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/test_uuid.c +1 -1
@@ -82,7 +82,7 @@ static void __init test_uuid_test(const struct test_uuid_data *data)test_uuid_failed ("conversion" , false, true, data->uuid,NULL ); total_tests++; -if (uuid_equal (&data->be, &be)) { +if (!uuid_equal (&data->be, &be)) {sprintf (buf,"%pUb" , &be);test_uuid_failed ("cmp" , false, true, data->uuid, buf); }
Signature · 1 line
2.11.0
Re: [PATCH 1/3] uuid: fix incorrect uuid_equal conversion in test_uuid_test
Quoted 3 lines · Christoph Hellwig
Fixes df33767d ("uuid: hoist helpers uuid_equal() and uuid_copy() from xfs")Reported-by kernel test robot <[email protected]>Signed-off-by Christoph Hellwig <[email protected]>
Oops
Quoted 20 lines
--- lib/test_uuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/test_uuid.c +1
-2@@ -82,7 +82,7 @@ static void __init test_uuid_test(const struct test_uuid_data *data)test_uuid_failed ("conversion" , false, true, data->uuid,NULL ); total_tests++; -if (uuid_equal (&data->be, &be)) { +if (!uuid_equal (&data->be, &be)) {sprintf (buf,"%pUb" , &be);test_uuid_failed ("cmp" , false, true, data->uuid, buf); } --2.11.0
PATCH 2/3 thunderbold: use uuid_t instead of uuid_be
In reply to Christoph HellwigSwitch thunderbolt to the new uuid type.
--- drivers/thunderbolt/switch.c | 8 ++++---- drivers/thunderbolt/tb.h | 4 ++-- drivers/thunderbolt/tb_msgs.h | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-)
drivers/thunderbolt/switch.c +4 -4
@@ -30,7 +30,7 @@ static DEFINE_IDA(nvm_ida);struct nvm_auth_status {struct list_head list; -uuid_be uuid; +uuid_t uuid;u32 status; };
@@ -47,7 +47,7 @@ static struct nvm_auth_status *__nvm_get_auth_status(const struct tb_switch *sw)struct nvm_auth_status *st;list_for_each_entry (st, &nvm_auth_status_cache, list) { -if (!uuid_be_cmp (st->uuid, *sw->uuid)) +if (uuid_equal (&st->uuid, sw->uuid))return st; }
@@ -1460,7 +1460,7 @@ struct tb_sw_lookup {struct tb *tb;u8 link;u8 depth; -const uuid_be *uuid; +const uuid_t *uuid; };static int tb_switch_match (struct device *dev,void *data)
@@ -1517,7 +1517,7 @@ struct tb_switch *tb_switch_find_by_link_depth(struct tb *tb, u8 link, u8 depth)* Returned switch has reference count increased so the caller needs to * call tb_switch_put() when done with the switch. */ -struct tb_switch *tb_switch_find_by_uuid (struct tb *tb,const uuid_be *uuid) +struct tb_switch *tb_switch_find_by_uuid (struct tb *tb,const uuid_t *uuid) {struct tb_sw_lookup lookup;struct device *dev;
drivers/thunderbolt/tb.h +2 -2
@@ -101,7 +101,7 @@ struct tb_switch {struct tb_dma_port *dma_port;struct tb *tb;u64 uid; -uuid_be *uuid; +uuid_t *uuid;u16 vendor;u16 device;const char *vendor_name;
@@ -407,7 +407,7 @@ void tb_sw_set_unplugged(struct tb_switch *sw);struct tb_switch *get_switch_at_route (struct tb_switch *sw,u64 route);struct tb_switch *tb_switch_find_by_link_depth (struct tb *tb,u8 link,u8 depth); -struct tb_switch *tb_switch_find_by_uuid (struct tb *tb,const uuid_be *uuid); +struct tb_switch *tb_switch_find_by_uuid (struct tb *tb,const uuid_t *uuid);static inline unsigned int tb_switch_phy_port_from_link (unsigned int link) {
drivers/thunderbolt/tb_msgs.h +6 -6
@@ -179,7 +179,7 @@ struct icm_fr_pkg_get_topology_response {struct icm_fr_event_device_connected {struct icm_pkg_header hdr; -uuid_be ep_uuid; +uuid_t ep_uuid;u8 connection_key;u8 connection_id;u16 link_info;
@@ -193,7 +193,7 @@ struct icm_fr_event_device_connected {struct icm_fr_pkg_approve_device {struct icm_pkg_header hdr; -uuid_be ep_uuid; +uuid_t ep_uuid;u8 connection_key;u8 connection_id;u16 reserved;
@@ -207,7 +207,7 @@ struct icm_fr_event_device_disconnected {struct icm_fr_pkg_add_device_key {struct icm_pkg_header hdr; -uuid_be ep_uuid; +uuid_t ep_uuid;u8 connection_key;u8 connection_id;u16 reserved;
@@ -216,7 +216,7 @@ struct icm_fr_pkg_add_device_key {struct icm_fr_pkg_add_device_key_response {struct icm_pkg_header hdr; -uuid_be ep_uuid; +uuid_t ep_uuid;u8 connection_key;u8 connection_id;u16 reserved;
@@ -224,7 +224,7 @@ struct icm_fr_pkg_add_device_key_response {struct icm_fr_pkg_challenge_device {struct icm_pkg_header hdr; -uuid_be ep_uuid; +uuid_t ep_uuid;u8 connection_key;u8 connection_id;u16 reserved;
@@ -233,7 +233,7 @@ struct icm_fr_pkg_challenge_device {struct icm_fr_pkg_challenge_device_response {struct icm_pkg_header hdr; -uuid_be ep_uuid; +uuid_t ep_uuid;u8 connection_key;u8 connection_id;u16 reserved;
Signature · 1 line
2.11.0
Re: [PATCH 2/3] thunderbold: use uuid_t instead of uuid_be
Quoted 3 lines · Christoph Hellwig
Switch thunderbolt to the new uuid type.
Signed-off-by Christoph Hellwig <[email protected]>
Quoted 129 lines
--- drivers/thunderbolt/switch.c | 8 ++++---- drivers/thunderbolt/tb.h | 4 ++-- drivers/thunderbolt/tb_msgs.h | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-)drivers/thunderbolt/switch.c +4
-4@@ -30,7 +30,7 @@ static DEFINE_IDA(nvm_ida);struct nvm_auth_status {struct list_head list; -uuid_be uuid; +uuid_t uuid;u32 status; };@@ -47,7 +47,7 @@ static struct nvm_auth_status *__nvm_get_auth_status(const struct tb_switch *sw)struct nvm_auth_status *st;list_for_each_entry (st, &nvm_auth_status_cache, list) { -if (!uuid_be_cmp (st->uuid, *sw->uuid)) +if (uuid_equal (&st->uuid, sw->uuid))return st; }@@ -1460,7 +1460,7 @@ struct tb_sw_lookup {struct tb *tb;u8 link;u8 depth; -const uuid_be *uuid; +const uuid_t *uuid; };static int tb_switch_match (struct device *dev,void *data)@@ -1517,7 +1517,7 @@ struct tb_switch *tb_switch_find_by_link_depth(struct tb *tb, u8 link, u8 depth)* Returned switch has reference count increased so the caller needs to * call tb_switch_put() when done with the switch. */ -struct tb_switch *tb_switch_find_by_uuid (struct tb *tb,const uuid_be *uuid) +struct tb_switch *tb_switch_find_by_uuid (struct tb *tb,const uuid_t *uuid) {struct tb_sw_lookup lookup;struct device *dev;drivers/thunderbolt/tb.h +2
-2@@ -101,7 +101,7 @@ struct tb_switch {struct tb_dma_port *dma_port;struct tb *tb;u64 uid; -uuid_be *uuid; +uuid_t *uuid;u16 vendor;u16 device;const char *vendor_name;@@ -407,7 +407,7 @@ void tb_sw_set_unplugged(struct tb_switch *sw);struct tb_switch *get_switch_at_route (struct tb_switch *sw,u64 route);struct tb_switch *tb_switch_find_by_link_depth (struct tb *tb,u8 link,u8 depth); -struct tb_switch *tb_switch_find_by_uuid (struct tb *tb,const uuid_be *uuid); +struct tb_switch *tb_switch_find_by_uuid (struct tb *tb,const uuid_t *uuid);static inline unsigned int tb_switch_phy_port_from_link (unsigned int link) {drivers/thunderbolt/tb_msgs.h +6
-7@@ -179,7 +179,7 @@ struct icm_fr_pkg_get_topology_response {struct icm_fr_event_device_connected {struct icm_pkg_header hdr; -uuid_be ep_uuid; +uuid_t ep_uuid;u8 connection_key;u8 connection_id;u16 link_info;@@ -193,7 +193,7 @@ struct icm_fr_event_device_connected {struct icm_fr_pkg_approve_device {struct icm_pkg_header hdr; -uuid_be ep_uuid; +uuid_t ep_uuid;u8 connection_key;u8 connection_id;u16 reserved;@@ -207,7 +207,7 @@ struct icm_fr_event_device_disconnected {struct icm_fr_pkg_add_device_key {struct icm_pkg_header hdr; -uuid_be ep_uuid; +uuid_t ep_uuid;u8 connection_key;u8 connection_id;u16 reserved;@@ -216,7 +216,7 @@ struct icm_fr_pkg_add_device_key {struct icm_fr_pkg_add_device_key_response {struct icm_pkg_header hdr; -uuid_be ep_uuid; +uuid_t ep_uuid;u8 connection_key;u8 connection_id;u16 reserved;@@ -224,7 +224,7 @@ struct icm_fr_pkg_add_device_key_response {struct icm_fr_pkg_challenge_device {struct icm_pkg_header hdr; -uuid_be ep_uuid; +uuid_t ep_uuid;u8 connection_key;u8 connection_id;u16 reserved;@@ -233,7 +233,7 @@ struct icm_fr_pkg_challenge_device {struct icm_fr_pkg_challenge_device_response {struct icm_pkg_header hdr; -uuid_be ep_uuid; +uuid_t ep_uuid;u8 connection_key;u8 connection_id;u16 reserved; --2.11.0
Re: [PATCH 2/3] thunderbold: use uuid_t instead of uuid_be
In reply to Christoph HellwigQuoted 3 lines · Christoph Hellwig
Switch thunderbolt to the new uuid type.
Signed-off-by Christoph Hellwig <[email protected]>
You have a typo in $subject: thunderbold -> thunderbolt.
Otherwise looks good and still works fine :)
Re: [PATCH 2/3] thunderbold: use uuid_t instead of uuid_be
Quoted 8 lines · Mika Westerberg
Quoted 3 lines · Christoph Hellwig
Switch thunderbolt to the new uuid type.
Signed-off-by Christoph Hellwig <[email protected]>You have a typo in $subject: thunderbold -> thunderbolt.
Otherwise looks good and still works fine :)
Thanks, fixed.
PATCH 3/3 uuid: remove uuid_be
In reply to Christoph HellwigEverything uses uuid_t now.
--- include/linux/uuid.h | 14 -------------- 1 file changed, 14 deletions(-)
include/linux/uuid.h +0 -14
@@ -84,26 +84,12 @@ int guid_parse(const char *uuid, guid_t *u);int uuid_parse (const char *uuid,uuid_t *u);/* backwards compatibility, don't use in new code */ -typedef uuid_t uuid_be ; -#define UUID_BE (a, _b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ - UUID_INIT(a, _b, c, d0, d1, d2, d3, d4, d5, d6, d7) -#define NULL_UUID_BE \ - UUID_BE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00) -#define uuid_le_gen (u) guid_gen(u) -#define uuid_be_gen (u) uuid_gen(u)#define uuid_le_to_bin (guid, u) guid_parse(guid, u) -#define uuid_be_to_bin (uuid, u) uuid_parse(uuid, u)static inline int uuid_le_cmp (const guid_t u1,const guid_t u2) {return memcmp (&u1, &u2,sizeof (guid_t)); } -static inline int uuid_be_cmp (const uuid_t u1,const uuid_t u2) -{ -return memcmp (&u1, &u2,sizeof (uuid_t)); -} -#endif
Signature · 1 line
2.11.0
Quoted 10 lines · Christoph Hellwig
Hi all,
this series removes fixes a bug in the previous uuid pull request and removes the the
uuid_betype. I had planned to send the last patch for -rc1 already but held off to avoid merge conflicts in linux-next.In the meantime the thunderbolt code added a few new instances, so patch once removes them. I'd like to get this small series into 4.13-rc so that 4.13 is released without the
uuid_betype.
All patches in this series looks reasonable to me (1 is obvious bug fix, 2 is what we discussed with Mika, 3 obvious outcome).
I have sent uuid_le clean up, it looks I need to rebase it on top of this series. Though I'm still waiting for comments, tags there...
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy