mei: Move uuid_le_cmp() to its only user
Subsystems (3)
Andy Shevchenko
reviewerPATCH 1/1 mei: Move uuid_le_cmp() to its only user
There is only a single user of uuid_le_cmp() API, let's make it private to that user.
--- drivers/misc/mei/mei_dev.h | 5 +++++ include/linux/uuid.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/misc/mei/mei_dev.h +5 -0
@@ -13,6 +13,11 @@#include <linux/mei.h> #include <linux/mei_cl_bus.h> +static inline int uuid_le_cmp (const uuid_le u1,const uuid_le u2) +{ +return memcmp (&u1, &u2,sizeof (uuid_le)); +} +#include "hw.h" #include "hbm.h"
include/linux/uuid.h +0 -5
@@ -110,9 +110,4 @@ int uuid_parse(const char *uuid, uuid_t *u);/* MEI UUID type, don't use anywhere else */ #include <uapi/linux/uuid.h> -static inline int uuid_le_cmp (const uuid_le u1,const uuid_le u2) -{ -return memcmp (&u1, &u2,sizeof (uuid_le)); -} -#endif
Signature · 1 line
2.39.1
Quoted 2 lines · Andy Shevchenko
There is only a single user of
uuid_le_cmp()API, let's make it private to that user.
Any reason this code can't just use guid_t and guid_equal?
Andy Shevchenko
reviewerQuoted 5 lines · Christoph Hellwig
Quoted 2 lines · Andy Shevchenko
There is only a single user of
uuid_le_cmp()API, let's make it private to that user.Any reason this code can't just use
guid_tandguid_equal?
It's part of ABI, while guid_* are for the internal use.
Eventually they may switch to the internal types, but it's up to MEI.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 10 lines · Andy Shevchenko
Quoted 5 lines · Christoph Hellwig
Quoted 2 lines · Andy Shevchenko
There is only a single user of
uuid_le_cmp()API, let's make it private to that user.Any reason this code can't just use
guid_tandguid_equal?It's part of ABI, while guid_* are for the internal use.
Eventually they may switch to the internal types, but it's up to MEI.
How can a type name be part of a binary interface?
Andy Shevchenko
reviewerQuoted 6 lines · Christoph Hellwig
Quoted 5 lines · Andy Shevchenko
Quoted 4 lines · Christoph Hellwig
Quoted 2 lines · Andy Shevchenko
There is only a single user of
uuid_le_cmp()API, let's make it private to that user.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Any reason this code can't just use
guid_tandguid_equal?It's part of ABI, while guid_* are for the internal use.
Eventually they may switch to the internal types, but it's up to MEI.
How can a type name be part of a binary interface?
If I'm not mistaken there is a difference between simple __u8[16] and struct { __u8[16] } due to alignment. But data wise it's the same, of course. That said, it depends on how this type is being used in the any of ABI.
From the API perspective the guid_* are not visible to uAPI.
Signature · 2 lines
With Best Regards, Andy Shevchenko