Skip to content

Commit 53bd63a

Browse files
vladimirolteandavem330
authored andcommitted
net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_static_config.c
Newer compilers complain with W=1 builds that there are non-static functions defined in sja1105_static_config.c that don't have a prototype, because their prototype is defined in sja1105.h which this translation unit does not include. I don't entirely understand what is the point of these warnings, since in principle there's nothing wrong with that. But let's move the prototypes to a header file that _is_ included by sja1105_static_config.c, since that will make these warnings go away. Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4300c7e commit 53bd63a

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

drivers/net/dsa/sja1105/sja1105.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -323,24 +323,6 @@ int sja1105pqrs_fdb_add(struct dsa_switch *ds, int port,
323323
int sja1105pqrs_fdb_del(struct dsa_switch *ds, int port,
324324
const unsigned char *addr, u16 vid);
325325

326-
/* Common implementations for the static and dynamic configs */
327-
size_t sja1105_l2_forwarding_entry_packing(void *buf, void *entry_ptr,
328-
enum packing_op op);
329-
size_t sja1105pqrs_l2_lookup_entry_packing(void *buf, void *entry_ptr,
330-
enum packing_op op);
331-
size_t sja1105et_l2_lookup_entry_packing(void *buf, void *entry_ptr,
332-
enum packing_op op);
333-
size_t sja1105_vlan_lookup_entry_packing(void *buf, void *entry_ptr,
334-
enum packing_op op);
335-
size_t sja1105_retagging_entry_packing(void *buf, void *entry_ptr,
336-
enum packing_op op);
337-
size_t sja1105pqrs_mac_config_entry_packing(void *buf, void *entry_ptr,
338-
enum packing_op op);
339-
size_t sja1105pqrs_avb_params_entry_packing(void *buf, void *entry_ptr,
340-
enum packing_op op);
341-
size_t sja1105_vl_lookup_entry_packing(void *buf, void *entry_ptr,
342-
enum packing_op op);
343-
344326
/* From sja1105_flower.c */
345327
int sja1105_cls_flower_del(struct dsa_switch *ds, int port,
346328
struct flow_cls_offload *cls, bool ingress);

drivers/net/dsa/sja1105/sja1105_static_config.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,4 +430,22 @@ void sja1105_unpack(const void *buf, u64 *val, int start, int end, size_t len);
430430
void sja1105_packing(void *buf, u64 *val, int start, int end,
431431
size_t len, enum packing_op op);
432432

433+
/* Common implementations for the static and dynamic configs */
434+
size_t sja1105_l2_forwarding_entry_packing(void *buf, void *entry_ptr,
435+
enum packing_op op);
436+
size_t sja1105pqrs_l2_lookup_entry_packing(void *buf, void *entry_ptr,
437+
enum packing_op op);
438+
size_t sja1105et_l2_lookup_entry_packing(void *buf, void *entry_ptr,
439+
enum packing_op op);
440+
size_t sja1105_vlan_lookup_entry_packing(void *buf, void *entry_ptr,
441+
enum packing_op op);
442+
size_t sja1105_retagging_entry_packing(void *buf, void *entry_ptr,
443+
enum packing_op op);
444+
size_t sja1105pqrs_mac_config_entry_packing(void *buf, void *entry_ptr,
445+
enum packing_op op);
446+
size_t sja1105pqrs_avb_params_entry_packing(void *buf, void *entry_ptr,
447+
enum packing_op op);
448+
size_t sja1105_vl_lookup_entry_packing(void *buf, void *entry_ptr,
449+
enum packing_op op);
450+
433451
#endif

0 commit comments

Comments
 (0)