devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kiran Padwal <kiran.padwal@smartplayin.com>
To: "Ivan T. Ivanov" <iivanov@mm-sol.com>
Cc: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Grant Likely <grant.likely@linaro.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Eduardo Valentin <edubezval@gmail.com>,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	David Collins <collinsd@codeaurora.org>
Subject: Re: [PATCH v2] thermal: Add QPNP PMIC temperature alarm driver
Date: Tue, 30 Sep 2014 14:16:53 +0530	[thread overview]
Message-ID: <542A6DFD.7020107@smartplayin.com> (raw)
In-Reply-To: <1412062606.5395.10.camel@iivanov-dev>

On Tuesday 30 September 2014 01:06 PM, Ivan T. Ivanov wrote:
> On Tue, 2014-09-30 at 10:00 +0530, Kiran Padwal wrote:
>> On Monday 29 September 2014 07:24 PM, Ivan T. Ivanov wrote:
>>> On Fri, 2014-09-26 at 16:51 +0530, Kiran Padwal wrote:
>>>> On Thursday 25 September 2014 07:00 PM, Ivan T. Ivanov wrote:
>>>>> Add support for the temperature alarm peripheral found inside
>>>>> Qualcomm plug-and-play (QPNP) PMIC chips.  The temperature alarm
>>>>> peripheral outputs a pulse on an interrupt line whenever the
>>>>> thermal over temperature stage value changes.  Implement an ISR
>>>>> to manage this interrupt.
>>>>>
>>>>
>>>> <snip>
>>>>
>>>>> + * This function updates the internal temp value based on the
>>>>> + * current thermal stage and threshold as well as the previous stage
>>>>> + */
>>>>> +static int qpnp_tm_update_temp_no_adc(struct qpnp_tm_chip *chip)
>>>>> +{
>>>>> +	unsigned int stage;
>>>>> +	int rc;
>>>>> +	u8 reg;
>>>>> +
>>>>> +	rc = qpnp_tm_read(chip, QPNP_TM_REG_STATUS, &reg);
>>>>> +	if (rc < 0)
>>>>> +		return rc;
>>>>> +
>>>>> +	stage = reg & STATUS_STAGE_MASK;
>>>>
>>>> During compilation, getting a waring as below,
>>>>
>>>> drivers/thermal/qpnp-temp-alarm.c: In function ‘qpnp_tm_update_temp_no_adc’:
>>>> drivers/thermal/qpnp-temp-alarm.c:135:8: warning: ‘reg’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>>>>   stage = reg & STATUS_STAGE_MASK;
>>>
>>> Could you share compiler version and options which you are using.
>>> I am unable to trigger this warning. Looking code I can not 
>>> see how this could happen.
>>
>> I have Linaro cross tool chain with version-4.8.3 and I am simply doing "make zImage" without any option.
> 
> Hm, no warnings with arm-unknown-linux-gnueabi-gcc (GCC) 4.6.3 and
> arm-linux-gnueabihf-gcc (crosstool-NG linaro-1.13.1-4.9-2014.09, but
> indeed arm-linux-gnueabihf-gcc (crosstool-NG linaro-1.13.1-4.8-2014.03.
> 
> I will say that this is false positive :-). Please update your tool-chain.
> 

Thanks to verify, I will do that.

Thanks,
--Kiran



  reply	other threads:[~2014-09-30  8:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25 13:30 [PATCH v2] thermal: Add QPNP PMIC temperature alarm driver Ivan T. Ivanov
2014-09-26 11:21 ` Kiran Padwal
     [not found]   ` <54254C4E.3070807-edOiRQu9Xnj5XLMNweQjbQ@public.gmane.org>
2014-09-29 13:54     ` Ivan T. Ivanov
2014-09-30  4:30       ` Kiran Padwal
2014-09-30  7:36         ` Ivan T. Ivanov
2014-09-30  8:46           ` Kiran Padwal [this message]
2014-09-30 19:46           ` Stephen Boyd
     [not found]             ` <542B088A.1050601-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-10-01 11:36               ` Ivan T. Ivanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=542A6DFD.7020107@smartplayin.com \
    --to=kiran.padwal@smartplayin.com \
    --cc=collinsd@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=edubezval@gmail.com \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=iivanov@mm-sol.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).