All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] thermal: qcom: tsens-8974: Add support for 8974 family of SoCs
@ 2016-07-05 16:46 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-07-05 16:46 UTC (permalink / raw)
  To: rnayak; +Cc: linux-pm

Hello Rajendra Nayak,

The patch ffd6a56b9a88: "thermal: qcom: tsens-8974: Add support for
8974 family of SoCs" from May 5, 2016, leads to the following static
checker warning:

	drivers/thermal/qcom/tsens-8974.c:152 calibrate_8974()
	warn: mask and shift to zero

drivers/thermal/qcom/tsens-8974.c
  141                  case ONE_PT_CALIB:
   142                  case ONE_PT_CALIB2:
   143                          base1 = bkp[0] & BASE1_MASK;
   144                          p1[0] = (bkp[0] & S0_P1_MASK) >> S0_P1_SHIFT;
   145                          p1[1] = (bkp[0] & S1_P1_MASK) >> S1_P1_SHIFT;
   146                          p1[2] = (bkp[0] & S2_P1_MASK) >> S2_P1_SHIFT;
   147                          p1[3] = (bkp[0] & S3_P1_MASK) >> S3_P1_SHIFT;
   148                          p1[4] = (bkp[1] & S4_P1_MASK);
   149                          p1[5] = (bkp[1] & S5_P1_MASK) >> S5_P1_SHIFT;
   150                          p1[6] = (bkp[1] & S6_P1_MASK) >> S6_P1_SHIFT;
   151                          p1[7] = (bkp[1] & S7_P1_MASK) >> S7_P1_SHIFT;
   152                          p1[8] = (bkp[2] & S8_P1_MASK_BKP) >> S8_P1_SHIFT;

0x3f >> 24 is zero.  This looks like a cut-and-paste bug but it's not
clear to me what was intended.

   153                          p1[9] = (bkp[2] & S9_P1_MASK_BKP) >> S9_P1_BKP_SHIFT;
   154                          p1[10] = (bkp[2] & S10_P1_MASK_BKP) >> S10_P1_BKP_SHIFT;
   155                          break;
   156                  }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-05 16:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-05 16:46 [bug report] thermal: qcom: tsens-8974: Add support for 8974 family of SoCs Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.