Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
easy-soc-libs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HAL
easy-soc-libs
Commits
e65379de
Commit
e65379de
authored
3 years ago
by
Maxim Menshikov
Browse files
Options
Downloads
Patches
Plain Diff
libethernet/generic: fix static analysis errors
parent
5fe6ea76
No related branches found
No related tags found
1 merge request
!282
easy-soc-libs: Enable errors instead of warnings, fix warnings, enable static analysis for libqos/libeasy
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libethernet/ethernet.c
+10
-10
10 additions, 10 deletions
libethernet/ethernet.c
with
10 additions
and
10 deletions
libethernet/ethernet.c
+
10
−
10
View file @
e65379de
...
@@ -38,11 +38,11 @@
...
@@ -38,11 +38,11 @@
#include
"ethernet.h"
#include
"ethernet.h"
#ifdef
IOPSYS_BROADCOM
#if
def
ined(
IOPSYS_BROADCOM
)
extern
const
struct
eth_ops
bcm_eth_ops
;
extern
const
struct
eth_ops
bcm_eth_ops
;
#elif IOPSYS_TEST
#elif
defined(
IOPSYS_TEST
)
extern
const
struct
eth_ops
test_eth_ops
;
extern
const
struct
eth_ops
test_eth_ops
;
#elif IOPSYS_ECONET
#elif
defined(
IOPSYS_ECONET
)
extern
const
struct
eth_ops
econet_gen_eth_ops
;
extern
const
struct
eth_ops
econet_gen_eth_ops
;
extern
const
struct
eth_ops
econet_nas_wan_eth_ops
;
extern
const
struct
eth_ops
econet_nas_wan_eth_ops
;
extern
const
struct
eth_ops
econet_ae_wan_eth_ops
;
extern
const
struct
eth_ops
econet_ae_wan_eth_ops
;
...
@@ -51,11 +51,11 @@ extern const struct eth_ops ethsw_ops;
...
@@ -51,11 +51,11 @@ extern const struct eth_ops ethsw_ops;
#endif
#endif
const
struct
eth_ops
*
eth_ops
[]
=
{
const
struct
eth_ops
*
eth_ops
[]
=
{
#ifdef
IOPSYS_BROADCOM
#if
def
ined(
IOPSYS_BROADCOM
)
&
bcm_eth_ops
,
&
bcm_eth_ops
,
#elif IOPSYS_TEST
#elif
defined(
IOPSYS_TEST
)
&
test_eth_ops
,
&
test_eth_ops
,
#elif IOPSYS_ECONET
#elif
defined(
IOPSYS_ECONET
)
&
econet_gen_eth_ops
,
&
econet_gen_eth_ops
,
&
econet_nas_wan_eth_ops
,
&
econet_nas_wan_eth_ops
,
&
econet_ae_wan_eth_ops
,
&
econet_ae_wan_eth_ops
,
...
@@ -244,7 +244,7 @@ int eth_mii_get_phy_id(const char *ifname, int port, int *phy_id)
...
@@ -244,7 +244,7 @@ int eth_mii_get_phy_id(const char *ifname, int port, int *phy_id)
mii
=
if_mii
(
&
ifr
);
mii
=
if_mii
(
&
ifr
);
memset
(
mii
,
0
,
sizeof
(
struct
mii_ioctl_data
));
memset
(
mii
,
0
,
sizeof
(
struct
mii_ioctl_data
));
mii
->
val_in
=
port
;
mii
->
val_in
=
(
uint16_t
)
port
;
if
(
ioctl
(
s
,
SIOCGMIIPHY
,
&
ifr
)
<
0
)
{
if
(
ioctl
(
s
,
SIOCGMIIPHY
,
&
ifr
)
<
0
)
{
libethernet_err
(
"SIOCGMIIPHY failed!
\n
"
);
libethernet_err
(
"SIOCGMIIPHY failed!
\n
"
);
...
@@ -283,9 +283,9 @@ static int eth_mii_ioctl(const char *ifname, int cmd, int phy_id, int reg,
...
@@ -283,9 +283,9 @@ static int eth_mii_ioctl(const char *ifname, int cmd, int phy_id, int reg,
memset
(
mii
,
0
,
sizeof
(
struct
mii_ioctl_data
));
memset
(
mii
,
0
,
sizeof
(
struct
mii_ioctl_data
));
//PHYID_2_MII_IOCTL(phy_id, mii);
//PHYID_2_MII_IOCTL(phy_id, mii);
mii
->
phy_id
=
phy_id
;
mii
->
phy_id
=
(
uint16_t
)
phy_id
;
mii
->
reg_num
=
reg
;
mii
->
reg_num
=
(
uint16_t
)
reg
;
mii
->
val_in
=
in
;
mii
->
val_in
=
(
uint16_t
)
in
;
if
(
ioctl
(
s
,
cmd
,
&
ifr
)
<
0
)
{
if
(
ioctl
(
s
,
cmd
,
&
ifr
)
<
0
)
{
libethernet_err
(
"MII cmd on %s failed
\n
"
,
ifr
.
ifr_name
);
libethernet_err
(
"MII cmd on %s failed
\n
"
,
ifr
.
ifr_name
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment