All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the tty tree with the bluetooth tree
@ 2017-04-13  3:36 Stephen Rothwell
  2017-05-07  2:54 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2017-04-13  3:36 UTC (permalink / raw)
  To: Greg KH, Gustavo Padovan
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Sebastian Reichel, Marcel Holtmann, Andrey Smirnov

Hi Greg,

Today's linux-next merge of the tty tree got a conflict in:

  include/linux/serdev.h

between commits:

  b3f80c8f75ef ("serdev: add serdev_device_wait_until_sent")
  5659dab26f09 ("serdev: implement get/set tiocm")

from the bluetooth tree and commit:

  6fe729c4bdae ("serdev: Add serdev_device_write subroutine")

from the tty tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/linux/serdev.h
index 37395b8eb8f1,0beaff886992..000000000000
--- a/include/linux/serdev.h
+++ b/include/linux/serdev.h
@@@ -191,10 -190,8 +195,11 @@@ int serdev_device_open(struct serdev_de
  void serdev_device_close(struct serdev_device *);
  unsigned int serdev_device_set_baudrate(struct serdev_device *, unsigned int);
  void serdev_device_set_flow_control(struct serdev_device *, bool);
 +void serdev_device_wait_until_sent(struct serdev_device *, long);
 +int serdev_device_get_tiocm(struct serdev_device *);
 +int serdev_device_set_tiocm(struct serdev_device *, int, int);
- int serdev_device_write_buf(struct serdev_device *, const unsigned char *, size_t);
+ void serdev_device_write_wakeup(struct serdev_device *);
+ int serdev_device_write(struct serdev_device *, const unsigned char *, size_t, unsigned long);
  void serdev_device_write_flush(struct serdev_device *);
  int serdev_device_write_room(struct serdev_device *);
  
@@@ -231,16 -228,8 +236,17 @@@ static inline unsigned int serdev_devic
  	return 0;
  }
  static inline void serdev_device_set_flow_control(struct serdev_device *sdev, bool enable) {}
 +static inline void serdev_device_wait_until_sent(struct serdev_device *sdev, long timeout) {}
 +static inline int serdev_device_get_tiocm(struct serdev_device *serdev)
 +{
 +	return -ENOTSUPP;
 +}
 +static inline int serdev_device_set_tiocm(struct serdev_device *serdev, int set, int clear)
 +{
 +	return -ENOTSUPP;
 +}
- static inline int serdev_device_write_buf(struct serdev_device *sdev, const unsigned char *buf, size_t count)
+ static inline int serdev_device_write(struct serdev_device *sdev, const unsigned char *buf,
+ 				      size_t count, unsigned long timeout)
  {
  	return -ENODEV;
  }

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: manual merge of the tty tree with the bluetooth tree
  2017-04-13  3:36 linux-next: manual merge of the tty tree with the bluetooth tree Stephen Rothwell
@ 2017-05-07  2:54 ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2017-05-07  2:54 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Gustavo Padovan, Linux-Next Mailing List,
	Linux Kernel Mailing List, Sebastian Reichel, Marcel Holtmann,
	Andrey Smirnov

On Thu, Apr 13, 2017 at 01:36:31PM +1000, Stephen Rothwell wrote:
> Hi Greg,
> 
> Today's linux-next merge of the tty tree got a conflict in:
> 
>   include/linux/serdev.h
> 
> between commits:
> 
>   b3f80c8f75ef ("serdev: add serdev_device_wait_until_sent")
>   5659dab26f09 ("serdev: implement get/set tiocm")
> 
> from the bluetooth tree and commit:
> 
>   6fe729c4bdae ("serdev: Add serdev_device_write subroutine")
> 
> from the tty tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc include/linux/serdev.h
> index 37395b8eb8f1,0beaff886992..000000000000
> --- a/include/linux/serdev.h
> +++ b/include/linux/serdev.h
> @@@ -191,10 -190,8 +195,11 @@@ int serdev_device_open(struct serdev_de
>   void serdev_device_close(struct serdev_device *);
>   unsigned int serdev_device_set_baudrate(struct serdev_device *, unsigned int);
>   void serdev_device_set_flow_control(struct serdev_device *, bool);
>  +void serdev_device_wait_until_sent(struct serdev_device *, long);
>  +int serdev_device_get_tiocm(struct serdev_device *);
>  +int serdev_device_set_tiocm(struct serdev_device *, int, int);
> - int serdev_device_write_buf(struct serdev_device *, const unsigned char *, size_t);
> + void serdev_device_write_wakeup(struct serdev_device *);
> + int serdev_device_write(struct serdev_device *, const unsigned char *, size_t, unsigned long);
>   void serdev_device_write_flush(struct serdev_device *);
>   int serdev_device_write_room(struct serdev_device *);
>   
> @@@ -231,16 -228,8 +236,17 @@@ static inline unsigned int serdev_devic
>   	return 0;
>   }
>   static inline void serdev_device_set_flow_control(struct serdev_device *sdev, bool enable) {}
>  +static inline void serdev_device_wait_until_sent(struct serdev_device *sdev, long timeout) {}
>  +static inline int serdev_device_get_tiocm(struct serdev_device *serdev)
>  +{
>  +	return -ENOTSUPP;
>  +}
>  +static inline int serdev_device_set_tiocm(struct serdev_device *serdev, int set, int clear)
>  +{
>  +	return -ENOTSUPP;
>  +}
> - static inline int serdev_device_write_buf(struct serdev_device *sdev, const unsigned char *buf, size_t count)
> + static inline int serdev_device_write(struct serdev_device *sdev, const unsigned char *buf,
> + 				      size_t count, unsigned long timeout)
>   {
>   	return -ENODEV;
>   }

Thanks for the fix, it looks correct to me.  I'll forward this on to
Linus when I send him the pull request.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: manual merge of the tty tree with the bluetooth tree
  2011-04-26 12:56 ` Greg KH
@ 2011-04-26 18:40   ` Gustavo F. Padovan
  0 siblings, 0 replies; 5+ messages in thread
From: Gustavo F. Padovan @ 2011-04-26 18:40 UTC (permalink / raw)
  To: Greg KH
  Cc: Stephen Rothwell, linux-next, linux-kernel, Jiejing Zhang, Felipe Balbi

* Greg KH <greg@kroah.com> [2011-04-26 05:56:46 -0700]:

> On Tue, Apr 26, 2011 at 05:55:30PM +1000, Stephen Rothwell wrote:
> > Hi Greg,
> > 
> > Today's linux-next merge of the tty tree got a conflict in
> > drivers/bluetooth/hci_ldisc.c between commit 78b4a56c28c0 ("Bluetooth:
> > hci_uart: check the return value of recv()") from the bluetooth tree and
> > commit b1c43f82c5aa ("tty: make receive_buf() return the amout of bytes
> > received") from the tty tree.
> > 
> > I fixed it up (see below) and can carry the fix as necessary.
> 
> The fix looks correct to me, thanks for doing this.

It's ok to me as well, thanks for the fix!

-- 
Gustavo F. Padovan
http://profusion.mobi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: manual merge of the tty tree with the bluetooth tree
  2011-04-26  7:55 Stephen Rothwell
@ 2011-04-26 12:56 ` Greg KH
  2011-04-26 18:40   ` Gustavo F. Padovan
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2011-04-26 12:56 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Jiejing Zhang, Gustavo F. Padovan,
	Felipe Balbi

On Tue, Apr 26, 2011 at 05:55:30PM +1000, Stephen Rothwell wrote:
> Hi Greg,
> 
> Today's linux-next merge of the tty tree got a conflict in
> drivers/bluetooth/hci_ldisc.c between commit 78b4a56c28c0 ("Bluetooth:
> hci_uart: check the return value of recv()") from the bluetooth tree and
> commit b1c43f82c5aa ("tty: make receive_buf() return the amout of bytes
> received") from the tty tree.
> 
> I fixed it up (see below) and can carry the fix as necessary.

The fix looks correct to me, thanks for doing this.

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* linux-next: manual merge of the tty tree with the bluetooth tree
@ 2011-04-26  7:55 Stephen Rothwell
  2011-04-26 12:56 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2011-04-26  7:55 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-next, linux-kernel, Jiejing Zhang, Gustavo F. Padovan,
	Felipe Balbi

Hi Greg,

Today's linux-next merge of the tty tree got a conflict in
drivers/bluetooth/hci_ldisc.c between commit 78b4a56c28c0 ("Bluetooth:
hci_uart: check the return value of recv()") from the bluetooth tree and
commit b1c43f82c5aa ("tty: make receive_buf() return the amout of bytes
received") from the tty tree.

I fixed it up (see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/bluetooth/hci_ldisc.c
index 320f718,0d4da5e..0000000
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@@ -357,21 -357,21 +357,22 @@@ static void hci_uart_tty_wakeup(struct 
   *     
   * Return Value:    None
   */
- static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data, char *flags, int count)
+ static unsigned int hci_uart_tty_receive(struct tty_struct *tty,
+ 		const u8 *data, char *flags, int count)
  {
- 	int ret;
  	struct hci_uart *hu = (void *)tty->disc_data;
+ 	int received;
  
  	if (!hu || tty != hu->tty)
- 		return;
+ 		return -ENODEV;
  
  	if (!test_bit(HCI_UART_PROTO_SET, &hu->flags))
- 		return;
+ 		return -EINVAL;
  
  	spin_lock(&hu->rx_lock);
- 	ret = hu->proto->recv(hu, (void *) data, count);
- 	if (ret > 0)
+ 	received = hu->proto->recv(hu, (void *) data, count);
 -	hu->hdev->stat.byte_rx += count;
++	if (received > 0)
 +		hu->hdev->stat.byte_rx += count;
  	spin_unlock(&hu->rx_lock);
  
  	tty_unthrottle(tty);

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-05-07 21:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-13  3:36 linux-next: manual merge of the tty tree with the bluetooth tree Stephen Rothwell
2017-05-07  2:54 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2011-04-26  7:55 Stephen Rothwell
2011-04-26 12:56 ` Greg KH
2011-04-26 18:40   ` Gustavo F. Padovan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.