devlink.h (b7b14ec1ebef35d22f3f4087816468f22c987f75) | devlink.h (f4b6bcc7002f0e3a3428bac33cf1945abff95450) |
---|---|
1/* 2 * include/net/devlink.h - Network physical device Netlink interface 3 * Copyright (c) 2016 Mellanox Technologies. All rights reserved. 4 * Copyright (c) 2016 Jiri Pirko <jiri@mellanox.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 693 unchanged lines hidden (view full) --- 702void 703devlink_health_reporter_destroy(struct devlink_health_reporter *reporter); 704 705void * 706devlink_health_reporter_priv(struct devlink_health_reporter *reporter); 707int devlink_health_report(struct devlink_health_reporter *reporter, 708 const char *msg, void *priv_ctx); 709 | 1/* 2 * include/net/devlink.h - Network physical device Netlink interface 3 * Copyright (c) 2016 Mellanox Technologies. All rights reserved. 4 * Copyright (c) 2016 Jiri Pirko <jiri@mellanox.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 693 unchanged lines hidden (view full) --- 702void 703devlink_health_reporter_destroy(struct devlink_health_reporter *reporter); 704 705void * 706devlink_health_reporter_priv(struct devlink_health_reporter *reporter); 707int devlink_health_report(struct devlink_health_reporter *reporter, 708 const char *msg, void *priv_ctx); 709 |
710void devlink_compat_running_version(struct net_device *dev, 711 char *buf, size_t len); 712int devlink_compat_flash_update(struct net_device *dev, const char *file_name); 713 |
|
710#else 711 712static inline struct devlink *devlink_alloc(const struct devlink_ops *ops, 713 size_t priv_size) 714{ 715 return kzalloc(sizeof(struct devlink) + priv_size, GFP_KERNEL); 716} 717 --- 467 unchanged lines hidden (view full) --- 1185} 1186 1187static inline int 1188devlink_health_report(struct devlink_health_reporter *reporter, 1189 const char *msg, void *priv_ctx) 1190{ 1191 return 0; 1192} | 714#else 715 716static inline struct devlink *devlink_alloc(const struct devlink_ops *ops, 717 size_t priv_size) 718{ 719 return kzalloc(sizeof(struct devlink) + priv_size, GFP_KERNEL); 720} 721 --- 467 unchanged lines hidden (view full) --- 1189} 1190 1191static inline int 1192devlink_health_report(struct devlink_health_reporter *reporter, 1193 const char *msg, void *priv_ctx) 1194{ 1195 return 0; 1196} |
1193#endif | |
1194 | 1197 |
1195#if IS_REACHABLE(CONFIG_NET_DEVLINK) 1196void devlink_compat_running_version(struct net_device *dev, 1197 char *buf, size_t len); 1198int devlink_compat_flash_update(struct net_device *dev, const char *file_name); 1199#else | |
1200static inline void 1201devlink_compat_running_version(struct net_device *dev, char *buf, size_t len) 1202{ 1203} 1204 1205static inline int 1206devlink_compat_flash_update(struct net_device *dev, const char *file_name) 1207{ 1208 return -EOPNOTSUPP; 1209} 1210#endif 1211 1212#endif /* _NET_DEVLINK_H_ */ | 1198static inline void 1199devlink_compat_running_version(struct net_device *dev, char *buf, size_t len) 1200{ 1201} 1202 1203static inline int 1204devlink_compat_flash_update(struct net_device *dev, const char *file_name) 1205{ 1206 return -EOPNOTSUPP; 1207} 1208#endif 1209 1210#endif /* _NET_DEVLINK_H_ */ |