All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: sibis@codeaurora.org
Cc: linux-arm-msm@vger.kernel.org
Subject: [bug report] soc: qcom: Introduce Protection Domain Restart helpers
Date: Wed, 18 Mar 2020 12:47:50 +0300	[thread overview]
Message-ID: <20200318094750.GA4617@mwanda> (raw)

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

             reply	other threads:[~2020-03-18  9:48 UTC|newest]

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

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=20200318094750.GA4617@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=sibis@codeaurora.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.