Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
83
Issues
83
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
12b80416
Commit
12b80416
authored
Jul 14, 2016
by
Grzegorz Daniluk
Committed by
Adam Wujek
Jul 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel/wr_pstats: trivial cleanup, make checkpatch happy
parent
3c4014d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
wr_pstats.c
kernel/wr_pstats/wr_pstats.c
+9
-6
No files found.
kernel/wr_pstats/wr_pstats.c
View file @
12b80416
...
...
@@ -226,11 +226,13 @@ static void pstats_tlet_fn(unsigned long arg)
*/
spin_lock
(
&
device
->
port_mutex
[
port
]);
cntrs_ov
=
&
(
device
->
overflows
[
device
->
irqs_tail
][
port
]);
//if(port==0)
// printk(KERN_WARNING "cntrs_ov: %08x %08x\n", (uint32_t)((*cntrs_ov)>>32 & 0xffffffff),
// (uint32_t)((*cntrs_ov) & 0x00ffffffffLL));
/* if(port==0)
* printk(KERN_WARNING "cntrs_ov: %08x %08x\n", (uint32_t)((*cntrs_ov)>>32 & 0xffffffff),
* (uint32_t)((*cntrs_ov) & 0x00ffffffffLL));
*/
for
(
cntr
=
0
;
cntr
<
firmware_counters
;
++
cntr
)
{
/*decode counters overflow flags to increment coutners*/
/* decode counters overflow flags to increment
* coutners */
if
((
*
cntrs_ov
)
>>
cntr
&
0x01
)
{
ptr
=
&
(
device
->
cntrs
[
port
][
cntr
]);
*
ptr
+=
1
<<
PSTATS_MSB_SHIFT
;
...
...
@@ -259,7 +261,7 @@ static irqreturn_t pstats_irq_handler(int irq, void *devid)
device
->
overflows
[
device
->
irqs_head
][
i
]
=
pstats_irq_cntrs
(
i
);
device
->
irqs_head
=
(
device
->
irqs_head
+
1
)
%
PSTATS_IRQBUFSZ
;
/
/device->port_irqs[device->irqs_head++ % PSTATS_IRQBUFSZ] = irqs;
/
* device->port_irqs[device->irqs_head++ % PSTATS_IRQBUFSZ] = irqs; */
tasklet_schedule
(
&
proc_ports
);
pstats_irq_enable
(
portmsk
);
...
...
@@ -386,7 +388,8 @@ static int pstats_handler(ctl_table *ctl, int write, void *buffer,
return
ret
;
}
/* one per port, then info and description, and terminator, filled at init time */
/* one per port, then info and description, and terminator,
* filled at init time */
static
ctl_table
pstats_ctl_table
[
PSTATS_MAX_NPORTS
+
3
];
static
ctl_table
proc_table
[]
=
{
...
...
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