diff --git a/spm.c b/spm.c
index 89c0518f62a170591c4ec28d2b25073c6521cbed..ec492b5bcb4089f2bc535729975d2fce0cd55a13 100644
--- a/spm.c
+++ b/spm.c
@@ -1115,12 +1115,12 @@ spmExpand( const pastix_spm_t* spm )
  *
  *******************************************************************************/
 int
-spmMatVec(const pastix_trans_t trans,
-          const void          *alpha,
-          const pastix_spm_t  *spm,
-          const void          *x,
-          const void          *beta,
-                void          *y )
+spmMatVec(       pastix_trans_t trans,
+           const void          *alpha,
+           const pastix_spm_t  *spm,
+           const void          *x,
+           const void          *beta,
+                 void          *y )
 {
     pastix_spm_t *espm = (pastix_spm_t*)spm;
     int rc = PASTIX_SUCCESS;
diff --git a/spm.h b/spm.h
index f5d65259943a99371c5a14516f0b8e7bc8ddca3e..44c214d05671669e9a0e227e73113d6e0058a022 100644
--- a/spm.h
+++ b/spm.h
@@ -103,7 +103,7 @@ void          spm( pastix_spm_t      *spm,
  * @{
  */
 double        spmNorm( pastix_normtype_t ntype, const pastix_spm_t *spm );
-int           spmMatVec(const pastix_trans_t trans, const void *alpha, const pastix_spm_t *spm, const void *x, const void *beta, void *y );
+int           spmMatVec( pastix_trans_t trans, const void *alpha, const pastix_spm_t *spm, const void *x, const void *beta, void *y );
 void          spmScalMatrix( const pastix_complex64_t alpha, pastix_spm_t *spm );
 void          spmScalVector( const double alpha, pastix_spm_t *spm, void *x );
 
@@ -140,8 +140,8 @@ void          spmIntSort2Asc2( void * const pbase, const pastix_int_t n );
  * @name SPM IO subroutines
  * @{
  */
-int           spmLoad( pastix_spm_t *spm, FILE *infile );
-int           spmSave( pastix_spm_t *spm, FILE *outfile );
+int           spmLoad(       pastix_spm_t *spm, FILE *infile );
+int           spmSave( const pastix_spm_t *spm, FILE *outfile );
 
 /**
  * @}
@@ -161,7 +161,7 @@ void *        spm2Dense   ( const pastix_spm_t *spm );
 void          spmPrint    ( const pastix_spm_t *spm, FILE *f );
 void          spmPrintInfo( const pastix_spm_t *spm, FILE *f );
 pastix_spm_t *spmExpand   ( const pastix_spm_t *spm );
-pastix_spm_t *spmDofExtend( const pastix_spm_t *spm, const int type, const int dof  );
+pastix_spm_t *spmDofExtend( const pastix_spm_t *spm, const int type, const int dof );
 
 /**
  * @}
diff --git a/spm_io.c b/spm_io.c
index ecd1ecb10024d37cb14a60a892ba49fbc3bdf1d0..946cd6f108dd090f3a498dba4983af468dac8911 100644
--- a/spm_io.c
+++ b/spm_io.c
@@ -637,9 +637,9 @@ spmLoad( pastix_spm_t  *spm,
  *
  *******************************************************************************/
 static inline int
-writeArrayOfComplex64( FILE               *outfile,
-                       pastix_int_t        n,
-                       pastix_complex64_t *array )
+writeArrayOfComplex64( FILE                     *outfile,
+                       pastix_int_t              n,
+                       const pastix_complex64_t *array )
 {
     pastix_int_t i;
 
@@ -678,9 +678,9 @@ writeArrayOfComplex64( FILE               *outfile,
  *
  *******************************************************************************/
 static inline int
-writeArrayOfComplex32( FILE               *outfile,
-                       pastix_int_t        n,
-                       pastix_complex32_t *array )
+writeArrayOfComplex32( FILE                     *outfile,
+                       pastix_int_t              n,
+                       const pastix_complex32_t *array )
 {
     pastix_int_t i;
 
@@ -721,7 +721,7 @@ writeArrayOfComplex32( FILE               *outfile,
 static inline int
 writeArrayOfDouble( FILE         *outfile,
                     pastix_int_t  n,
-                    double       *array )
+                    const double *array )
 {
     pastix_int_t i;
 
@@ -763,7 +763,7 @@ writeArrayOfDouble( FILE         *outfile,
 static inline int
 writeArrayOfFloat( FILE         *outfile,
                    pastix_int_t  n,
-                   float        *array )
+                   const float  *array )
 {
     pastix_int_t i;
 
@@ -788,7 +788,7 @@ writeArrayOfFloat( FILE         *outfile,
  *
  *******************************************************************************
  *
- * @param[inout] spm
+ * @param[in] spm
  *          The sparse matrix to write into the file.
  *
  * @param[in] outfile
@@ -801,8 +801,8 @@ writeArrayOfFloat( FILE         *outfile,
  *
  *******************************************************************************/
 int
-spmSave( pastix_spm_t *spm,
-         FILE         *outfile )
+spmSave( const pastix_spm_t *spm,
+         FILE               *outfile )
 {
     pastix_int_t i, colsize, rowsize;
     int local_stream = 0;