<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/scsi/pmcraid.c, branch linux-4.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.15.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.15.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-11-22T00:35:54Z</updated>
<entry>
<title>treewide: Remove TIMER_FUNC_TYPE and TIMER_DATA_TYPE casts</title>
<updated>2017-11-22T00:35:54Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2017-10-23T07:40:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=841b86f3289dbe858daeceec36423d4ea286fac2'/>
<id>urn:sha1:841b86f3289dbe858daeceec36423d4ea286fac2</id>
<content type='text'>
With all callbacks converted, and the timer callback prototype
switched over, the TIMER_FUNC_TYPE cast is no longer needed,
so remove it. Conversion was done with the following scripts:

    perl -pi -e 's|\(TIMER_FUNC_TYPE\)||g' \
        $(git grep TIMER_FUNC_TYPE | cut -d: -f1 | sort -u)

    perl -pi -e 's|\(TIMER_DATA_TYPE\)||g' \
        $(git grep TIMER_DATA_TYPE | cut -d: -f1 | sort -u)

The now unused macros are also dropped from include/linux/timer.h.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>scsi: pmcraid: Convert timers to use timer_setup()</title>
<updated>2017-11-01T18:27:09Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2017-08-22T19:48:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=242b56579ee853bcbdd7c7f9fcd62890103c52e8'/>
<id>urn:sha1:242b56579ee853bcbdd7c7f9fcd62890103c52e8</id>
<content type='text'>
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.

Cc: "James E.J. Bottomley" &lt;jejb@linux.vnet.ibm.com&gt;
Cc: "Martin K. Petersen" &lt;martin.petersen@oracle.com&gt;
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: pmcraid: fix duplicated code for different branches</title>
<updated>2017-08-25T02:29:05Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2017-08-13T01:26:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db269932b97e8e7d2bc974dc6a63cb795ddd7e54'/>
<id>urn:sha1:db269932b97e8e7d2bc974dc6a63cb795ddd7e54</id>
<content type='text'>
Refactor code in order to avoid identical code for different branches.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: pmcraid: Replace PCI pool old API</title>
<updated>2017-08-07T18:04:01Z</updated>
<author>
<name>Romain Perier</name>
</author>
<published>2017-07-06T08:13:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a7ec87a9a01a70e545ed3681a3a2a96680b5fe6f'/>
<id>urn:sha1:a7ec87a9a01a70e545ed3681a3a2a96680b5fe6f</id>
<content type='text'>
The PCI pool API is deprecated. This commit replaces the PCI pool old
API by the appropriate function with the DMA pool API.

Signed-off-by: Romain Perier &lt;romain.perier@collabora.com&gt;
Acked-by: Peter Senna Tschudin &lt;peter.senna@collabora.com&gt;
Tested-by: Peter Senna Tschudin &lt;peter.senna@collabora.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: pmcraid: remove redundant check to see if request_size is less than zero</title>
<updated>2017-05-09T02:16:45Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2017-05-03T16:29:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b77b36cb7272ec5b9fb000e2ff18e947d9586a22'/>
<id>urn:sha1:b77b36cb7272ec5b9fb000e2ff18e947d9586a22</id>
<content type='text'>
The 2nd check to see if request_size is less than zero is redundant
because the first check takes error exit path on this condition. So,
since it is redundant, remove it.

Detected by CoverityScan, CID#146149 ("Logically Dead Code")

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Reviewed-by: Tyrel Datwyler &lt;tyreld@linux.vnet.ibm.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: pmcraid: use normal copy_from_user</title>
<updated>2017-04-24T22:11:22Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2017-04-21T22:02:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=edb88cef0570914375d461107759cf0d6d677ed5'/>
<id>urn:sha1:edb88cef0570914375d461107759cf0d6d677ed5</id>
<content type='text'>
As pointed out by Al Viro for my previous series, the driver has no need
to call access_ok() and __copy_from_user()/__copy_to_user(). Changing
it to regular copy_from_user()/copy_to_user() simplifies the code without
any real downsides, making it less error-prone at best.

This patch by itself also addresses the warning about the access_ok()
macro on MIPS, but both fixes improve the code, so ideally we apply
them both.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: pmcraid: fix minor sparse warnings</title>
<updated>2017-04-24T22:11:22Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2017-04-20T17:54:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=144b139c96200c51248b8701a1ef4a6bebd3dc8c'/>
<id>urn:sha1:144b139c96200c51248b8701a1ef4a6bebd3dc8c</id>
<content type='text'>
pmcraid_minor is only used in this one file and should be 'static' as suggested
by sparse:

drivers/scsi/pmcraid.c:80:1: warning: symbol 'pmcraid_minor' was not declared. Should it be static?

In Linux coding style, a literal '0' integer should not be used to represent
a NULL pointer:

drivers/scsi/pmcraid.c:348:29: warning: Using plain integer as NULL pointer
drivers/scsi/pmcraid.c:4824:49: warning: Using plain integer as NULL pointer

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: pmcraid: fix endianess sparse annotations</title>
<updated>2017-04-24T22:11:22Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2017-04-20T17:54:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=45c80be614b094459f2c699353080e4f8059f610'/>
<id>urn:sha1:45c80be614b094459f2c699353080e4f8059f610</id>
<content type='text'>
The use of le32_to_cpu() etc in this driver looks completely arbitrary.
It may have made sense at some point, but it is not applied consistently,
so this driver presumably won't work on big-endian kernel builds.

Unfortunately it's unclear whether the type names or the calls to
le32_to_cpu() are the correct ones. I'm taking educated guesses here
and assume that most of the __le32 and __le16 annotations are correct,
adding the conversion helpers whereever we access those fields.

The exceptions are the 'fw_version' field that is always accessed as
big-endian, so I'm changing the type here, and the 'hrrq' values that
are accessed as little-endian, so I'm changing those the other way.

None of these changes should have any effect on little-endian
architectures like x86, but it addresses the sparse warnings.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: pmcraid: use __iomem pointers for ioctl argument</title>
<updated>2017-04-24T22:11:02Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2017-04-20T17:54:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3397623b370494fd7e0bca62b7578051482d058d'/>
<id>urn:sha1:3397623b370494fd7e0bca62b7578051482d058d</id>
<content type='text'>
kernelci.org reports a new compile warning for old code in the pmcraid
driver:

arch/mips/include/asm/uaccess.h:138:21: warning: passing argument 1 of '__access_ok' makes pointer from integer without a cast [-Wint-conversion]

The warning got introduced by a cleanup to the access_ok() helper that
requires the argument to be a pointer, where the old version silently
accepts 'unsigned long' arguments as it still does on most other
architectures.

The new behavior in MIPS however seems absolutely sensible, and so far I
could only find one other file with the same issue, so the best solution
seems to be to clean up the pmcraid driver.

This makes the driver consistently use 'void __iomem *' pointers for
passing around the address of the user space ioctl arguments, which gets
rid of the kernelci warning as well as several sparse warnings.

Fixes: f0a955f4eeec ("mips: sanitize __access_ok()")
Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: pmcraid: fix lock imbalance in pmcraid_reset_reload()</title>
<updated>2017-04-24T21:59:50Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2017-04-23T08:33:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=91402608641823fdfd8e18042f20c1a449108514'/>
<id>urn:sha1:91402608641823fdfd8e18042f20c1a449108514</id>
<content type='text'>
sparse found a bug that has always been present since the driver was
merged:

drivers/scsi/pmcraid.c:2353:12: warning: context imbalance in 'pmcraid_reset_reload' - different lock contexts for basic block

Fix this by using a common unlock goto label, and also reduce the
indentation level in the function.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reported-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
</feed>
