linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <yujie.liu@intel.com>
To: Deepak Kumar Singh <deesin@codeaurora.org>, <clew@codeaurora.org>
Cc: <llvm@lists.linux.dev>, <kbuild-all@lists.01.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	<linux-arm-msm@vger.kernel.org>,
	<linux-remoteproc@vger.kernel.org>,
	Deepak Kumar Singh <deesin@codeaurora.org>
Subject: Re: [PATCH V1 3/3] rpmsg: char: Add TIOCMGET/TIOCMSET ioctl support
Date: Fri, 12 Nov 2021 10:50:55 +0800	[thread overview]
Message-ID: <b037d266-6e1f-1dde-5f4c-e180ca1ba869@intel.com> (raw)
In-Reply-To: <202111081917.zPNurV3x-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 5138 bytes --]

Hi Deepak,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.15]
[cannot apply to next-20211108]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Deepak-Kumar-Singh/rpmsg-core-Add-signal-API-support/20211001-003225
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 02d5e016800d082058b3d3b7c3ede136cdc6ddcb
config: x86_64-randconfig-c007-20211001 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 962e503cc8bc411f7523cc393acae8aae425b1c4)
reproduce (this is a W=1 build):
         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
         chmod +x ~/bin/make.cross
         # https://github.com/0day-ci/linux/commit/706239528659b90d79d28e52fcd0538747e66a86
         git remote add linux-review https://github.com/0day-ci/linux
         git fetch --no-tags linux-review Deepak-Kumar-Singh/rpmsg-core-Add-signal-API-support/20211001-003225
         git checkout 706239528659b90d79d28e52fcd0538747e66a86
         # save the attached .config to linux build tree
         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


clang-analyzer warnings: (new ones prefixed by >>)

 >> drivers/rpmsg/rpmsg_char.c:310:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                    ret = put_user(eptdev->rsigs, (int __user *)arg);
                    ^
    drivers/rpmsg/rpmsg_char.c:317:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                    ret = rpmsg_set_flow_control(eptdev->ept, set);
                    ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/rpmsg/rpmsg_char.c:320:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                    ret = rpmsg_eptdev_destroy(&eptdev->dev, NULL);
                    ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/rpmsg/rpmsg_char.c:323:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                    ret = -EINVAL;
                    ^     ~~~~~~~


vim +/ret +310 drivers/rpmsg/rpmsg_char.c

c0cdc19f84a4712 Bjorn Andersson    2017-01-11  295
c0cdc19f84a4712 Bjorn Andersson    2017-01-11  296  static long rpmsg_eptdev_ioctl(struct file *fp, unsigned int cmd,
c0cdc19f84a4712 Bjorn Andersson    2017-01-11  297  			       unsigned long arg)
c0cdc19f84a4712 Bjorn Andersson    2017-01-11  298  {
c0cdc19f84a4712 Bjorn Andersson    2017-01-11  299  	struct rpmsg_eptdev *eptdev = fp->private_data;
706239528659b90 Deepak Kumar Singh 2021-09-30  300  	bool set;
706239528659b90 Deepak Kumar Singh 2021-09-30  301  	u32 val;
706239528659b90 Deepak Kumar Singh 2021-09-30  302  	int ret;
c0cdc19f84a4712 Bjorn Andersson    2017-01-11  303
c0cdc19f84a4712 Bjorn Andersson    2017-01-11  304  	if (cmd != RPMSG_DESTROY_EPT_IOCTL)
c0cdc19f84a4712 Bjorn Andersson    2017-01-11  305  		return -EINVAL;
c0cdc19f84a4712 Bjorn Andersson    2017-01-11  306
706239528659b90 Deepak Kumar Singh 2021-09-30  307  	switch (cmd) {
706239528659b90 Deepak Kumar Singh 2021-09-30  308  	case TIOCMGET:
706239528659b90 Deepak Kumar Singh 2021-09-30  309  		eptdev->sig_pending = false;
706239528659b90 Deepak Kumar Singh 2021-09-30 @310  		ret = put_user(eptdev->rsigs, (int __user *)arg);
706239528659b90 Deepak Kumar Singh 2021-09-30  311  		break;
706239528659b90 Deepak Kumar Singh 2021-09-30  312  	case TIOCMSET:
706239528659b90 Deepak Kumar Singh 2021-09-30  313  		ret = get_user(val, (int __user *)arg);
706239528659b90 Deepak Kumar Singh 2021-09-30  314  		if (ret)
706239528659b90 Deepak Kumar Singh 2021-09-30  315  			break;
706239528659b90 Deepak Kumar Singh 2021-09-30  316  		set = (val & TIOCM_DTR) ? true : false;
706239528659b90 Deepak Kumar Singh 2021-09-30 @317  		ret = rpmsg_set_flow_control(eptdev->ept, set);
706239528659b90 Deepak Kumar Singh 2021-09-30  318  		break;
706239528659b90 Deepak Kumar Singh 2021-09-30  319  	case RPMSG_DESTROY_EPT_IOCTL:
706239528659b90 Deepak Kumar Singh 2021-09-30 @320  		ret = rpmsg_eptdev_destroy(&eptdev->dev, NULL);
706239528659b90 Deepak Kumar Singh 2021-09-30  321  		break;
706239528659b90 Deepak Kumar Singh 2021-09-30  322  	default:
706239528659b90 Deepak Kumar Singh 2021-09-30 @323  		ret = -EINVAL;
706239528659b90 Deepak Kumar Singh 2021-09-30  324  	}
706239528659b90 Deepak Kumar Singh 2021-09-30  325
c0cdc19f84a4712 Bjorn Andersson    2017-01-11  326  	return rpmsg_eptdev_destroy(&eptdev->dev, NULL);
c0cdc19f84a4712 Bjorn Andersson    2017-01-11  327  }
c0cdc19f84a4712 Bjorn Andersson    2017-01-11  328

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37761 bytes --]

       reply	other threads:[~2021-11-12  2:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <202111081917.zPNurV3x-lkp@intel.com>
2021-11-12  2:50 ` kernel test robot [this message]
2021-09-30 15:32 [PATCH V1 0/3] rpmsg and glink signaling api support Deepak Kumar Singh
2021-09-30 15:32 ` [PATCH V1 3/3] rpmsg: char: Add TIOCMGET/TIOCMSET ioctl support Deepak Kumar Singh
2021-09-30 16:36   ` Stephen Boyd
2021-10-11 18:22   ` Mathieu Poirier

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=b037d266-6e1f-1dde-5f4c-e180ca1ba869@intel.com \
    --to=yujie.liu@intel.com \
    --cc=clew@codeaurora.org \
    --cc=deesin@codeaurora.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    /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).