mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Mathieu OTHACEHE <m.othacehe@gmail.com>
Cc: kbuild-all@01.org, gregkh@linuxfoundation.org, jslaby@suse.com,
	akpm@linux-foundation.org, davem@davemloft.net,
	mchehab@osg.samsung.com, kvalo@codeaurora.org, joe@perches.com,
	linux-kernel@vger.kernel.org,
	Mathieu OTHACEHE <m.othacehe@gmail.com>
Subject: Re: [PATCH] tty: add Moxa Smartio MUE serial driver
Date: Sun, 7 Feb 2016 16:32:38 +0800	[thread overview]
Message-ID: <201602071657.RYCkif4E%fengguang.wu@intel.com> (raw)
In-Reply-To: <1454358859-5534-1-git-send-email-m.othacehe@gmail.com>

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

Hi Mathieu,

[auto build test ERROR on tty/tty-testing]
[also build test ERROR on v4.5-rc2 next-20160205]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Mathieu-OTHACEHE/tty-add-Moxa-Smartio-MUE-serial-driver/20160202-043752
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: ia64-allmodconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=ia64 

All errors (new ones prefixed by >>):

   drivers/tty/mxupcie.c: In function 'mxupcie_get_serial_info':
>> drivers/tty/mxupcie.c:803:2: error: implicit declaration of function 'copy_to_user' [-Werror=implicit-function-declaration]
     if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
     ^
   drivers/tty/mxupcie.c: In function 'mxupcie_set_serial_info':
>> drivers/tty/mxupcie.c:822:2: error: implicit declaration of function 'copy_from_user' [-Werror=implicit-function-declaration]
     if (copy_from_user(&new_serial, new_info, sizeof(new_serial)))
     ^
   drivers/tty/mxupcie.c: In function 'mxupcie_get_lsr_info':
>> drivers/tty/mxupcie.c:897:2: error: implicit declaration of function 'put_user' [-Werror=implicit-function-declaration]
     put_user(result, value);
     ^
   cc1: some warnings being treated as errors

vim +/copy_to_user +803 drivers/tty/mxupcie.c

   797		tmp.baud_base = info->baud_base;
   798		tmp.close_delay = info->close_delay;
   799		tmp.closing_wait = info->closing_wait;
   800		tmp.custom_divisor = info->custom_divisor;
   801		tmp.hub6 = 0;
   802	
 > 803		if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
   804			return -EFAULT;
   805	
   806		return 0;
   807	}
   808	
   809	static int mxupcie_set_serial_info(struct tty_struct *tty,
   810					   struct serial_struct *new_info)
   811	{
   812		struct mxupcie_port *info = tty->driver_data;
   813		struct tty_port *port = &info->port;
   814		struct serial_struct new_serial;
   815		unsigned int flags;
   816		int retval = 0;
   817		unsigned long sp_flags;
   818	
   819		if (!new_info)
   820			return -EFAULT;
   821	
 > 822		if (copy_from_user(&new_serial, new_info, sizeof(new_serial)))
   823			return -EFAULT;
   824	
   825		if ((new_serial.irq != info->board->irq) ||
   826		    (new_serial.port != *info->ioaddr))
   827			return -EINVAL;
   828	
   829		flags = port->flags & ASYNC_SPD_MASK;
   830	
   831		if (!capable(CAP_SYS_ADMIN)) {
   832			if ((new_serial.baud_base != info->baud_base) ||
   833			    (new_serial.close_delay != info->close_delay) ||
   834			    ((new_serial.flags & ~ASYNC_USR_MASK) !=
   835			     (port->flags & ~ASYNC_USR_MASK)))
   836				return -EPERM;
   837	
   838			port->flags = ((port->flags & ~ASYNC_USR_MASK) |
   839					    (new_serial.flags & ASYNC_USR_MASK));
   840		} else {
   841			/*
   842			 * OK, past this point, all the error checking has been done.
   843			 * At this point, we start making changes.....
   844			 */
   845			port->flags = ((port->flags & ~ASYNC_FLAGS) |
   846				       (new_serial.flags & ASYNC_FLAGS));
   847			info->close_delay = new_serial.close_delay * HZ / 100;
   848			info->closing_wait = new_serial.closing_wait * HZ / 100;
   849	
   850			if ((new_serial.baud_base != info->baud_base) ||
   851			    (new_serial.custom_divisor != info->custom_divisor)) {
   852	
   853				if (new_serial.custom_divisor == 0)
   854					return -EINVAL;
   855	
   856				info->custom_baud_rate = new_serial.baud_base /
   857					new_serial.custom_divisor;
   858			}
   859		}
   860	
   861		if (test_bit(ASYNCB_INITIALIZED, &port->flags)) {
   862			if (flags != (port->flags & ASYNC_SPD_MASK)) {
   863				spin_lock_irqsave(&info->slock, sp_flags);
   864				mxupcie_change_speed(tty, NULL);
   865				spin_unlock_irqrestore(&info->slock, sp_flags);
   866			}
   867		} else {
   868			retval = mxupcie_activate(port, tty);
   869			if (retval == 0)
   870				set_bit(ASYNCB_INITIALIZED, &port->flags);
   871		}
   872	
   873		return retval;
   874	}
   875	
   876	/*
   877	 * mx_get_lsr_info - get line status register info
   878	 *
   879	 * Purpose: Let user call ioctl() to get info when the UART physically
   880	 *	    is emptied.  On bus types like RS485, the transmitter must
   881	 *	    release the bus after transmitting. This must be done when
   882	 *	    the transmit shift register is empty, not be done when the
   883	 *	    transmit holding register is empty.  This functionality
   884	 *	    allows an RS485 driver to be written in user space.
   885	 */
   886	static int mxupcie_get_lsr_info(struct tty_struct *tty, unsigned int *value)
   887	{
   888		struct mxupcie_port *info = tty->driver_data;
   889		unsigned char status;
   890		unsigned int result;
   891		unsigned long sp_flags;
   892	
   893		spin_lock_irqsave(&info->slock, sp_flags);
   894		status = ioread8(info->ioaddr + UART_LSR);
   895		spin_unlock_irqrestore(&info->slock, sp_flags);
   896		result = ((status & UART_LSR_TEMT) ? TIOCSER_TEMT : 0);
 > 897		put_user(result, value);
   898	
   899		return 0;
   900	}

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 42269 bytes --]

  parent reply	other threads:[~2016-02-07  8:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 20:34 Mathieu OTHACEHE
2016-02-01 20:59 ` Greg KH
2016-02-01 21:13 ` One Thousand Gnomes
2016-02-03 18:50   ` Mathieu OTHACEHE
2016-02-07  8:32 ` kbuild test robot [this message]
2016-02-08 16:18 ` Andy Shevchenko
2016-02-09 12:10   ` Mathieu OTHACEHE
2016-02-10  6:32     ` Andy Shevchenko

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=201602071657.RYCkif4E%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=jslaby@suse.com \
    --cc=kbuild-all@01.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.othacehe@gmail.com \
    --cc=mchehab@osg.samsung.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
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

all inboxes | Powered by JetHome®