lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201711151722.h4hSk4EM%fengguang.wu@intel.com>
Date:   Wed, 15 Nov 2017 18:03:15 +0800
From:   kbuild test robot <lkp@...el.com>
To:     "H. Nikolaus Schaller" <hns@...delico.com>
Cc:     kbuild-all@...org, Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        BenoƮt Cousson <bcousson@...libre.com>,
        Tony Lindgren <tony@...mide.com>,
        Russell King <linux@...linux.org.uk>,
        "H. Nikolaus Schaller" <hns@...delico.com>,
        Thierry Reding <treding@...dia.com>,
        Jonathan Cameron <jic23@...nel.org>,
        Maxime Ripard <maxime.ripard@...e-electrons.com>,
        Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-omap@...r.kernel.org, letux-kernel@...nphoenux.org,
        kernel@...a-handheld.com
Subject: Re: [PATCH v2 3/5] misc: Add w2sg0004 (gps receiver) power control
 driver

Hi Nikolaus,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on v4.14 next-20171115]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/H-Nikolaus-Schaller/misc-new-serdev-based-drivers-for-Wi2Wi-w2sg00x4-GPS-module/20171115-115158
config: tile-allmodconfig (attached as .config)
compiler: tilegx-linux-gcc (GCC) 4.6.2
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=tile 

All warnings (new ones prefixed by >>):

   drivers/misc/w2sg0004.c: In function 'w2sg_uart_receive_buf':
>> drivers/misc/w2sg0004.c:156:3: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat]
   drivers/misc/w2sg0004.c:161:4: warning: format '%d' expects argument of type 'int', but argument 2 has type 'size_t' [-Wformat]
   drivers/misc/w2sg0004.c: At top level:
   drivers/misc/w2sg0004.c:487:12: warning: 'w2sg_suspend' defined but not used [-Wunused-function]
   drivers/misc/w2sg0004.c:523:12: warning: 'w2sg_resume' defined but not used [-Wunused-function]

vim +156 drivers/misc/w2sg0004.c

   125	
   126	static int w2sg_uart_receive_buf(struct serdev_device *serdev,
   127					const unsigned char *rxdata,
   128					size_t count)
   129	{
   130		struct w2sg_data *data =
   131			(struct w2sg_data *) serdev_device_get_drvdata(serdev);
   132	
   133		if (!data->requested && !data->is_on) {
   134			/*
   135			 * we have received characters while the w2sg
   136			 * should have been be turned off
   137			 */
   138			data->discard_count += count;
   139			if ((data->state == W2SG_IDLE) &&
   140			    time_after(jiffies,
   141			    data->last_toggle + data->backoff)) {
   142				/* Should be off by now, time to toggle again */
   143				pr_debug("w2sg00x4 has sent %d characters data although it should be off!\n",
   144					data->discard_count);
   145	
   146				data->discard_count = 0;
   147	
   148				data->is_on = true;
   149				data->backoff *= 2;
   150				if (!data->suspended)
   151					schedule_delayed_work(&data->work, 0);
   152			}
   153		} else if (data->open_count > 0) {
   154			int n;
   155	
 > 156			pr_debug("w2sg00x4: push %d chars to tty port\n", count);
   157	
   158			/* pass to user-space */
   159			n = tty_insert_flip_string(&data->port, rxdata, count);
   160			if (n != count)
   161				pr_err("w2sg00x4: did loose %d characters\n", count - n);
   162			tty_flip_buffer_push(&data->port);
   163			return n;
   164		}
   165	
   166		/* assume we have processed everything */
   167		return count;
   168	}
   169	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (50385 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ