/* * Copyright (C) 2015 Tobias Klauser * * This file is part of llmnrd. * * llmnrd is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 2 of the License. * * llmnrd is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with llmnrd. If not, see . */ #ifndef COMPILER_H #define COMPILER_H #ifdef __GNUC__ # define __noreturn __attribute__((noreturn)) # define __packed __attribute__((packed)) # define __unused __attribute__((unused)) # ifndef offsetof # define offsetof(a, b) __builtin_offsetof(a, b) # endif #else # define __noreturn # define __packed # define __unused #endif #ifndef offsetof # define offsetof(type, member) ((size_t) &((type *)0)->member) #endif #ifndef container_of # define container_of(ptr, type, member) ({ \ const typeof(((type *)0)->member) *__mptr = (ptr); \ (type *)((char *)__mptr - offsetof(type, member));}) #endif #endif /* COMPILER_H */ p-back'>packet-rx-pump-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2017-01-06 19:12:52 -0800
committerDavid S. Miller <davem@davemloft.net>2017-01-08 17:51:44 -0500
commitbc1f44709cf27fb2a5766cadafe7e2ad5e9cb221 (patch)
tree10f4199c962083956bb3f2928e144b20be23ffe7
parent63c64de7be1f762b8c6c224f2994cf5769b542ae (diff)
net: make ndo_get_stats64 a void function
The network device operation for reading statistics is only called in one place, and it ignores the return value. Having a structure return value is potentially confusing because some future driver could incorrectly assume that the return value was used. Fix all drivers with ndo_get_stats64 to have a void function. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>