IB/core: Reduce the places that use zgid
Instead of open coding memcmp() to check whether a given GID is zero or not, use a helper function to do so, and replace instances of memcpy(z,&zgid) with memset. Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:

committed by
Jason Gunthorpe

parent
7b74a83cf5
commit
25e62655c7
@@ -149,4 +149,5 @@ int ib_get_cached_port_state(struct ib_device *device,
|
||||
u8 port_num,
|
||||
enum ib_port_state *port_active);
|
||||
|
||||
bool rdma_is_zero_gid(const union ib_gid *gid);
|
||||
#endif /* _IB_CACHE_H */
|
||||
|
Reference in New Issue
Block a user