All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sibi Sankar <sibis@codeaurora.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-arm-msm@vger.kernel.org, linux-arm-msm-owner@vger.kernel.org
Subject: Re: [bug report] soc: qcom: Introduce Protection Domain Restart helpers
Date: Thu, 19 Mar 2020 19:29:48 +0530	[thread overview]
Message-ID: <5b8a818b3743870c4653cc692f89da08@codeaurora.org> (raw)
In-Reply-To: <20200318094750.GA4617@mwanda>

Hey Dan,
Thanks for the bug report!
Will get the warning fixed

On 2020-03-18 15:17, Dan Carpenter wrote:
> Hello Sibi Sankar,
> 
> The patch fbe639b44a82: "soc: qcom: Introduce Protection Domain
> Restart helpers" from Mar 12, 2020, leads to the following static
> checker warning:
> 
> 	drivers/soc/qcom/pdr_interface.c:158 pdr_register_listener()
> 	warn: impossible condition '(resp.curr_state < (-((~0 >> 1)) - 1)) =>
> (s32min-s32max < s32min)'
> 
> drivers/soc/qcom/pdr_interface.c
>    145          ret = qmi_txn_wait(&txn, 5 * HZ);
>    146          if (ret < 0) {
>    147                  pr_err("PDR: %s register listener txn wait
> failed: %d\n",
>    148                         pds->service_path, ret);
>    149                  return ret;
>    150          }
>    151
>    152          if (resp.resp.result != QMI_RESULT_SUCCESS_V01) {
>    153                  pr_err("PDR: %s register listener failed: 
> 0x%x\n",
>    154                         pds->service_path, resp.resp.error);
>    155                  return ret;
>    156          }
>    157
>    158          if ((int)resp.curr_state < INT_MIN ||
> (int)resp.curr_state > INT_MAX)
>                     ^^^^                              ^^^^
> These are casted to int so they can't be outside of int range.
> 
>    159                  pr_err("PDR: %s notification state invalid: 
> 0x%x\n",
>    160                         pds->service_path, resp.curr_state);
>    161
>    162          pds->state = resp.curr_state;
>    163
>    164          return 0;
>    165  }
> 
> regards,
> dan carpenter

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project.

      reply	other threads:[~2020-03-19 13:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-18  9:47 [bug report] soc: qcom: Introduce Protection Domain Restart helpers Dan Carpenter
2020-03-19 13:59 ` Sibi Sankar [this message]

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=5b8a818b3743870c4653cc692f89da08@codeaurora.org \
    --to=sibis@codeaurora.org \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-arm-msm-owner@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    /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 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.