s390/dasd: Change unsigned long long to unsigned long
authorJan Höppner <hoeppner@linux.vnet.ibm.com>
Tue, 15 Aug 2017 14:40:18 +0000 (16:40 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 23 Aug 2017 11:31:51 +0000 (13:31 +0200)
Unsigned long long and unsigned long were different in size for 31-bit.
For 64-bit the size for both datatypes is 8 Bytes and since the support
for 31-bit is long gone we can clean up a little and change everything
to unsigned long.
Change get_phys_clock() along the way to accept unsigned long as well so
that the DASD code can be consistent.

Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/timex.h
arch/s390/kernel/time.c
drivers/s390/block/dasd.c
drivers/s390/block/dasd_3990_erp.c
drivers/s390/block/dasd_diag.c
drivers/s390/block/dasd_eckd.c
drivers/s390/block/dasd_eckd.h
drivers/s390/block/dasd_erp.c
drivers/s390/block/dasd_int.h
drivers/s390/block/dasd_proc.c

index 0ea03c11458d9d2194935ac24ada217aec8a087a..93f2eb3f277c6550d54982403a8a04419ea8543f 100644 (file)
@@ -176,7 +176,7 @@ static inline cycles_t get_cycles(void)
        return (cycles_t) get_tod_clock() >> 2;
 }
 
-int get_phys_clock(unsigned long long *clock);
+int get_phys_clock(unsigned long *clock);
 void init_cpu_timer(void);
 unsigned long long monotonic_clock(void);
 
index 15abecba068ec9c6f782b9ad45ff7a6249a93e9f..5cbd52169348faf9c09bc258c2cd0072e0089ee0 100644 (file)
@@ -357,7 +357,7 @@ static unsigned long clock_sync_flags;
  * source. If the clock mode is local it will return -EOPNOTSUPP and
  * -EAGAIN if the clock is not in sync with the external reference.
  */
-int get_phys_clock(unsigned long long *clock)
+int get_phys_clock(unsigned long *clock)
 {
        atomic_t *sw_ptr;
        unsigned int sw0, sw1;
index a97b2b819f5100fd968a1c02821eec618b167484..83f80710d555093465a129923049570a6177253a 100644 (file)
@@ -1665,7 +1665,7 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
 {
        struct dasd_ccw_req *cqr, *next;
        struct dasd_device *device;
-       unsigned long long now;
+       unsigned long now;
        int nrf_suppressed = 0;
        int fp_suppressed = 0;
        u8 *sense = NULL;
index 107cd3361e2949ebddee3a8dd7e792b6060b028b..e448a0fc0c092e86d5ffbd850cbeda6aeefe8fe0 100644 (file)
@@ -2231,7 +2231,7 @@ static void dasd_3990_erp_account_error(struct dasd_ccw_req *erp)
        struct dasd_device *device = erp->startdev;
        __u8 lpum = erp->refers->irb.esw.esw1.lpum;
        int pos = pathmask_to_pos(lpum);
-       unsigned long long clk;
+       unsigned long clk;
 
        if (!device->path_thrhld)
                return;
index 5667146c6a0ae3c3c513a3180921ff5986cb79ea..98fb28e49d2c0605c5ea3e2062d4ad790788d504 100644 (file)
@@ -235,7 +235,7 @@ static void dasd_ext_handler(struct ext_code ext_code,
 {
        struct dasd_ccw_req *cqr, *next;
        struct dasd_device *device;
-       unsigned long long expires;
+       unsigned long expires;
        unsigned long flags;
        addr_t ip;
        int rc;
index c3e5ad641b0b3fc073098bca96a1c1071b3f556e..8eafcd5fa0049ed9d3384aa6a8999fcec4b61ba2 100644 (file)
@@ -3254,11 +3254,7 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_cmd_track(
        /* 1x prefix + one read/write ccw per track */
        cplength = 1 + trkcount;
 
-       /* on 31-bit we need space for two 32 bit addresses per page
-        * on 64-bit one 64 bit address
-        */
-       datasize = sizeof(struct PFX_eckd_data) +
-               cidaw * sizeof(unsigned long long);
+       datasize = sizeof(struct PFX_eckd_data) + cidaw * sizeof(unsigned long);
 
        /* Allocate the ccw request. */
        cqr = dasd_smalloc_request(DASD_ECKD_MAGIC, cplength, datasize,
@@ -3856,7 +3852,7 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_raw(struct dasd_device *startdev,
        }
        size = ALIGN(size, 8);
 
-       datasize = size + cidaw * sizeof(unsigned long long);
+       datasize = size + cidaw * sizeof(unsigned long);
 
        /* Allocate the ccw request. */
        cqr = dasd_smalloc_request(DASD_ECKD_MAGIC, cplength,
index fb1f537d986a2ff92a18668899ccdc7fe152a3ee..34e153a6b19ca99a823da1405548d8ee49b33964 100644 (file)
@@ -165,7 +165,7 @@ struct DE_eckd_data {
        __u8 ga_extended;       /* Global Attributes Extended   */
        struct ch_t beg_ext;
        struct ch_t end_ext;
-       unsigned long long ep_sys_time; /* Ext Parameter - System Time Stamp */
+       unsigned long ep_sys_time; /* Ext Parameter - System Time Stamp */
        __u8 ep_format;        /* Extended Parameter format byte       */
        __u8 ep_prio;          /* Extended Parameter priority I/O byte */
        __u8 ep_reserved1;     /* Extended Parameter Reserved          */
index 9e3419124264ab05ffe3cbe93a06489179c1f7d6..6389feb2fb7aaba7b6b8a6a60cb7dfa47187aa21 100644 (file)
@@ -124,7 +124,7 @@ dasd_default_erp_action(struct dasd_ccw_req *cqr)
 struct dasd_ccw_req *dasd_default_erp_postaction(struct dasd_ccw_req *cqr)
 {
        int success;
-       unsigned long long startclk, stopclk;
+       unsigned long startclk, stopclk;
        struct dasd_device *startdev;
 
        BUG_ON(cqr->refers == NULL || cqr->function == NULL);
index 43f383b2f87d0c7e227f26e68de94898371f63f7..66248795b973d8158eb4c1d700e8b6adfd811a26 100644 (file)
@@ -196,10 +196,10 @@ struct dasd_ccw_req {
        void *function;                 /* originating ERP action */
 
        /* these are for statistics only */
-       unsigned long long buildclk;    /* TOD-clock of request generation */
-       unsigned long long startclk;    /* TOD-clock of request start */
-       unsigned long long stopclk;     /* TOD-clock of request interrupt */
-       unsigned long long endclk;      /* TOD-clock of request termination */
+       unsigned long buildclk;         /* TOD-clock of request generation */
+       unsigned long startclk;         /* TOD-clock of request start */
+       unsigned long stopclk;          /* TOD-clock of request interrupt */
+       unsigned long endclk;           /* TOD-clock of request termination */
 
         /* Callback that is called after reaching final status. */
        void (*callback)(struct dasd_ccw_req *, void *data);
@@ -423,7 +423,7 @@ struct dasd_path {
        u8 chpid;
        struct dasd_conf_data *conf_data;
        atomic_t error_count;
-       unsigned long long errorclk;
+       unsigned long errorclk;
 };
 
 
@@ -539,7 +539,7 @@ struct dasd_block {
        struct block_device *bdev;
        atomic_t open_count;
 
-       unsigned long long blocks; /* size of volume in blocks */
+       unsigned long blocks;      /* size of volume in blocks */
        unsigned int bp_block;     /* bytes per block */
        unsigned int s2b_shift;    /* log2 (bp_block/512) */
 
index 70dc2c4cd3f75408e786e0490876e03510a6f505..7104d676577391b66c15024546ea31c07d531d86 100644 (file)
@@ -90,7 +90,7 @@ dasd_devices_show(struct seq_file *m, void *v)
                        seq_printf(m, "n/f       ");
                else
                        seq_printf(m,
-                                  "at blocksize: %d, %lld blocks, %lld MB",
+                                  "at blocksize: %u, %lu blocks, %lu MB",
                                   block->bp_block, block->blocks,
                                   ((block->bp_block >> 9) *
                                    block->blocks) >> 11);