[v4,1/3] serial: core: Controller id cannot be negative

Message ID 20230724050709.17544-2-tony@atomide.com
State New
Headers
Series Serial core controller port device name fixes |

Commit Message

Tony Lindgren July 24, 2023, 5:07 a.m. UTC
  The controller id cannot be negative. Let's fix the ctrl_id in preparation
for adding port_id to fix the device name.

Fixes: 84a9582fd203 ("serial: core: Start managing serial controllers to enable runtime PM")
Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 include/linux/serial_core.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Andy Shevchenko July 24, 2023, 8:52 a.m. UTC | #1
On Mon, Jul 24, 2023 at 08:07:03AM +0300, Tony Lindgren wrote:
> The controller id cannot be negative. Let's fix the ctrl_id in preparation
> for adding port_id to fix the device name.
> 
> Fixes: 84a9582fd203 ("serial: core: Start managing serial controllers to enable runtime PM")
> Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Andy Shevchenko <andriy.shevchenko@linux.intel.com>

???
Missing Reviewed-by: I suppose?
  
Andy Shevchenko July 24, 2023, 8:53 a.m. UTC | #2
On Mon, Jul 24, 2023 at 11:52:39AM +0300, Andy Shevchenko wrote:
> On Mon, Jul 24, 2023 at 08:07:03AM +0300, Tony Lindgren wrote:
> > The controller id cannot be negative. Let's fix the ctrl_id in preparation
> > for adding port_id to fix the device name.
> > 
> > Fixes: 84a9582fd203 ("serial: core: Start managing serial controllers to enable runtime PM")
> > Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> > Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> ???
> Missing Reviewed-by: I suppose?

Seems like it wen in all patches... :-(
  

Patch

diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -459,7 +459,7 @@  struct uart_port {
 						struct serial_rs485 *rs485);
 	int			(*iso7816_config)(struct uart_port *,
 						  struct serial_iso7816 *iso7816);
-	int			ctrl_id;		/* optional serial core controller id */
+	unsigned int		ctrl_id;		/* optional serial core controller id */
 	unsigned int		irq;			/* irq number */
 	unsigned long		irqflags;		/* irq flags  */
 	unsigned int		uartclk;		/* base uart clock */