From 6716de099817112470bdcf5b689868ad167721cc Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Wed, 21 Jan 2004 06:19:54 -0800 Subject: [PATCH] [ATM]: [horizon] avoid warning about limited range of data type --- drivers/atm/horizon.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c index 00a164af68303..754d769065be3 100644 --- a/drivers/atm/horizon.c +++ b/drivers/atm/horizon.c @@ -359,8 +359,8 @@ static struct timer_list housekeeping; static unsigned short debug = 0; static unsigned short vpi_bits = 0; -static unsigned short max_tx_size = 9000; -static unsigned short max_rx_size = 9000; +static int max_tx_size = 9000; +static int max_rx_size = 9000; static unsigned char pci_lat = 0; /********** access functions **********/ @@ -2898,11 +2898,11 @@ static void __init hrz_check_args (void) { PRINTK (KERN_ERR, "vpi_bits has been limited to %hu", vpi_bits = HRZ_MAX_VPI); - if (max_tx_size > TX_AAL5_LIMIT) + if (max_tx_size < 0 || max_tx_size > TX_AAL5_LIMIT) PRINTK (KERN_NOTICE, "max_tx_size has been limited to %hu", max_tx_size = TX_AAL5_LIMIT); - if (max_rx_size > RX_AAL5_LIMIT) + if (max_rx_size < 0 || max_rx_size > RX_AAL5_LIMIT) PRINTK (KERN_NOTICE, "max_rx_size has been limited to %hu", max_rx_size = RX_AAL5_LIMIT); @@ -2914,8 +2914,8 @@ MODULE_DESCRIPTION(description_string); MODULE_LICENSE("GPL"); MODULE_PARM(debug, "h"); MODULE_PARM(vpi_bits, "h"); -MODULE_PARM(max_tx_size, "h"); -MODULE_PARM(max_rx_size, "h"); +MODULE_PARM(max_tx_size, "i"); +MODULE_PARM(max_rx_size, "i"); MODULE_PARM(pci_lat, "b"); MODULE_PARM_DESC(debug, "debug bitmap, see .h file"); MODULE_PARM_DESC(vpi_bits, "number of bits (0..4) to allocate to VPIs"); -- 2.53.0