]> git.neil.brown.name Git - history.git/commitdiff
sparse: don't use signed single-bit bitfields.
authorLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 23 Aug 2004 10:57:08 +0000 (03:57 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 23 Aug 2004 10:57:08 +0000 (03:57 -0700)
K&R used to make bitfields unsigned. That hasn't been
true for a long long time..

arch/ppc64/kernel/pmac_low_i2c.c
drivers/char/random.c
drivers/ide/ppc/pmac.c
drivers/usb/host/ehci.h
fs/cifs/cifsglob.h
fs/cifs/connect.c
include/linux/reiserfs_fs.h
include/linux/reiserfs_fs_i.h

index d07579f2b8b944a28d548498452c009a0acb4073..52da757190cb384fd58aa25997864f7c1d3809e5 100644 (file)
@@ -50,7 +50,7 @@ struct low_i2c_host
        struct device_node      *np;            /* OF device node */
        struct semaphore        mutex;          /* Access mutex for use by i2c-keywest */
        low_i2c_func_t          func;           /* Access function */
-       int                     is_open : 1;    /* Poor man's access control */
+       unsigned                is_open : 1;    /* Poor man's access control */
        int                     mode;           /* Current mode */
        int                     channel;        /* Current channel */
        int                     num_channels;   /* Number of channels */
index b83d7570f4d045cd73824720a540f179928884cf..a162ddd65f1525ff30b2696a5e0f7f8f48327753 100644 (file)
@@ -783,7 +783,7 @@ static void batch_entropy_process(void *private_)
 struct timer_rand_state {
        __u32           last_time;
        __s32           last_delta,last_delta2;
-       int             dont_count_entropy:1;
+       unsigned        dont_count_entropy:1;
 };
 
 static struct timer_rand_state keyboard_timer_state;
index 7030168e6056436aac382dd9e184d111e0198815..d4884c7f1dfa3a561839992873608236fd9736a7 100644 (file)
@@ -62,10 +62,10 @@ typedef struct pmac_ide_hwif {
        int                             irq;
        int                             kind;
        int                             aapl_bus_id;
-       int                             cable_80 : 1;
-       int                             mediabay : 1;
-       int                             broken_dma : 1;
-       int                             broken_dma_warn : 1;
+       unsigned                        cable_80 : 1;
+       unsigned                        mediabay : 1;
+       unsigned                        broken_dma : 1;
+       unsigned                        broken_dma_warn : 1;
        struct device_node*             node;
        struct macio_dev                *mdev;
        u32                             timings[4];
index ed4d00291f89f6fd44c834431ecfe062354a02a7..14e001d98f578a3faf94cdc08715dc4014470c9c 100644 (file)
@@ -52,7 +52,7 @@ struct ehci_hcd {                     /* one per controller */
        /* async schedule support */
        struct ehci_qh          *async;
        struct ehci_qh          *reclaim;
-       int                     reclaim_ready : 1;
+       unsigned                reclaim_ready : 1;
 
        /* periodic schedule support */
 #define        DEFAULT_I_TDPS          1024            /* some HCs can do less */
index 21ac75cf02d7a785f21c95c9e6003f0c2d95a372..150210c578a5452b0280c8bdf8eab5613563d83e 100644 (file)
@@ -126,7 +126,7 @@ struct TCP_Server_Info {
        enum protocolEnum protocolType; 
        char versionMajor;
        char versionMinor;
-       int svlocal:1;          /* local server or remote */
+       unsigned svlocal:1;     /* local server or remote */
        atomic_t socketUseCount; /* number of open cifs sessions on socket */
        atomic_t inFlight;  /* number of requests on the wire to server */
        enum statusEnum tcpStatus; /* what we think the status is */
@@ -222,7 +222,7 @@ struct cifsTconInfo {
        FILE_SYSTEM_DEVICE_INFO fsDevInfo;
        FILE_SYSTEM_ATTRIBUTE_INFO fsAttrInfo;  /* ok if file system name truncated */
        FILE_SYSTEM_UNIX_INFO fsUnixInfo;
-       int retry:1;
+       unsigned retry:1;
        /* BB add field for back pointer to sb struct? */
 };
 
@@ -250,10 +250,10 @@ struct cifsFileInfo {
        /* lock scope id (0 if none) */
        struct file * pfile; /* needed for writepage */
        struct inode * pInode; /* needed for oplock break */
-       int endOfSearch:1;      /* we have reached end of search */
-       int closePend:1;        /* file is marked to close */
-       int emptyDir:1;
-       int invalidHandle:1;  /* file closed via session abend */
+       unsigned endOfSearch:1; /* we have reached end of search */
+       unsigned closePend:1;   /* file is marked to close */
+       unsigned emptyDir:1;
+       unsigned invalidHandle:1;  /* file closed via session abend */
        struct semaphore fh_sem; /* prevents reopen race after dead ses*/
        char * search_resume_name;
        unsigned int resume_name_length;
@@ -272,9 +272,9 @@ struct cifsInodeInfo {
        __u32 cifsAttrs; /* e.g. DOS archive bit, sparse, compressed, system */
        atomic_t inUse;  /* num concurrent users (local openers cifs) of file*/
        unsigned long time;     /* jiffies of last update/check of inode */
-       int clientCanCacheRead:1; /* read oplock */
-       int clientCanCacheAll:1;  /* read and writebehind oplock */
-       int oplockPending:1;
+       unsigned clientCanCacheRead:1; /* read oplock */
+       unsigned clientCanCacheAll:1;  /* read and writebehind oplock */
+       unsigned oplockPending:1;
        struct inode vfs_inode;
 };
 
index bb6b0f3b2fb205621e217363bdc95e7e51360cfb..1659818b2ab0dac4c5930cc5b0490815658a8e99 100644 (file)
@@ -64,11 +64,11 @@ struct smb_vol {
        gid_t linux_gid;
        mode_t file_mode;
        mode_t dir_mode;
-       int rw:1;
-       int retry:1;
-       int intr:1;
-       int setuids:1;
-       int noperm:1;
+       unsigned rw:1;
+       unsigned retry:1;
+       unsigned intr:1;
+       unsigned setuids:1;
+       unsigned noperm:1;
        unsigned int rsize;
        unsigned int wsize;
        unsigned int sockopt;
index 711e9b360ecfc76005ba655dfdba7807ce9ba624..a538e5487c956ac93a04a6340cde04bd050b3918 100644 (file)
@@ -1734,7 +1734,7 @@ struct reiserfs_transaction_handle {
   int t_blocks_allocated ;      /* number of blocks this writer allocated */
   unsigned long t_trans_id ;    /* sanity check, equals the current trans id */
   void *t_handle_save ;                /* save existing current->journal_info */
-  int displace_new_blocks:1;   /* if new block allocation occurres, that block
+  unsigned displace_new_blocks:1; /* if new block allocation occurres, that block
                                   should be displaced from others */
 } ;
 
@@ -2154,9 +2154,9 @@ struct buffer_head * get_FEB (struct tree_balance *);
     int prealloc_size;                 /* is set in determine_prealloc_size() function, used by underlayed
                                         * function that do actual allocation */
 
-    int formatted_node:1;              /* the allocator uses different polices for getting disk space for
+    unsigned formatted_node:1;         /* the allocator uses different polices for getting disk space for
                                         * formatted/unformatted blocks with/without preallocation */
-    int preallocate:1;
+    unsigned preallocate:1;
 };
 
 typedef struct __reiserfs_blocknr_hint reiserfs_blocknr_hint_t;
index adc71cd0b6cbfb46d11757aa0dc2eb9de656bea7..e08142a75f030e4e197253957afa99fd303d8d56 100644 (file)
@@ -45,7 +45,7 @@ struct reiserfs_inode_info {
     struct list_head i_prealloc_list; /* per-transaction list of inodes which
                                        * have preallocated blocks */
 
-    int new_packing_locality:1;              /* new_packig_locality is created; new blocks
+    unsigned new_packing_locality:1;  /* new_packig_locality is created; new blocks
                                       * for the contents of this directory should be
                                       * displaced */