Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/dvo: switch to kernel unsigned int types

We have fairly mixed uintN_t vs. uN usage throughout the driver, but try
to stick to kernel types at least where it's more prevalent.

v2: fix checkpatch warning on indentation

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180612095621.21101-1-jani.nikula@intel.com

+70 -70
+10 -10
drivers/gpu/drm/i915/dvo_ch7017.c
··· 159 159 #define CH7017_BANG_LIMIT_CONTROL 0x7f 160 160 161 161 struct ch7017_priv { 162 - uint8_t dummy; 162 + u8 dummy; 163 163 }; 164 164 165 165 static void ch7017_dump_regs(struct intel_dvo_device *dvo); ··· 186 186 187 187 static bool ch7017_write(struct intel_dvo_device *dvo, u8 addr, u8 val) 188 188 { 189 - uint8_t buf[2] = { addr, val }; 189 + u8 buf[2] = { addr, val }; 190 190 struct i2c_msg msg = { 191 191 .addr = dvo->slave_addr, 192 192 .flags = 0, ··· 258 258 const struct drm_display_mode *mode, 259 259 const struct drm_display_mode *adjusted_mode) 260 260 { 261 - uint8_t lvds_pll_feedback_div, lvds_pll_vco_control; 262 - uint8_t outputs_enable, lvds_control_2, lvds_power_down; 263 - uint8_t horizontal_active_pixel_input; 264 - uint8_t horizontal_active_pixel_output, vertical_active_line_output; 265 - uint8_t active_input_line_output; 261 + u8 lvds_pll_feedback_div, lvds_pll_vco_control; 262 + u8 outputs_enable, lvds_control_2, lvds_power_down; 263 + u8 horizontal_active_pixel_input; 264 + u8 horizontal_active_pixel_output, vertical_active_line_output; 265 + u8 active_input_line_output; 266 266 267 267 DRM_DEBUG_KMS("Registers before mode setting\n"); 268 268 ch7017_dump_regs(dvo); ··· 333 333 /* set the CH7017 power state */ 334 334 static void ch7017_dpms(struct intel_dvo_device *dvo, bool enable) 335 335 { 336 - uint8_t val; 336 + u8 val; 337 337 338 338 ch7017_read(dvo, CH7017_LVDS_POWER_DOWN, &val); 339 339 ··· 361 361 362 362 static bool ch7017_get_hw_state(struct intel_dvo_device *dvo) 363 363 { 364 - uint8_t val; 364 + u8 val; 365 365 366 366 ch7017_read(dvo, CH7017_LVDS_POWER_DOWN, &val); 367 367 ··· 373 373 374 374 static void ch7017_dump_regs(struct intel_dvo_device *dvo) 375 375 { 376 - uint8_t val; 376 + u8 val; 377 377 378 378 #define DUMP(reg) \ 379 379 do { \
+11 -11
drivers/gpu/drm/i915/dvo_ch7xxx.c
··· 85 85 */ 86 86 87 87 static struct ch7xxx_id_struct { 88 - uint8_t vid; 88 + u8 vid; 89 89 char *name; 90 90 } ch7xxx_ids[] = { 91 91 { CH7011_VID, "CH7011" }, ··· 96 96 }; 97 97 98 98 static struct ch7xxx_did_struct { 99 - uint8_t did; 99 + u8 did; 100 100 char *name; 101 101 } ch7xxx_dids[] = { 102 102 { CH7xxx_DID, "CH7XXX" }, ··· 107 107 bool quiet; 108 108 }; 109 109 110 - static char *ch7xxx_get_id(uint8_t vid) 110 + static char *ch7xxx_get_id(u8 vid) 111 111 { 112 112 int i; 113 113 ··· 119 119 return NULL; 120 120 } 121 121 122 - static char *ch7xxx_get_did(uint8_t did) 122 + static char *ch7xxx_get_did(u8 did) 123 123 { 124 124 int i; 125 125 ··· 132 132 } 133 133 134 134 /** Reads an 8 bit register */ 135 - static bool ch7xxx_readb(struct intel_dvo_device *dvo, int addr, uint8_t *ch) 135 + static bool ch7xxx_readb(struct intel_dvo_device *dvo, int addr, u8 *ch) 136 136 { 137 137 struct ch7xxx_priv *ch7xxx = dvo->dev_priv; 138 138 struct i2c_adapter *adapter = dvo->i2c_bus; ··· 170 170 } 171 171 172 172 /** Writes an 8 bit register */ 173 - static bool ch7xxx_writeb(struct intel_dvo_device *dvo, int addr, uint8_t ch) 173 + static bool ch7xxx_writeb(struct intel_dvo_device *dvo, int addr, u8 ch) 174 174 { 175 175 struct ch7xxx_priv *ch7xxx = dvo->dev_priv; 176 176 struct i2c_adapter *adapter = dvo->i2c_bus; 177 - uint8_t out_buf[2]; 177 + u8 out_buf[2]; 178 178 struct i2c_msg msg = { 179 179 .addr = dvo->slave_addr, 180 180 .flags = 0, ··· 201 201 { 202 202 /* this will detect the CH7xxx chip on the specified i2c bus */ 203 203 struct ch7xxx_priv *ch7xxx; 204 - uint8_t vendor, device; 204 + u8 vendor, device; 205 205 char *name, *devid; 206 206 207 207 ch7xxx = kzalloc(sizeof(struct ch7xxx_priv), GFP_KERNEL); ··· 244 244 245 245 static enum drm_connector_status ch7xxx_detect(struct intel_dvo_device *dvo) 246 246 { 247 - uint8_t cdet, orig_pm, pm; 247 + u8 cdet, orig_pm, pm; 248 248 249 249 ch7xxx_readb(dvo, CH7xxx_PM, &orig_pm); 250 250 ··· 276 276 const struct drm_display_mode *mode, 277 277 const struct drm_display_mode *adjusted_mode) 278 278 { 279 - uint8_t tvco, tpcp, tpd, tlpf, idf; 279 + u8 tvco, tpcp, tpd, tlpf, idf; 280 280 281 281 if (mode->clock <= 65000) { 282 282 tvco = 0x23; ··· 336 336 int i; 337 337 338 338 for (i = 0; i < CH7xxx_NUM_REGS; i++) { 339 - uint8_t val; 339 + u8 val; 340 340 if ((i % 8) == 0) 341 341 DRM_DEBUG_KMS("\n %02X: ", i); 342 342 ch7xxx_readb(dvo, i, &val);
+13 -13
drivers/gpu/drm/i915/dvo_ivch.c
··· 161 161 * instead. The following list contains all registers that 162 162 * require saving. 163 163 */ 164 - static const uint16_t backup_addresses[] = { 164 + static const u16 backup_addresses[] = { 165 165 0x11, 0x12, 166 166 0x18, 0x19, 0x1a, 0x1f, 167 167 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, ··· 174 174 struct ivch_priv { 175 175 bool quiet; 176 176 177 - uint16_t width, height; 177 + u16 width, height; 178 178 179 179 /* Register backup */ 180 180 181 - uint16_t reg_backup[ARRAY_SIZE(backup_addresses)]; 181 + u16 reg_backup[ARRAY_SIZE(backup_addresses)]; 182 182 }; 183 183 184 184 ··· 188 188 * 189 189 * Each of the 256 registers are 16 bits long. 190 190 */ 191 - static bool ivch_read(struct intel_dvo_device *dvo, int addr, uint16_t *data) 191 + static bool ivch_read(struct intel_dvo_device *dvo, int addr, u16 *data) 192 192 { 193 193 struct ivch_priv *priv = dvo->dev_priv; 194 194 struct i2c_adapter *adapter = dvo->i2c_bus; ··· 231 231 } 232 232 233 233 /* Writes a 16-bit register on the ivch */ 234 - static bool ivch_write(struct intel_dvo_device *dvo, int addr, uint16_t data) 234 + static bool ivch_write(struct intel_dvo_device *dvo, int addr, u16 data) 235 235 { 236 236 struct ivch_priv *priv = dvo->dev_priv; 237 237 struct i2c_adapter *adapter = dvo->i2c_bus; ··· 263 263 struct i2c_adapter *adapter) 264 264 { 265 265 struct ivch_priv *priv; 266 - uint16_t temp; 266 + u16 temp; 267 267 int i; 268 268 269 269 priv = kzalloc(sizeof(struct ivch_priv), GFP_KERNEL); ··· 342 342 static void ivch_dpms(struct intel_dvo_device *dvo, bool enable) 343 343 { 344 344 int i; 345 - uint16_t vr01, vr30, backlight; 345 + u16 vr01, vr30, backlight; 346 346 347 347 ivch_reset(dvo); 348 348 ··· 379 379 380 380 static bool ivch_get_hw_state(struct intel_dvo_device *dvo) 381 381 { 382 - uint16_t vr01; 382 + u16 vr01; 383 383 384 384 ivch_reset(dvo); 385 385 ··· 398 398 const struct drm_display_mode *adjusted_mode) 399 399 { 400 400 struct ivch_priv *priv = dvo->dev_priv; 401 - uint16_t vr40 = 0; 402 - uint16_t vr01 = 0; 403 - uint16_t vr10; 401 + u16 vr40 = 0; 402 + u16 vr01 = 0; 403 + u16 vr10; 404 404 405 405 ivch_reset(dvo); 406 406 ··· 416 416 417 417 if (mode->hdisplay != adjusted_mode->crtc_hdisplay || 418 418 mode->vdisplay != adjusted_mode->crtc_vdisplay) { 419 - uint16_t x_ratio, y_ratio; 419 + u16 x_ratio, y_ratio; 420 420 421 421 vr01 |= VR01_PANEL_FIT_ENABLE; 422 422 vr40 |= VR40_CLOCK_GATING_ENABLE; ··· 438 438 439 439 static void ivch_dump_regs(struct intel_dvo_device *dvo) 440 440 { 441 - uint16_t val; 441 + u16 val; 442 442 443 443 ivch_read(dvo, VR00, &val); 444 444 DRM_DEBUG_KMS("VR00: 0x%04x\n", val);
+22 -22
drivers/gpu/drm/i915/dvo_ns2501.c
··· 191 191 }; 192 192 193 193 struct ns2501_reg { 194 - uint8_t offset; 195 - uint8_t value; 194 + u8 offset; 195 + u8 value; 196 196 }; 197 197 198 198 /* ··· 202 202 * read all this with a grain of salt. 203 203 */ 204 204 struct ns2501_configuration { 205 - uint8_t sync; /* configuration of the C0 register */ 206 - uint8_t conf; /* configuration register 8 */ 207 - uint8_t syncb; /* configuration register 41 */ 208 - uint8_t dither; /* configuration of the dithering */ 209 - uint8_t pll_a; /* PLL configuration, register A, 1B */ 210 - uint16_t pll_b; /* PLL configuration, register B, 1C/1D */ 211 - uint16_t hstart; /* horizontal start, registers C1/C2 */ 212 - uint16_t hstop; /* horizontal total, registers C3/C4 */ 213 - uint16_t vstart; /* vertical start, registers C5/C6 */ 214 - uint16_t vstop; /* vertical total, registers C7/C8 */ 215 - uint16_t vsync; /* manual vertical sync start, 80/81 */ 216 - uint16_t vtotal; /* number of lines generated, 82/83 */ 217 - uint16_t hpos; /* horizontal position + 256, 98/99 */ 218 - uint16_t vpos; /* vertical position, 8e/8f */ 219 - uint16_t voffs; /* vertical output offset, 9c/9d */ 220 - uint16_t hscale; /* horizontal scaling factor, b8/b9 */ 221 - uint16_t vscale; /* vertical scaling factor, 10/11 */ 205 + u8 sync; /* configuration of the C0 register */ 206 + u8 conf; /* configuration register 8 */ 207 + u8 syncb; /* configuration register 41 */ 208 + u8 dither; /* configuration of the dithering */ 209 + u8 pll_a; /* PLL configuration, register A, 1B */ 210 + u16 pll_b; /* PLL configuration, register B, 1C/1D */ 211 + u16 hstart; /* horizontal start, registers C1/C2 */ 212 + u16 hstop; /* horizontal total, registers C3/C4 */ 213 + u16 vstart; /* vertical start, registers C5/C6 */ 214 + u16 vstop; /* vertical total, registers C7/C8 */ 215 + u16 vsync; /* manual vertical sync start, 80/81 */ 216 + u16 vtotal; /* number of lines generated, 82/83 */ 217 + u16 hpos; /* horizontal position + 256, 98/99 */ 218 + u16 vpos; /* vertical position, 8e/8f */ 219 + u16 voffs; /* vertical output offset, 9c/9d */ 220 + u16 hscale; /* horizontal scaling factor, b8/b9 */ 221 + u16 vscale; /* vertical scaling factor, 10/11 */ 222 222 }; 223 223 224 224 /* ··· 389 389 ** If it returns false, it might be wise to enable the 390 390 ** DVO with the above function. 391 391 */ 392 - static bool ns2501_readb(struct intel_dvo_device *dvo, int addr, uint8_t * ch) 392 + static bool ns2501_readb(struct intel_dvo_device *dvo, int addr, u8 *ch) 393 393 { 394 394 struct ns2501_priv *ns = dvo->dev_priv; 395 395 struct i2c_adapter *adapter = dvo->i2c_bus; ··· 434 434 ** If it returns false, it might be wise to enable the 435 435 ** DVO with the above function. 436 436 */ 437 - static bool ns2501_writeb(struct intel_dvo_device *dvo, int addr, uint8_t ch) 437 + static bool ns2501_writeb(struct intel_dvo_device *dvo, int addr, u8 ch) 438 438 { 439 439 struct ns2501_priv *ns = dvo->dev_priv; 440 440 struct i2c_adapter *adapter = dvo->i2c_bus; 441 - uint8_t out_buf[2]; 441 + u8 out_buf[2]; 442 442 443 443 struct i2c_msg msg = { 444 444 .addr = dvo->slave_addr,
+5 -5
drivers/gpu/drm/i915/dvo_sil164.c
··· 65 65 66 66 #define SILPTR(d) ((SIL164Ptr)(d->DriverPrivate.ptr)) 67 67 68 - static bool sil164_readb(struct intel_dvo_device *dvo, int addr, uint8_t *ch) 68 + static bool sil164_readb(struct intel_dvo_device *dvo, int addr, u8 *ch) 69 69 { 70 70 struct sil164_priv *sil = dvo->dev_priv; 71 71 struct i2c_adapter *adapter = dvo->i2c_bus; ··· 102 102 return false; 103 103 } 104 104 105 - static bool sil164_writeb(struct intel_dvo_device *dvo, int addr, uint8_t ch) 105 + static bool sil164_writeb(struct intel_dvo_device *dvo, int addr, u8 ch) 106 106 { 107 107 struct sil164_priv *sil = dvo->dev_priv; 108 108 struct i2c_adapter *adapter = dvo->i2c_bus; 109 - uint8_t out_buf[2]; 109 + u8 out_buf[2]; 110 110 struct i2c_msg msg = { 111 111 .addr = dvo->slave_addr, 112 112 .flags = 0, ··· 173 173 174 174 static enum drm_connector_status sil164_detect(struct intel_dvo_device *dvo) 175 175 { 176 - uint8_t reg9; 176 + u8 reg9; 177 177 178 178 sil164_readb(dvo, SIL164_REG9, &reg9); 179 179 ··· 243 243 244 244 static void sil164_dump_regs(struct intel_dvo_device *dvo) 245 245 { 246 - uint8_t val; 246 + u8 val; 247 247 248 248 sil164_readb(dvo, SIL164_FREQ_LO, &val); 249 249 DRM_DEBUG_KMS("SIL164_FREQ_LO: 0x%02x\n", val);
+8 -8
drivers/gpu/drm/i915/dvo_tfp410.c
··· 90 90 bool quiet; 91 91 }; 92 92 93 - static bool tfp410_readb(struct intel_dvo_device *dvo, int addr, uint8_t *ch) 93 + static bool tfp410_readb(struct intel_dvo_device *dvo, int addr, u8 *ch) 94 94 { 95 95 struct tfp410_priv *tfp = dvo->dev_priv; 96 96 struct i2c_adapter *adapter = dvo->i2c_bus; ··· 127 127 return false; 128 128 } 129 129 130 - static bool tfp410_writeb(struct intel_dvo_device *dvo, int addr, uint8_t ch) 130 + static bool tfp410_writeb(struct intel_dvo_device *dvo, int addr, u8 ch) 131 131 { 132 132 struct tfp410_priv *tfp = dvo->dev_priv; 133 133 struct i2c_adapter *adapter = dvo->i2c_bus; 134 - uint8_t out_buf[2]; 134 + u8 out_buf[2]; 135 135 struct i2c_msg msg = { 136 136 .addr = dvo->slave_addr, 137 137 .flags = 0, ··· 155 155 156 156 static int tfp410_getid(struct intel_dvo_device *dvo, int addr) 157 157 { 158 - uint8_t ch1, ch2; 158 + u8 ch1, ch2; 159 159 160 160 if (tfp410_readb(dvo, addr+0, &ch1) && 161 161 tfp410_readb(dvo, addr+1, &ch2)) ··· 203 203 static enum drm_connector_status tfp410_detect(struct intel_dvo_device *dvo) 204 204 { 205 205 enum drm_connector_status ret = connector_status_disconnected; 206 - uint8_t ctl2; 206 + u8 ctl2; 207 207 208 208 if (tfp410_readb(dvo, TFP410_CTL_2, &ctl2)) { 209 209 if (ctl2 & TFP410_CTL_2_RSEN) ··· 236 236 /* set the tfp410 power state */ 237 237 static void tfp410_dpms(struct intel_dvo_device *dvo, bool enable) 238 238 { 239 - uint8_t ctl1; 239 + u8 ctl1; 240 240 241 241 if (!tfp410_readb(dvo, TFP410_CTL_1, &ctl1)) 242 242 return; ··· 251 251 252 252 static bool tfp410_get_hw_state(struct intel_dvo_device *dvo) 253 253 { 254 - uint8_t ctl1; 254 + u8 ctl1; 255 255 256 256 if (!tfp410_readb(dvo, TFP410_CTL_1, &ctl1)) 257 257 return false; ··· 264 264 265 265 static void tfp410_dump_regs(struct intel_dvo_device *dvo) 266 266 { 267 - uint8_t val, val2; 267 + u8 val, val2; 268 268 269 269 tfp410_readb(dvo, TFP410_REV, &val); 270 270 DRM_DEBUG_KMS("TFP410_REV: 0x%02X\n", val);
+1 -1
drivers/gpu/drm/i915/intel_dvo.c
··· 438 438 int gpio; 439 439 bool dvoinit; 440 440 enum pipe pipe; 441 - uint32_t dpll[I915_MAX_PIPES]; 441 + u32 dpll[I915_MAX_PIPES]; 442 442 enum port port; 443 443 444 444 /*