Skip to contentSkip to conversation

iio: adc: Move mxs-lradc out of staging

DISCUSSION Dan Carpenter 2 participants 2 messages Feb 16, 2016 IIO

lore
Share & tools
lore
#0 lore raw

Hello Ksenija Stanojevic,

The patch f836c4592244: "iio: adc: Move mxs-lradc out of staging" from Feb 6, 2016, leads to the following static checker warning:

	drivers/iio/adc/mxs-lradc.c:1503 mxs_lradc_hw_init()
	warn: inconsistent indenting

drivers/iio/adc/mxs-lradc.c
1496 mxs_lradc_reg_wrt(lradc, 0, LRADC_DELAY(3));
1497
1498 /* Configure the touchscreen type */
1499 if (lradc->soc == IMX28_LRADC) {
1500 mxs_lradc_reg_clear(lradc, LRADC_CTRL0_MX28_TOUCH_SCREEN_TYPE,
1501 LRADC_CTRL0);
1502
1503 if (lradc->use_touchscreen == MXS_LRADC_TOUCHSCREEN_5WIRE)
1504 mxs_lradc_reg_set(lradc, LRADC_CTRL0_MX28_TOUCH_SCREEN_TYPE,
1505 LRADC_CTRL0);

Should these lines be indented more or are the curly braces misplaced?

  1506          }
  1507  
  1508          /* Start internal temperature sensing. */
  1509          mxs_lradc_reg_wrt(lradc, 0, LRADC_CTRL2);
  1510  
  1511          return 0;

regards,
dan carpenter

#1 lore raw

Hi Dan,

Quoted 20 lines · Dan Carpenter

Hello Ksenija Stanojevic,

The patch f836c4592244: "iio: adc: Move mxs-lradc out of staging" from Feb 6, 2016, leads to the following static checker warning:

drivers/iio/adc/mxs-lradc.c:1503 mxs_lradc_hw_init()
warn: inconsistent indenting

drivers/iio/adc/mxs-lradc.c
1496 mxs_lradc_reg_wrt(lradc, 0, LRADC_DELAY(3));
1497
1498 /* Configure the touchscreen type */
1499 if (lradc->soc == IMX28_LRADC) {
1500 mxs_lradc_reg_clear(lradc, LRADC_CTRL0_MX28_TOUCH_SCREEN_TYPE,
1501 LRADC_CTRL0);
1502
1503 if (lradc->use_touchscreen == MXS_LRADC_TOUCHSCREEN_5WIRE)
1504 mxs_lradc_reg_set(lradc, LRADC_CTRL0_MX28_TOUCH_SCREEN_TYPE,
1505 LRADC_CTRL0);

Quoted 1 line

Should these lines be indented more or are the curly braces misplaced?

Lines should be indented more, I will send a patch.

Quoted 8 lines
  1506          }
  1507
  1508          /* Start internal temperature sensing. */
  1509          mxs_lradc_reg_wrt(lradc, 0, LRADC_CTRL2);
  1510
  1511          return 0;

Thanks,
Ksenija