staging: lustre: lnet: Replace sg++ with sg = sg_next(sg)
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Sat, 19 Mar 2016 12:32:55 +0000 (18:02 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Mar 2016 14:30:36 +0000 (07:30 -0700)
commit3d1477309806459d39e13d8c3206ba35d183c34a
treefe29e913190040dbb6a7071d38603698263dc657
parentf55532a0c0b8bb6148f4e07853b876ef73bc69ca
staging: lustre: lnet: Replace sg++ with sg = sg_next(sg)

With scatterlist chaining, simply incrementing the array does not
work. sg_next macro was thus introduced to follow the chain links
when necessary. So replace sg++ with sg_next.

This change was made with the help of the following Coccinelle
semantic patch:
//<smpl>
@@
struct scatterlist *sg;
@@
-sg++
+sg = sg_next(sg)
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c