[omap:serdev-ngsm-pending-v5.7 17/29] drivers/tty/n_gsm.c:2564:18: warning: variable 'gsm' set but not used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

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@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux