]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/st.c
[SCSI] Mark some core scsi data structures const
[linux-2.6-omap-h63xx.git] / drivers / scsi / st.c
index 770c4324f3d5750e51eae824fd59a985209b9732..6d9078705c5be1221eb5b74e76a3d75cde3b9c6e 100644 (file)
@@ -17,7 +17,7 @@
    Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs support
  */
 
-static char *verstr = "20050830";
+static const char *verstr = "20050830";
 
 #include <linux/module.h>
 
@@ -134,7 +134,7 @@ static struct st_dev_parm {
 #endif
 /* Bit reversed order to get same names for same minors with all
    mode counts */
-static char *st_formats[] = {
+static const char *st_formats[] = {
        "",  "r", "k", "s", "l", "t", "o", "u",
        "m", "v", "p", "x", "a", "y", "q", "z"}; 
 
@@ -4509,6 +4509,7 @@ static int sgl_map_user_pages(struct scatterlist *sgl, const unsigned int max_pa
        if (res > 0) {
                for (j=0; j < res; j++)
                        page_cache_release(pages[j]);
+               res = 0;
        }
        kfree(pages);
        return res;
@@ -4524,8 +4525,6 @@ static int sgl_unmap_user_pages(struct scatterlist *sgl, const unsigned int nr_p
        for (i=0; i < nr_pages; i++) {
                struct page *page = sgl[i].page;
 
-               /* XXX: just for debug. Remove when PageReserved is removed */
-               BUG_ON(PageReserved(page));
                if (dirtied)
                        SetPageDirty(page);
                /* FIXME: cache flush missing for rw==READ