All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Drokin <green@linuxhacker.ru>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org,
	Andreas Dilger <andreas.dilger@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lustre Development List <lustre-devel@lists.lustre.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Oleg Drokin <green@linuxhacker.ru>
Subject: [PATCH 05/13] lustre: constify lib-move.c stuff
Date: Sat, 20 Aug 2016 17:34:22 -0400	[thread overview]
Message-ID: <1471728870-518753-6-git-send-email-green@linuxhacker.ru> (raw)
In-Reply-To: <1471728870-518753-1-git-send-email-green@linuxhacker.ru>

From: Al Viro <viro@zeniv.linux.org.uk>

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 .../staging/lustre/include/linux/lnet/lib-lnet.h   | 28 +++++++++++-----------
 drivers/staging/lustre/lnet/lnet/lib-move.c        | 20 ++++++++--------
 2 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index 513a822..1c5418e 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -605,34 +605,34 @@ void lnet_counters_reset(void);
 
 unsigned int lnet_iov_nob(unsigned int niov, struct kvec *iov);
 int lnet_extract_iov(int dst_niov, struct kvec *dst,
-		     int src_niov, struct kvec *src,
+		     int src_niov, const struct kvec *src,
 		      unsigned int offset, unsigned int len);
 
 unsigned int lnet_kiov_nob(unsigned int niov, lnet_kiov_t *iov);
 int lnet_extract_kiov(int dst_niov, lnet_kiov_t *dst,
-		      int src_niov, lnet_kiov_t *src,
+		      int src_niov, const lnet_kiov_t *src,
 		      unsigned int offset, unsigned int len);
 
-void lnet_copy_iov2iov(unsigned int ndiov, struct kvec *diov,
+void lnet_copy_iov2iov(unsigned int ndiov, const struct kvec *diov,
 		       unsigned int doffset,
-			unsigned int nsiov, struct kvec *siov,
+			unsigned int nsiov, const struct kvec *siov,
 			unsigned int soffset, unsigned int nob);
-void lnet_copy_kiov2iov(unsigned int niov, struct kvec *iov,
+void lnet_copy_kiov2iov(unsigned int niov, const struct kvec *iov,
 			unsigned int iovoffset,
-			 unsigned int nkiov, lnet_kiov_t *kiov,
+			 unsigned int nkiov, const lnet_kiov_t *kiov,
 			 unsigned int kiovoffset, unsigned int nob);
-void lnet_copy_iov2kiov(unsigned int nkiov, lnet_kiov_t *kiov,
+void lnet_copy_iov2kiov(unsigned int nkiov, const lnet_kiov_t *kiov,
 			unsigned int kiovoffset,
-			 unsigned int niov, struct kvec *iov,
+			 unsigned int niov, const struct kvec *iov,
 			 unsigned int iovoffset, unsigned int nob);
-void lnet_copy_kiov2kiov(unsigned int ndkiov, lnet_kiov_t *dkiov,
+void lnet_copy_kiov2kiov(unsigned int ndkiov, const lnet_kiov_t *dkiov,
 			 unsigned int doffset,
-			  unsigned int nskiov, lnet_kiov_t *skiov,
+			  unsigned int nskiov, const lnet_kiov_t *skiov,
 			  unsigned int soffset, unsigned int nob);
 
 static inline void
 lnet_copy_iov2flat(int dlen, void *dest, unsigned int doffset,
-		   unsigned int nsiov, struct kvec *siov, unsigned int soffset,
+		   unsigned int nsiov, const struct kvec *siov, unsigned int soffset,
 		   unsigned int nob)
 {
 	struct kvec diov = {/*.iov_base = */ dest, /*.iov_len = */ dlen};
@@ -643,7 +643,7 @@ lnet_copy_iov2flat(int dlen, void *dest, unsigned int doffset,
 
 static inline void
 lnet_copy_kiov2flat(int dlen, void *dest, unsigned int doffset,
-		    unsigned int nsiov, lnet_kiov_t *skiov,
+		    unsigned int nsiov, const lnet_kiov_t *skiov,
 		    unsigned int soffset, unsigned int nob)
 {
 	struct kvec diov = {/* .iov_base = */ dest, /* .iov_len = */ dlen};
@@ -653,7 +653,7 @@ lnet_copy_kiov2flat(int dlen, void *dest, unsigned int doffset,
 }
 
 static inline void
-lnet_copy_flat2iov(unsigned int ndiov, struct kvec *diov, unsigned int doffset,
+lnet_copy_flat2iov(unsigned int ndiov, const struct kvec *diov, unsigned int doffset,
 		   int slen, void *src, unsigned int soffset, unsigned int nob)
 {
 	struct kvec siov = {/*.iov_base = */ src, /*.iov_len = */slen};
@@ -663,7 +663,7 @@ lnet_copy_flat2iov(unsigned int ndiov, struct kvec *diov, unsigned int doffset,
 }
 
 static inline void
-lnet_copy_flat2kiov(unsigned int ndiov, lnet_kiov_t *dkiov,
+lnet_copy_flat2kiov(unsigned int ndiov, const lnet_kiov_t *dkiov,
 		    unsigned int doffset, int slen, void *src,
 		    unsigned int soffset, unsigned int nob)
 {
diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c b/drivers/staging/lustre/lnet/lnet/lib-move.c
index 6a3f2e1..7d8d2d6 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-move.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-move.c
@@ -166,8 +166,8 @@ lnet_iov_nob(unsigned int niov, struct kvec *iov)
 EXPORT_SYMBOL(lnet_iov_nob);
 
 void
-lnet_copy_iov2iov(unsigned int ndiov, struct kvec *diov, unsigned int doffset,
-		  unsigned int nsiov, struct kvec *siov, unsigned int soffset,
+lnet_copy_iov2iov(unsigned int ndiov, const struct kvec *diov, unsigned int doffset,
+		  unsigned int nsiov, const struct kvec *siov, unsigned int soffset,
 		  unsigned int nob)
 {
 	/* NB diov, siov are READ-ONLY */
@@ -226,7 +226,7 @@ EXPORT_SYMBOL(lnet_copy_iov2iov);
 
 int
 lnet_extract_iov(int dst_niov, struct kvec *dst,
-		 int src_niov, struct kvec *src,
+		 int src_niov, const struct kvec *src,
 		 unsigned int offset, unsigned int len)
 {
 	/*
@@ -287,8 +287,8 @@ lnet_kiov_nob(unsigned int niov, lnet_kiov_t *kiov)
 EXPORT_SYMBOL(lnet_kiov_nob);
 
 void
-lnet_copy_kiov2kiov(unsigned int ndiov, lnet_kiov_t *diov, unsigned int doffset,
-		    unsigned int nsiov, lnet_kiov_t *siov, unsigned int soffset,
+lnet_copy_kiov2kiov(unsigned int ndiov, const lnet_kiov_t *diov, unsigned int doffset,
+		    unsigned int nsiov, const lnet_kiov_t *siov, unsigned int soffset,
 		    unsigned int nob)
 {
 	/* NB diov, siov are READ-ONLY */
@@ -370,8 +370,8 @@ lnet_copy_kiov2kiov(unsigned int ndiov, lnet_kiov_t *diov, unsigned int doffset,
 EXPORT_SYMBOL(lnet_copy_kiov2kiov);
 
 void
-lnet_copy_kiov2iov(unsigned int niov, struct kvec *iov, unsigned int iovoffset,
-		   unsigned int nkiov, lnet_kiov_t *kiov,
+lnet_copy_kiov2iov(unsigned int niov, const struct kvec *iov, unsigned int iovoffset,
+		   unsigned int nkiov, const lnet_kiov_t *kiov,
 		   unsigned int kiovoffset, unsigned int nob)
 {
 	/* NB iov, kiov are READ-ONLY */
@@ -440,9 +440,9 @@ lnet_copy_kiov2iov(unsigned int niov, struct kvec *iov, unsigned int iovoffset,
 EXPORT_SYMBOL(lnet_copy_kiov2iov);
 
 void
-lnet_copy_iov2kiov(unsigned int nkiov, lnet_kiov_t *kiov,
+lnet_copy_iov2kiov(unsigned int nkiov, const lnet_kiov_t *kiov,
 		   unsigned int kiovoffset, unsigned int niov,
-		   struct kvec *iov, unsigned int iovoffset,
+		   const struct kvec *iov, unsigned int iovoffset,
 		   unsigned int nob)
 {
 	/* NB kiov, iov are READ-ONLY */
@@ -511,7 +511,7 @@ EXPORT_SYMBOL(lnet_copy_iov2kiov);
 
 int
 lnet_extract_kiov(int dst_niov, lnet_kiov_t *dst,
-		  int src_niov, lnet_kiov_t *src,
+		  int src_niov, const lnet_kiov_t *src,
 		  unsigned int offset, unsigned int len)
 {
 	/*
-- 
2.7.4

WARNING: multiple messages have this Message-ID (diff)
From: Oleg Drokin <green@linuxhacker.ru>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org,
	Andreas Dilger <andreas.dilger@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lustre Development List <lustre-devel@lists.lustre.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Oleg Drokin <green@linuxhacker.ru>
Subject: [lustre-devel] [PATCH 05/13] lustre: constify lib-move.c stuff
Date: Sat, 20 Aug 2016 17:34:22 -0400	[thread overview]
Message-ID: <1471728870-518753-6-git-send-email-green@linuxhacker.ru> (raw)
In-Reply-To: <1471728870-518753-1-git-send-email-green@linuxhacker.ru>

From: Al Viro <viro@zeniv.linux.org.uk>

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 .../staging/lustre/include/linux/lnet/lib-lnet.h   | 28 +++++++++++-----------
 drivers/staging/lustre/lnet/lnet/lib-move.c        | 20 ++++++++--------
 2 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index 513a822..1c5418e 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -605,34 +605,34 @@ void lnet_counters_reset(void);
 
 unsigned int lnet_iov_nob(unsigned int niov, struct kvec *iov);
 int lnet_extract_iov(int dst_niov, struct kvec *dst,
-		     int src_niov, struct kvec *src,
+		     int src_niov, const struct kvec *src,
 		      unsigned int offset, unsigned int len);
 
 unsigned int lnet_kiov_nob(unsigned int niov, lnet_kiov_t *iov);
 int lnet_extract_kiov(int dst_niov, lnet_kiov_t *dst,
-		      int src_niov, lnet_kiov_t *src,
+		      int src_niov, const lnet_kiov_t *src,
 		      unsigned int offset, unsigned int len);
 
-void lnet_copy_iov2iov(unsigned int ndiov, struct kvec *diov,
+void lnet_copy_iov2iov(unsigned int ndiov, const struct kvec *diov,
 		       unsigned int doffset,
-			unsigned int nsiov, struct kvec *siov,
+			unsigned int nsiov, const struct kvec *siov,
 			unsigned int soffset, unsigned int nob);
-void lnet_copy_kiov2iov(unsigned int niov, struct kvec *iov,
+void lnet_copy_kiov2iov(unsigned int niov, const struct kvec *iov,
 			unsigned int iovoffset,
-			 unsigned int nkiov, lnet_kiov_t *kiov,
+			 unsigned int nkiov, const lnet_kiov_t *kiov,
 			 unsigned int kiovoffset, unsigned int nob);
-void lnet_copy_iov2kiov(unsigned int nkiov, lnet_kiov_t *kiov,
+void lnet_copy_iov2kiov(unsigned int nkiov, const lnet_kiov_t *kiov,
 			unsigned int kiovoffset,
-			 unsigned int niov, struct kvec *iov,
+			 unsigned int niov, const struct kvec *iov,
 			 unsigned int iovoffset, unsigned int nob);
-void lnet_copy_kiov2kiov(unsigned int ndkiov, lnet_kiov_t *dkiov,
+void lnet_copy_kiov2kiov(unsigned int ndkiov, const lnet_kiov_t *dkiov,
 			 unsigned int doffset,
-			  unsigned int nskiov, lnet_kiov_t *skiov,
+			  unsigned int nskiov, const lnet_kiov_t *skiov,
 			  unsigned int soffset, unsigned int nob);
 
 static inline void
 lnet_copy_iov2flat(int dlen, void *dest, unsigned int doffset,
-		   unsigned int nsiov, struct kvec *siov, unsigned int soffset,
+		   unsigned int nsiov, const struct kvec *siov, unsigned int soffset,
 		   unsigned int nob)
 {
 	struct kvec diov = {/*.iov_base = */ dest, /*.iov_len = */ dlen};
@@ -643,7 +643,7 @@ lnet_copy_iov2flat(int dlen, void *dest, unsigned int doffset,
 
 static inline void
 lnet_copy_kiov2flat(int dlen, void *dest, unsigned int doffset,
-		    unsigned int nsiov, lnet_kiov_t *skiov,
+		    unsigned int nsiov, const lnet_kiov_t *skiov,
 		    unsigned int soffset, unsigned int nob)
 {
 	struct kvec diov = {/* .iov_base = */ dest, /* .iov_len = */ dlen};
@@ -653,7 +653,7 @@ lnet_copy_kiov2flat(int dlen, void *dest, unsigned int doffset,
 }
 
 static inline void
-lnet_copy_flat2iov(unsigned int ndiov, struct kvec *diov, unsigned int doffset,
+lnet_copy_flat2iov(unsigned int ndiov, const struct kvec *diov, unsigned int doffset,
 		   int slen, void *src, unsigned int soffset, unsigned int nob)
 {
 	struct kvec siov = {/*.iov_base = */ src, /*.iov_len = */slen};
@@ -663,7 +663,7 @@ lnet_copy_flat2iov(unsigned int ndiov, struct kvec *diov, unsigned int doffset,
 }
 
 static inline void
-lnet_copy_flat2kiov(unsigned int ndiov, lnet_kiov_t *dkiov,
+lnet_copy_flat2kiov(unsigned int ndiov, const lnet_kiov_t *dkiov,
 		    unsigned int doffset, int slen, void *src,
 		    unsigned int soffset, unsigned int nob)
 {
diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c b/drivers/staging/lustre/lnet/lnet/lib-move.c
index 6a3f2e1..7d8d2d6 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-move.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-move.c
@@ -166,8 +166,8 @@ lnet_iov_nob(unsigned int niov, struct kvec *iov)
 EXPORT_SYMBOL(lnet_iov_nob);
 
 void
-lnet_copy_iov2iov(unsigned int ndiov, struct kvec *diov, unsigned int doffset,
-		  unsigned int nsiov, struct kvec *siov, unsigned int soffset,
+lnet_copy_iov2iov(unsigned int ndiov, const struct kvec *diov, unsigned int doffset,
+		  unsigned int nsiov, const struct kvec *siov, unsigned int soffset,
 		  unsigned int nob)
 {
 	/* NB diov, siov are READ-ONLY */
@@ -226,7 +226,7 @@ EXPORT_SYMBOL(lnet_copy_iov2iov);
 
 int
 lnet_extract_iov(int dst_niov, struct kvec *dst,
-		 int src_niov, struct kvec *src,
+		 int src_niov, const struct kvec *src,
 		 unsigned int offset, unsigned int len)
 {
 	/*
@@ -287,8 +287,8 @@ lnet_kiov_nob(unsigned int niov, lnet_kiov_t *kiov)
 EXPORT_SYMBOL(lnet_kiov_nob);
 
 void
-lnet_copy_kiov2kiov(unsigned int ndiov, lnet_kiov_t *diov, unsigned int doffset,
-		    unsigned int nsiov, lnet_kiov_t *siov, unsigned int soffset,
+lnet_copy_kiov2kiov(unsigned int ndiov, const lnet_kiov_t *diov, unsigned int doffset,
+		    unsigned int nsiov, const lnet_kiov_t *siov, unsigned int soffset,
 		    unsigned int nob)
 {
 	/* NB diov, siov are READ-ONLY */
@@ -370,8 +370,8 @@ lnet_copy_kiov2kiov(unsigned int ndiov, lnet_kiov_t *diov, unsigned int doffset,
 EXPORT_SYMBOL(lnet_copy_kiov2kiov);
 
 void
-lnet_copy_kiov2iov(unsigned int niov, struct kvec *iov, unsigned int iovoffset,
-		   unsigned int nkiov, lnet_kiov_t *kiov,
+lnet_copy_kiov2iov(unsigned int niov, const struct kvec *iov, unsigned int iovoffset,
+		   unsigned int nkiov, const lnet_kiov_t *kiov,
 		   unsigned int kiovoffset, unsigned int nob)
 {
 	/* NB iov, kiov are READ-ONLY */
@@ -440,9 +440,9 @@ lnet_copy_kiov2iov(unsigned int niov, struct kvec *iov, unsigned int iovoffset,
 EXPORT_SYMBOL(lnet_copy_kiov2iov);
 
 void
-lnet_copy_iov2kiov(unsigned int nkiov, lnet_kiov_t *kiov,
+lnet_copy_iov2kiov(unsigned int nkiov, const lnet_kiov_t *kiov,
 		   unsigned int kiovoffset, unsigned int niov,
-		   struct kvec *iov, unsigned int iovoffset,
+		   const struct kvec *iov, unsigned int iovoffset,
 		   unsigned int nob)
 {
 	/* NB kiov, iov are READ-ONLY */
@@ -511,7 +511,7 @@ EXPORT_SYMBOL(lnet_copy_iov2kiov);
 
 int
 lnet_extract_kiov(int dst_niov, lnet_kiov_t *dst,
-		  int src_niov, lnet_kiov_t *src,
+		  int src_niov, const lnet_kiov_t *src,
 		  unsigned int offset, unsigned int len)
 {
 	/*
-- 
2.7.4

  parent reply	other threads:[~2016-08-20 21:35 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-20 21:34 [PATCH 00/13] Lustre patches Oleg Drokin
2016-08-20 21:34 ` [lustre-devel] " Oleg Drokin
2016-08-20 21:34 ` [PATCH 01/13] ksocknal_lib_recv_iov(): recvmsg doesn't bugger iovec anymore Oleg Drokin
2016-08-20 21:34   ` [lustre-devel] " Oleg Drokin
2016-08-20 21:34 ` [PATCH 02/13] ksocknal_lib_send_iov(): sendmsg doesn't bugger iovec Oleg Drokin
2016-08-20 21:34   ` [lustre-devel] " Oleg Drokin
2016-08-20 21:34 ` [PATCH 03/13] ksocknal_lib_send_kiov(): " Oleg Drokin
2016-08-20 21:34   ` [lustre-devel] " Oleg Drokin
2016-08-20 21:34 ` [PATCH 04/13] lustre: ->kss_scratch... are unused now Oleg Drokin
2016-08-20 21:34   ` [lustre-devel] " Oleg Drokin
2016-08-20 21:34 ` Oleg Drokin [this message]
2016-08-20 21:34   ` [lustre-devel] [PATCH 05/13] lustre: constify lib-move.c stuff Oleg Drokin
2016-08-20 21:34 ` [PATCH 06/13] lustre: pass iov_iter to ->lnd_recv() Oleg Drokin
2016-08-20 21:34   ` [lustre-devel] " Oleg Drokin
2016-08-20 21:34 ` [PATCH 07/13] lustre: introduce lnet_copy_{k,}iov2iter(), kill lnet_copy_{k,}iov2{k,}iov() Oleg Drokin
2016-08-20 21:34   ` [lustre-devel] [PATCH 07/13] lustre: introduce lnet_copy_{k, }iov2iter(), kill lnet_copy_{k, }iov2{k, }iov() Oleg Drokin
2016-08-20 21:34 ` [PATCH 08/13] staging/lustre: Always return EEXIST on mkdir for existing names Oleg Drokin
2016-08-20 21:34   ` [lustre-devel] " Oleg Drokin
2016-08-20 21:34 ` [PATCH 09/13] staging/lustre: Add spaces preferred around that '{+,-,*,/,|,<<,>>,&}' Oleg Drokin
2016-08-20 21:34   ` [lustre-devel] [PATCH 09/13] staging/lustre: Add spaces preferred around that '{+, -, *, /, |, <<, >>, &}' Oleg Drokin
2016-08-21 14:11   ` Greg Kroah-Hartman
2016-08-21 14:11     ` [lustre-devel] " Greg Kroah-Hartman
2016-08-20 21:34 ` [PATCH 10/13] staging/lustre: Fix unnecessary parentheses around variables Oleg Drokin
2016-08-20 21:34   ` [lustre-devel] " Oleg Drokin
2016-08-20 21:34 ` [PATCH 11/13] staging/lustre: Make alignment match open parenthesis Oleg Drokin
2016-08-20 21:34   ` [lustre-devel] " Oleg Drokin
2016-08-21 14:35   ` Greg Kroah-Hartman
2016-08-21 14:35     ` [lustre-devel] " Greg Kroah-Hartman
2016-08-20 21:34 ` [PATCH 12/13] staging/lustre: Remove unused cp_error from struct cl_page Oleg Drokin
2016-08-20 21:34   ` [lustre-devel] " Oleg Drokin
2016-08-21 14:36   ` Greg Kroah-Hartman
2016-08-21 14:36     ` [lustre-devel] " Greg Kroah-Hartman
2016-08-20 21:34 ` [PATCH 13/13] Add James Simmons as another Lustre maintainer Oleg Drokin
2016-08-20 21:34   ` [lustre-devel] " Oleg Drokin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471728870-518753-6-git-send-email-green@linuxhacker.ru \
    --to=green@linuxhacker.ru \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.