[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] adjust module parameter types


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-linux-2.6.18-xen <patchbot@xxxxxxx>
  • Date: Fri, 21 Dec 2012 09:11:03 +0000
  • Delivery-date: Fri, 21 Dec 2012 09:11:15 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1356080471 -3600
# Node ID c340a22a3a6339aadffc9a7d4d9eef10d52b7b94
# Parent  302f7c9423c9ab30f0cad07f334db90c05796f7d
adjust module parameter types

In particular use "unsigned" and "bool" where the parameter has
respective meaning, and make the respective variables static where
possible and not already done.

Also drop the use of the bogus USBIF_BACK_MAX_PENDING_REQS definition
and do some minimal cleanup.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---


diff -r 302f7c9423c9 -r c340a22a3a63 drivers/xen/blkback/blkback.c
--- a/drivers/xen/blkback/blkback.c     Tue Dec 18 10:42:20 2012 +0100
+++ b/drivers/xen/blkback/blkback.c     Fri Dec 21 10:01:11 2012 +0100
@@ -55,15 +55,15 @@
  * This will increase the chances of being able to write whole tracks.
  * 64 should be enough to keep us competitive with Linux.
  */
-static int blkif_reqs = 64;
-module_param_named(reqs, blkif_reqs, int, 0);
+static unsigned int blkif_reqs = 64;
+module_param_named(reqs, blkif_reqs, uint, 0);
 MODULE_PARM_DESC(reqs, "Number of blkback requests to allocate");
 
 /* Run-time switchable: /sys/module/blkback/parameters/ */
-static unsigned int log_stats = 0;
-static unsigned int debug_lvl = 0;
-module_param(log_stats, int, 0644);
-module_param(debug_lvl, int, 0644);
+static int log_stats;
+static unsigned int debug_lvl;
+module_param(log_stats, bool, 0644);
+module_param(debug_lvl, uint, 0644);
 
 /*
  * Each outstanding request that we've passed to the lower device layers has a 
diff -r 302f7c9423c9 -r c340a22a3a63 drivers/xen/blktap/blktap.c
--- a/drivers/xen/blktap/blktap.c       Tue Dec 18 10:42:20 2012 +0100
+++ b/drivers/xen/blktap/blktap.c       Fri Dec 21 10:01:11 2012 +0100
@@ -127,10 +127,10 @@ static struct tap_blkif *tapfds[MAX_TAP_
 static int blktap_next_minor;
 
 /* Run-time switchable: /sys/module/blktap/parameters/ */
-static unsigned int log_stats = 0;
-static unsigned int debug_lvl = 0;
-module_param(log_stats, int, 0644);
-module_param(debug_lvl, int, 0644);
+static int log_stats;
+static unsigned int debug_lvl;
+module_param(log_stats, bool, 0644);
+module_param(debug_lvl, uint, 0644);
 
 /*
  * Each outstanding request that we've passed to the lower device layers has a 
diff -r 302f7c9423c9 -r c340a22a3a63 drivers/xen/fbfront/xenfb.c
--- a/drivers/xen/fbfront/xenfb.c       Tue Dec 18 10:42:20 2012 +0100
+++ b/drivers/xen/fbfront/xenfb.c       Fri Dec 21 10:01:11 2012 +0100
@@ -138,8 +138,8 @@ struct xenfb_info
 #define XENFB_DEFAULT_FB_LEN (XENFB_WIDTH * XENFB_HEIGHT * XENFB_DEPTH / 8)
 
 enum {KPARAM_MEM, KPARAM_WIDTH, KPARAM_HEIGHT, KPARAM_CNT};
-static int video[KPARAM_CNT] = {2, XENFB_WIDTH, XENFB_HEIGHT};
-module_param_array(video, int, NULL, 0);
+static unsigned int video[KPARAM_CNT] = {2, XENFB_WIDTH, XENFB_HEIGHT};
+module_param_array(video, uint, NULL, 0);
 MODULE_PARM_DESC(video,
                "Size of video memory in MB and width,height in pixels, default 
= (2,800,600)");
 
diff -r 302f7c9423c9 -r c340a22a3a63 drivers/xen/pciback/pciback_ops.c
--- a/drivers/xen/pciback/pciback_ops.c Tue Dec 18 10:42:20 2012 +0100
+++ b/drivers/xen/pciback/pciback_ops.c Fri Dec 21 10:01:11 2012 +0100
@@ -10,7 +10,7 @@
 #include "pciback.h"
 
 int verbose_request = 0;
-module_param(verbose_request, int, 0644);
+module_param(verbose_request, bool, 0644);
 
 /* Ensure a device is "turned off" and ready to be exported.
  * (Also see pciback_config_reset to ensure virtual configuration space is
diff -r 302f7c9423c9 -r c340a22a3a63 drivers/xen/pcifront/pci_op.c
--- a/drivers/xen/pcifront/pci_op.c     Tue Dec 18 10:42:20 2012 +0100
+++ b/drivers/xen/pcifront/pci_op.c     Fri Dec 21 10:01:11 2012 +0100
@@ -12,8 +12,8 @@
 #include <xen/evtchn.h>
 #include "pcifront.h"
 
-static int verbose_request = 0;
-module_param(verbose_request, int, 0644);
+static int verbose_request;
+module_param(verbose_request, bool, 0644);
 
 static void pcifront_init_sd(struct pcifront_sd *sd,
                             unsigned int domain, unsigned int bus,
diff -r 302f7c9423c9 -r c340a22a3a63 drivers/xen/scsiback/scsiback.c
--- a/drivers/xen/scsiback/scsiback.c   Tue Dec 18 10:42:20 2012 +0100
+++ b/drivers/xen/scsiback/scsiback.c   Fri Dec 21 10:01:11 2012 +0100
@@ -56,8 +56,8 @@ static unsigned int vscsiif_reqs = 128;
 module_param_named(reqs, vscsiif_reqs, uint, 0);
 MODULE_PARM_DESC(reqs, "Number of scsiback requests to allocate");
 
-static unsigned int log_print_stat = 0;
-module_param(log_print_stat, int, 0644);
+static int log_print_stat;
+module_param(log_print_stat, bool, 0644);
 
 #define SCSIBACK_INVALID_HANDLE (~0)
 
@@ -219,10 +219,8 @@ static void scsiback_cmd_done(struct req
        resid        = req->data_len;
        errors       = req->errors;
 
-       if (errors != 0) {
-               if (log_print_stat)
-                       scsiback_print_status(sense_buffer, errors, 
pending_req);
-       }
+       if (errors && log_print_stat)
+               scsiback_print_status(sense_buffer, errors, pending_req);
 
        /* The Host mode is through as for Emulation. */
        if (pending_req->info->feature != VSCSI_TYPE_HOST)
diff -r 302f7c9423c9 -r c340a22a3a63 drivers/xen/usbback/usbback.c
--- a/drivers/xen/usbback/usbback.c     Tue Dec 18 10:42:20 2012 +0100
+++ b/drivers/xen/usbback/usbback.c     Fri Dec 21 10:01:11 2012 +0100
@@ -53,8 +53,8 @@
 #include "../../usb/core/hub.h"
 #endif
 
-int usbif_reqs = USBIF_BACK_MAX_PENDING_REQS;
-module_param_named(reqs, usbif_reqs, int, 0);
+static unsigned int usbif_reqs = 128;
+module_param_named(reqs, usbif_reqs, uint, 0);
 MODULE_PARM_DESC(reqs, "Number of usbback requests to allocate");
 
 struct pending_req_segment {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.