Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
986f1878
Commit
986f1878
authored
Apr 30, 2004
by
Rolf Eike Beer
Committed by
Deepak Saxena
Apr 30, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] SHPC PCI Hotplug: kill useless NULL checks
parent
b1f8fa94
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
32 deletions
+3
-32
drivers/pci/hotplug/shpchp_core.c
drivers/pci/hotplug/shpchp_core.c
+3
-32
No files found.
drivers/pci/hotplug/shpchp_core.c
View file @
986f1878
...
...
@@ -240,15 +240,11 @@ static int set_attention_status (struct hotplug_slot *hotplug_slot, u8 status)
{
struct
slot
*
slot
=
get_slot
(
hotplug_slot
,
__FUNCTION__
);
if
(
slot
==
NULL
)
return
-
ENODEV
;
dbg
(
"%s - physical_slot = %s
\n
"
,
__FUNCTION__
,
hotplug_slot
->
name
);
hotplug_slot
->
info
->
attention_status
=
status
;
slot
->
hpc_ops
->
set_attention_status
(
slot
,
status
);
return
0
;
}
...
...
@@ -257,9 +253,6 @@ static int enable_slot (struct hotplug_slot *hotplug_slot)
{
struct
slot
*
slot
=
get_slot
(
hotplug_slot
,
__FUNCTION__
);
if
(
slot
==
NULL
)
return
-
ENODEV
;
dbg
(
"%s - physical_slot = %s
\n
"
,
__FUNCTION__
,
hotplug_slot
->
name
);
return
shpchp_enable_slot
(
slot
);
...
...
@@ -270,9 +263,6 @@ static int disable_slot (struct hotplug_slot *hotplug_slot)
{
struct
slot
*
slot
=
get_slot
(
hotplug_slot
,
__FUNCTION__
);
if
(
slot
==
NULL
)
return
-
ENODEV
;
dbg
(
"%s - physical_slot = %s
\n
"
,
__FUNCTION__
,
hotplug_slot
->
name
);
return
shpchp_disable_slot
(
slot
);
...
...
@@ -283,9 +273,6 @@ static int get_power_status (struct hotplug_slot *hotplug_slot, u8 *value)
struct
slot
*
slot
=
get_slot
(
hotplug_slot
,
__FUNCTION__
);
int
retval
;
if
(
slot
==
NULL
)
return
-
ENODEV
;
dbg
(
"%s - physical_slot = %s
\n
"
,
__FUNCTION__
,
hotplug_slot
->
name
);
retval
=
slot
->
hpc_ops
->
get_power_status
(
slot
,
value
);
...
...
@@ -300,9 +287,6 @@ static int get_attention_status (struct hotplug_slot *hotplug_slot, u8 *value)
struct
slot
*
slot
=
get_slot
(
hotplug_slot
,
__FUNCTION__
);
int
retval
;
if
(
slot
==
NULL
)
return
-
ENODEV
;
dbg
(
"%s - physical_slot = %s
\n
"
,
__FUNCTION__
,
hotplug_slot
->
name
);
retval
=
slot
->
hpc_ops
->
get_attention_status
(
slot
,
value
);
...
...
@@ -317,9 +301,6 @@ static int get_latch_status (struct hotplug_slot *hotplug_slot, u8 *value)
struct
slot
*
slot
=
get_slot
(
hotplug_slot
,
__FUNCTION__
);
int
retval
;
if
(
slot
==
NULL
)
return
-
ENODEV
;
dbg
(
"%s - physical_slot = %s
\n
"
,
__FUNCTION__
,
hotplug_slot
->
name
);
retval
=
slot
->
hpc_ops
->
get_latch_status
(
slot
,
value
);
...
...
@@ -334,13 +315,9 @@ static int get_adapter_status (struct hotplug_slot *hotplug_slot, u8 *value)
struct
slot
*
slot
=
get_slot
(
hotplug_slot
,
__FUNCTION__
);
int
retval
;
if
(
slot
==
NULL
)
return
-
ENODEV
;
dbg
(
"%s - physical_slot = %s
\n
"
,
__FUNCTION__
,
hotplug_slot
->
name
);
retval
=
slot
->
hpc_ops
->
get_adapter_status
(
slot
,
value
);
if
(
retval
<
0
)
*
value
=
hotplug_slot
->
info
->
adapter_status
;
...
...
@@ -352,9 +329,6 @@ static int get_max_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_sp
struct
slot
*
slot
=
get_slot
(
hotplug_slot
,
__FUNCTION__
);
int
retval
;
if
(
slot
==
NULL
)
return
-
ENODEV
;
dbg
(
"%s - physical_slot = %s
\n
"
,
__FUNCTION__
,
hotplug_slot
->
name
);
retval
=
slot
->
hpc_ops
->
get_max_bus_speed
(
slot
,
value
);
...
...
@@ -369,9 +343,6 @@ static int get_cur_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_sp
struct
slot
*
slot
=
get_slot
(
hotplug_slot
,
__FUNCTION__
);
int
retval
;
if
(
slot
==
NULL
)
return
-
ENODEV
;
dbg
(
"%s - physical_slot = %s
\n
"
,
__FUNCTION__
,
hotplug_slot
->
name
);
retval
=
slot
->
hpc_ops
->
get_cur_bus_speed
(
slot
,
value
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment