Linux-OMAP Archive on lore.kernel.org
 help / color / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Tony Lindgren <tony@atomide.com>
Cc: kbuild-all@lists.01.org, linux-omap@vger.kernel.org,
	Pavel Machek <pavel@ucw.cz>
Subject: [omap:serdev-ngsm-pending-v5.7 17/29] drivers/tty/n_gsm.c:2564:18: warning: variable 'gsm' set but not used
Date: Sat, 23 May 2020 04:46:53 +0800
Message-ID: <202005230450.rnZzrGP6%lkp@intel.com> (raw)


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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git serdev-ngsm-pending-v5.7
head:   4eda51fea6be98ca5a4023a988b102bf3629b295
commit: c19326e2c3e68ca54628039dd7b79b8ff0e44680 [17/29] tty: n_gsm: Add support for serdev drivers
config: nios2-randconfig-r032-20200522 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
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
        git checkout c19326e2c3e68ca54628039dd7b79b8ff0e44680
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2 

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

All warnings (new ones prefixed by >>, old ones prefixed by <<):

drivers/tty/n_gsm.c: In function 'gsm_serdev_register_dlci':
>> drivers/tty/n_gsm.c:2564:18: warning: variable 'gsm' set but not used [-Wunused-but-set-variable]
2564 |  struct gsm_mux *gsm;
|                  ^~~
drivers/tty/n_gsm.c: In function 'gsm_serdev_unregister_dlci':
drivers/tty/n_gsm.c:2621:18: warning: variable 'gsm' set but not used [-Wunused-but-set-variable]
2621 |  struct gsm_mux *gsm;
|                  ^~~

vim +/gsm +2564 drivers/tty/n_gsm.c

  2554	
  2555	/**
  2556	 * gsm_serdev_register_dlci - register a ts 27.010 channel
  2557	 * @gsd:	serdev-gsm instance
  2558	 * @ops:	channel ops
  2559	 */
  2560	int gsm_serdev_register_dlci(struct gsm_serdev *gsd,
  2561				     struct gsm_serdev_dlci *ops)
  2562	{
  2563		struct gsm_dlci *dlci;
> 2564		struct gsm_mux *gsm;
  2565		int retries;
  2566	
  2567		if (!gsd || !gsd->gsm || !gsd->serdev)
  2568			return -ENODEV;
  2569	
  2570		gsm = gsd->gsm;
  2571	
  2572		if (!ops || !ops->line)
  2573			return -EINVAL;
  2574	
  2575		dlci = gsd_dlci_get(gsd, ops->line, true);
  2576		if (IS_ERR(dlci))
  2577			return PTR_ERR(dlci);
  2578	
  2579		if (dlci->state == DLCI_OPENING || dlci->state == DLCI_OPEN ||
  2580		    dlci->state == DLCI_CLOSING)
  2581			return -EBUSY;
  2582	
  2583		mutex_lock(&dlci->mutex);
  2584		ops->gsd = gsd;
  2585		dlci->ops = ops;
  2586		dlci->modem_rx = 0;
  2587		dlci->prev_data = dlci->data;
  2588		dlci->data = gsd_dlci_data;
  2589		mutex_unlock(&dlci->mutex);
  2590	
  2591		gsm_dlci_begin_open(dlci);
  2592	
  2593		/*
  2594		 * Allow some time for dlci to move to DLCI_OPEN state. Otherwise
  2595		 * the serdev consumer driver can start sending data too early during
  2596		 * the setup, and the response will be missed by gms_queue() if we
  2597		 * still have DLCI_CLOSED state.
  2598		 */
  2599		for (retries = 10; retries > 0; retries--) {
  2600			if (dlci->state == DLCI_OPEN)
  2601				break;
  2602			msleep(100);
  2603		}
  2604	
  2605		if (!retries)
  2606			dev_dbg(&gsd->serdev->dev, "dlci%i not currently active\n",
  2607				dlci->addr);
  2608	
  2609		return 0;
  2610	}
  2611	EXPORT_SYMBOL_GPL(gsm_serdev_register_dlci);
  2612	

---
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: 33224 bytes --]

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202005230450.rnZzrGP6%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=tony@atomide.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

Linux-OMAP Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-omap/0 linux-omap/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-omap linux-omap/ https://lore.kernel.org/linux-omap \
		linux-omap@vger.kernel.org
	public-inbox-index linux-omap

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-omap


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git