Opened 8 years ago

Closed 7 years ago

#12658 closed bug (fixed)

(easy) ps2 bus cleanup

Reported by: kallisti5 Owned by: nobody
Priority: low Milestone: Unscheduled
Component: Drivers Version: R1/Development
Keywords: easy Cc:
Blocked By: Blocking:
Platform: All

Description

/home/kallisti5/Code/haiku-self/src/add-ons/kernel/bus_managers/ps2/ps2_common.cpp: In function 'void ps2_flush()':
/home/kallisti5/Code/haiku-self/src/add-ons/kernel/bus_managers/ps2/ps2_common.cpp:99:9: warning: variable 'data' set but not used [-Wunused-but-set-variable]
   uint8 data;
         ^
C++ /home/kallisti5/Code/haiku-self/generated.x86_64/objects/haiku/x86_64/release/add-ons/kernel/bus_managers/ps2/ps2_dev.o 
/home/kallisti5/Code/haiku-self/src/add-ons/kernel/bus_managers/ps2/ps2_dev.cpp: In function 'status_t standard_command_timeout(ps2_dev*, uint8, const uint8*, int, uint8*, int, bigtime_t)':
/home/kallisti5/Code/haiku-self/src/add-ons/kernel/bus_managers/ps2/ps2_dev.cpp:373:12: warning: variable 'start' set but not used [-Wunused-but-set-variable]
  bigtime_t start;
            ^
C++ /home/kallisti5/Code/haiku-self/generated.x86_64/objects/haiku/x86_64/release/add-ons/kernel/bus_managers/ps2/ps2_elantech.o 
/home/kallisti5/Code/haiku-self/src/add-ons/kernel/bus_managers/ps2/ps2_elantech.cpp: In function 'status_t synaptics_dev_send_command(ps2_dev*, uint8, uint8*, int)':
/home/kallisti5/Code/haiku-self/src/add-ons/kernel/bus_managers/ps2/ps2_elantech.cpp:213:8: warning: unused variable 'val' [-Wunused-variable]
  uint8 val;
        ^
/home/kallisti5/Code/haiku-self/src/add-ons/kernel/bus_managers/ps2/ps2_elantech.cpp: In function 'status_t elantech_dev_send_command(ps2_dev*, uint8, uint8*, int)':
/home/kallisti5/Code/haiku-self/src/add-ons/kernel/bus_managers/ps2/ps2_elantech.cpp:227:8: warning: unused variable 'val' [-Wunused-variable]
  uint8 val;
        ^
/home/kallisti5/Code/haiku-self/src/add-ons/kernel/bus_managers/ps2/ps2_elantech.cpp: In function 'status_t probe_elantech(ps2_dev*)':
/home/kallisti5/Code/haiku-self/src/add-ons/kernel/bus_managers/ps2/ps2_elantech.cpp:242:6: warning: unused variable 'i' [-Wunused-variable]
  int i;
      ^
/home/kallisti5/Code/haiku-self/src/add-ons/kernel/bus_managers/ps2/ps2_elantech.cpp: In function 'status_t get_range(elantech_cookie*, uint32*, uint32*, uint32*, uint32*, uint32*)':
/home/kallisti5/Code/haiku-self/src/add-ons/kernel/bus_managers/ps2/ps2_elantech.cpp:429:11: warning: unused variable 'status' [-Wunused-variable]
  status_t status = B_OK;
           ^
/home/kallisti5/Code/haiku-self/src/add-ons/kernel/bus_managers/ps2/ps2_elantech.cpp: In function 'status_t elantech_open(const char*, uint32, void**)':
/home/kallisti5/Code/haiku-self/src/add-ons/kernel/bus_managers/ps2/ps2_elantech.cpp:636:33: warning: 'y_max' may be used uninitialized in this function [-Wmaybe-uninitialized]
  gHardwareSpecs.areaEndY = y_max;
                                 ^
/home/kallisti5/Code/haiku-self/src/add-ons/kernel/bus_managers/ps2/ps2_elantech.cpp:634:33: warning: 'x_max' may be used uninitialized in this function [-Wmaybe-uninitialized]
  gHardwareSpecs.areaEndX = x_max;
                                 ^
/home/kallisti5/Code/haiku-self/src/add-ons/kernel/bus_managers/ps2/ps2_elantech.cpp: At global scope:
/home/kallisti5/Code/haiku-self/src/add-ons/kernel/bus_managers/ps2/ps2_elantech.cpp:393:1: warning: 'status_t switch_hardware_tab(ps2_dev*, bool)' defined but not used [-Wunused-function]
 switch_hardware_tab(ps2_dev* dev, bool on)
 ^

Attachments (2)

0001-cleaning-for-ticket-12658.patch (2.4 KB ) - added by Anarchos 8 years ago.
Patch to solve some of the issues
0001-cleaning-for-ticket-12658.2.patch (2.4 KB ) - added by Anarchos 8 years ago.
new version of the patch (only adding a white line)

Download all attachments as: .zip

Change History (11)

comment:1 by pulkomandy, 8 years ago

Summary: [easy] ps2 bus cleanup(easy) ps2 bus cleanup

by Anarchos, 8 years ago

Patch to solve some of the issues

comment:2 by Anarchos, 8 years ago

patch: 01

comment:3 by kallisti5, 8 years ago

Looks good! Functions should have two new lines between them. Fix that minor style issue and I'll commit :-). (If you're using git, fix, then git commit --amend (filename) )

One more git format-patch HEAD~1 and you'll be good to go :-)

comment:4 by Anarchos, 8 years ago

acknowledged :)

comment:5 by Anarchos, 8 years ago

yes i use git. You mean i should do 1) git commit --amend (patch_filename) 2) git format-patch HEAD~1

?

comment:6 by pulkomandy, 8 years ago

git commit --amend # No extra args needed, this edits the latest commit
git format-patch HEAD~1 # Extract the patch again (it is still only one commit)

by Anarchos, 8 years ago

new version of the patch (only adding a white line)

comment:7 by pulkomandy, 8 years ago

There is still only one white line, are you sure you submitted the right file?

comment:8 by kallisti5, 8 years ago

You *have* to stage the file in the amendment...

1) git commit --amend (modified file)
2) git format-patch HEAD~1

Or

1) git add (modified file)
2) git commit --amend
3) git format-patch HEAD~1

comment:9 by pulkomandy, 7 years ago

Resolution: fixed
Status: newclosed

Applied with extra changes in hrev50583.

Note: See TracTickets for help on using tickets.