]> git.baikalelectronics.ru Git - kernel.git/commit
IB/ipath: Fix incorrect use of sizeof on msg buffer (function argument)
authorDave Olson <dave.olson@qlogic.com>
Wed, 10 Oct 2007 05:24:36 +0000 (22:24 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 30 Oct 2007 18:05:49 +0000 (11:05 -0700)
commit8f6d96a7744f3c7108821b594e46fd03000be4d2
tree8b1bb151e66af810efdeeb67124ae1ca2fad9f82
parent0e860b1651b0fa5416ee33e807198b238c8fa534
IB/ipath: Fix incorrect use of sizeof on msg buffer (function argument)

Inside a function declared as

    void foo(char bar[512])

the value of sizeof bar is the size of a pointer, not 512.  So avoid
constructions like this by passing the size explicitly.

Also reduce the size of the buffer to 128 bytes (512 was overly generous).

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ipath/ipath_intr.c