Skip to content

Commit 6e05b83

Browse files
YueHaibingdavem330
authored andcommitted
net: ll_temac: Make some functions static
Fix sparse warnings: drivers/net/ethernet/xilinx/ll_temac_main.c:66:5: warning: symbol '_temac_ior_be' was not declared. Should it be static? drivers/net/ethernet/xilinx/ll_temac_main.c:71:6: warning: symbol '_temac_iow_be' was not declared. Should it be static? drivers/net/ethernet/xilinx/ll_temac_main.c:76:5: warning: symbol '_temac_ior_le' was not declared. Should it be static? drivers/net/ethernet/xilinx/ll_temac_main.c:81:6: warning: symbol '_temac_iow_le' was not declared. Should it be static? drivers/net/ethernet/xilinx/ll_temac_main.c:648:6: warning: symbol 'ptr_to_txbd' was not declared. Should it be static? drivers/net/ethernet/xilinx/ll_temac_main.c:654:6: warning: symbol 'ptr_from_txbd' was not declared. Should it be static? Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 44bec4b commit 6e05b83

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/net/ethernet/xilinx/ll_temac_main.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,22 +63,22 @@
6363
* Low level register access functions
6464
*/
6565

66-
u32 _temac_ior_be(struct temac_local *lp, int offset)
66+
static u32 _temac_ior_be(struct temac_local *lp, int offset)
6767
{
6868
return ioread32be(lp->regs + offset);
6969
}
7070

71-
void _temac_iow_be(struct temac_local *lp, int offset, u32 value)
71+
static void _temac_iow_be(struct temac_local *lp, int offset, u32 value)
7272
{
7373
return iowrite32be(value, lp->regs + offset);
7474
}
7575

76-
u32 _temac_ior_le(struct temac_local *lp, int offset)
76+
static u32 _temac_ior_le(struct temac_local *lp, int offset)
7777
{
7878
return ioread32(lp->regs + offset);
7979
}
8080

81-
void _temac_iow_le(struct temac_local *lp, int offset, u32 value)
81+
static void _temac_iow_le(struct temac_local *lp, int offset, u32 value)
8282
{
8383
return iowrite32(value, lp->regs + offset);
8484
}
@@ -645,25 +645,25 @@ static void temac_adjust_link(struct net_device *ndev)
645645

646646
#ifdef CONFIG_64BIT
647647

648-
void ptr_to_txbd(void *p, struct cdmac_bd *bd)
648+
static void ptr_to_txbd(void *p, struct cdmac_bd *bd)
649649
{
650650
bd->app3 = (u32)(((u64)p) >> 32);
651651
bd->app4 = (u32)((u64)p & 0xFFFFFFFF);
652652
}
653653

654-
void *ptr_from_txbd(struct cdmac_bd *bd)
654+
static void *ptr_from_txbd(struct cdmac_bd *bd)
655655
{
656656
return (void *)(((u64)(bd->app3) << 32) | bd->app4);
657657
}
658658

659659
#else
660660

661-
void ptr_to_txbd(void *p, struct cdmac_bd *bd)
661+
static void ptr_to_txbd(void *p, struct cdmac_bd *bd)
662662
{
663663
bd->app4 = (u32)p;
664664
}
665665

666-
void *ptr_from_txbd(struct cdmac_bd *bd)
666+
static void *ptr_from_txbd(struct cdmac_bd *bd)
667667
{
668668
return (void *)(bd->app4);
669669
}

0 commit comments

Comments
 (0)