linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/10] tty: serial: samsung: allow driver to be built by anyone
@ 2019-12-10 14:36 Greg Kroah-Hartman
  2019-12-10 14:36 ` [PATCH 02/10] tty: serial: samsung_tty: fix build warning Greg Kroah-Hartman
                   ` (9 more replies)
  0 siblings, 10 replies; 30+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-10 14:36 UTC (permalink / raw)
  To: linux-serial
  Cc: Greg Kroah-Hartman, Kukjin Kim, Krzysztof Kozlowski, Hyunki Koo,
	HYUN-KI KOO, Shinbeom Choi, Jiri Slaby, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

There is no need to tie this driver to only the OMAP platform,
especially for build testing.  So add COMPILE_TEST as an option allowing
it to be built on any platform.

Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Hyunki Koo <kkoos00@naver.com>
Cc: HYUN-KI KOO <hyunki00.koo@samsung.com>
Cc: Shinbeom Choi <sbeom.choi@samsung.com>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/tty/serial/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 99f5da3bf913..c835e10bd97e 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -237,7 +237,7 @@ config SERIAL_CLPS711X_CONSOLE
 
 config SERIAL_SAMSUNG
 	tristate "Samsung SoC serial support"
-	depends on PLAT_SAMSUNG || ARCH_EXYNOS
+	depends on PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST
 	select SERIAL_CORE
 	help
 	  Support for the on-chip UARTs on the Samsung S3C24XX series CPUs,
-- 
2.24.0


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

* [PATCH 02/10] tty: serial: samsung_tty: fix build warning
  2019-12-10 14:36 [PATCH 01/10] tty: serial: samsung: allow driver to be built by anyone Greg Kroah-Hartman
@ 2019-12-10 14:36 ` Greg Kroah-Hartman
  2019-12-10 14:48   ` Krzysztof Kozlowski
  2019-12-11 11:01   ` Enrico Weigelt, metux IT consult
  2019-12-10 14:36 ` [PATCH 03/10] tty: serial: samsung.h: fix up minor comment issues Greg Kroah-Hartman
                   ` (8 subsequent siblings)
  9 siblings, 2 replies; 30+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-10 14:36 UTC (permalink / raw)
  To: linux-serial
  Cc: Greg Kroah-Hartman, Kukjin Kim, Krzysztof Kozlowski, Hyunki Koo,
	HYUN-KI KOO, Shinbeom Choi, Jiri Slaby, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

Fix a build warning on systems that do not have CONFIG_OF enabled.

Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Hyunki Koo <kkoos00@naver.com>
Cc: HYUN-KI KOO <hyunki00.koo@samsung.com>
Cc: Shinbeom Choi <sbeom.choi@samsung.com>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/tty/serial/samsung_tty.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index 83fd51607741..67c5a84d0a26 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -1851,7 +1851,10 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
 
 /* Device driver serial port probe */
 
+#ifdef CONFIG_OF
 static const struct of_device_id s3c24xx_uart_dt_match[];
+#endif
+
 static int probe_index;
 
 static inline struct s3c24xx_serial_drv_data *s3c24xx_get_driver_data(
-- 
2.24.0


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

* [PATCH 03/10] tty: serial: samsung.h: fix up minor comment issues
  2019-12-10 14:36 [PATCH 01/10] tty: serial: samsung: allow driver to be built by anyone Greg Kroah-Hartman
  2019-12-10 14:36 ` [PATCH 02/10] tty: serial: samsung_tty: fix build warning Greg Kroah-Hartman
@ 2019-12-10 14:36 ` Greg Kroah-Hartman
  2019-12-10 15:12   ` Krzysztof Kozlowski
  2019-12-10 14:37 ` [PATCH 04/10] tty: serial: samsung.h: remove reset_port callback from struct s3c24xx_uart_info Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 30+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-10 14:36 UTC (permalink / raw)
  To: linux-serial
  Cc: Greg Kroah-Hartman, Kukjin Kim, Krzysztof Kozlowski, Hyunki Koo,
	HYUN-KI KOO, Shinbeom Choi, Jiri Slaby, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

checkpatch found some minor issues with comments in samsung.h, so fix
that up.

Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Hyunki Koo <kkoos00@naver.com>
Cc: HYUN-KI KOO <hyunki00.koo@samsung.com>
Cc: Shinbeom Choi <sbeom.choi@samsung.com>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/tty/serial/samsung.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/samsung.h b/drivers/tty/serial/samsung.h
index f93022113f59..cdfd53acead3 100644
--- a/drivers/tty/serial/samsung.h
+++ b/drivers/tty/serial/samsung.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SAMSUNG_H
 #define __SAMSUNG_H
 
@@ -7,7 +7,7 @@
  *
  * Ben Dooks, Copyright (c) 2003-2008 Simtec Electronics
  *	http://armlinux.simtec.co.uk/
-*/
+ */
 
 #include <linux/dmaengine.h>
 
-- 
2.24.0


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

* [PATCH 04/10] tty: serial: samsung.h: remove reset_port callback from struct s3c24xx_uart_info
  2019-12-10 14:36 [PATCH 01/10] tty: serial: samsung: allow driver to be built by anyone Greg Kroah-Hartman
  2019-12-10 14:36 ` [PATCH 02/10] tty: serial: samsung_tty: fix build warning Greg Kroah-Hartman
  2019-12-10 14:36 ` [PATCH 03/10] tty: serial: samsung.h: fix up minor comment issues Greg Kroah-Hartman
@ 2019-12-10 14:37 ` Greg Kroah-Hartman
  2019-12-10 14:50   ` Krzysztof Kozlowski
  2019-12-10 14:37 ` [PATCH 05/10] tty: serial: samsung_tty: delete samsung.h Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 30+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-10 14:37 UTC (permalink / raw)
  To: linux-serial
  Cc: Greg Kroah-Hartman, Kukjin Kim, Krzysztof Kozlowski, Hyunki Koo,
	HYUN-KI KOO, Shinbeom Choi, Jiri Slaby, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

The callback was never set, nor called, so remove the pointer entirely
from struct s3c24xx_uart_info.

Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Hyunki Koo <kkoos00@naver.com>
Cc: HYUN-KI KOO <hyunki00.koo@samsung.com>
Cc: Shinbeom Choi <sbeom.choi@samsung.com>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/tty/serial/samsung.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/tty/serial/samsung.h b/drivers/tty/serial/samsung.h
index cdfd53acead3..7255ef287857 100644
--- a/drivers/tty/serial/samsung.h
+++ b/drivers/tty/serial/samsung.h
@@ -29,9 +29,6 @@ struct s3c24xx_uart_info {
 	/* uart port features */
 
 	unsigned int		has_divslot:1;
-
-	/* uart controls */
-	int (*reset_port)(struct uart_port *, struct s3c2410_uartcfg *);
 };
 
 struct s3c24xx_serial_drv_data {
-- 
2.24.0


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

* [PATCH 05/10] tty: serial: samsung_tty: delete samsung.h
  2019-12-10 14:36 [PATCH 01/10] tty: serial: samsung: allow driver to be built by anyone Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2019-12-10 14:37 ` [PATCH 04/10] tty: serial: samsung.h: remove reset_port callback from struct s3c24xx_uart_info Greg Kroah-Hartman
@ 2019-12-10 14:37 ` Greg Kroah-Hartman
  2019-12-10 14:52   ` Krzysztof Kozlowski
  2019-12-10 14:37 ` [PATCH 06/10] tty: serial: samsung_tty: drop unneded dbg() calls Greg Kroah-Hartman
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 30+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-10 14:37 UTC (permalink / raw)
  To: linux-serial
  Cc: Greg Kroah-Hartman, Kukjin Kim, Krzysztof Kozlowski, Hyunki Koo,
	HYUN-KI KOO, Shinbeom Choi, Jiri Slaby, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

There is no need for a .h file for a single .c file, so just move all of
the content of samsung.h into samsung_tty.c

Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Hyunki Koo <kkoos00@naver.com>
Cc: HYUN-KI KOO <hyunki00.koo@samsung.com>
Cc: Shinbeom Choi <sbeom.choi@samsung.com>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/tty/serial/samsung.h     | 144 -------------------------------
 drivers/tty/serial/samsung_tty.c | 133 +++++++++++++++++++++++++++-
 2 files changed, 130 insertions(+), 147 deletions(-)
 delete mode 100644 drivers/tty/serial/samsung.h

diff --git a/drivers/tty/serial/samsung.h b/drivers/tty/serial/samsung.h
deleted file mode 100644
index 7255ef287857..000000000000
--- a/drivers/tty/serial/samsung.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __SAMSUNG_H
-#define __SAMSUNG_H
-
-/*
- * Driver for Samsung SoC onboard UARTs.
- *
- * Ben Dooks, Copyright (c) 2003-2008 Simtec Electronics
- *	http://armlinux.simtec.co.uk/
- */
-
-#include <linux/dmaengine.h>
-
-struct s3c24xx_uart_info {
-	char			*name;
-	unsigned int		type;
-	unsigned int		fifosize;
-	unsigned long		rx_fifomask;
-	unsigned long		rx_fifoshift;
-	unsigned long		rx_fifofull;
-	unsigned long		tx_fifomask;
-	unsigned long		tx_fifoshift;
-	unsigned long		tx_fifofull;
-	unsigned int		def_clk_sel;
-	unsigned long		num_clks;
-	unsigned long		clksel_mask;
-	unsigned long		clksel_shift;
-
-	/* uart port features */
-
-	unsigned int		has_divslot:1;
-};
-
-struct s3c24xx_serial_drv_data {
-	struct s3c24xx_uart_info	*info;
-	struct s3c2410_uartcfg		*def_cfg;
-	unsigned int			fifosize[CONFIG_SERIAL_SAMSUNG_UARTS];
-};
-
-struct s3c24xx_uart_dma {
-	unsigned int			rx_chan_id;
-	unsigned int			tx_chan_id;
-
-	struct dma_slave_config		rx_conf;
-	struct dma_slave_config		tx_conf;
-
-	struct dma_chan			*rx_chan;
-	struct dma_chan			*tx_chan;
-
-	dma_addr_t			rx_addr;
-	dma_addr_t			tx_addr;
-
-	dma_cookie_t			rx_cookie;
-	dma_cookie_t			tx_cookie;
-
-	char				*rx_buf;
-
-	dma_addr_t			tx_transfer_addr;
-
-	size_t				rx_size;
-	size_t				tx_size;
-
-	struct dma_async_tx_descriptor	*tx_desc;
-	struct dma_async_tx_descriptor	*rx_desc;
-
-	int				tx_bytes_requested;
-	int				rx_bytes_requested;
-};
-
-struct s3c24xx_uart_port {
-	unsigned char			rx_claimed;
-	unsigned char			tx_claimed;
-	unsigned int			pm_level;
-	unsigned long			baudclk_rate;
-	unsigned int			min_dma_size;
-
-	unsigned int			rx_irq;
-	unsigned int			tx_irq;
-
-	unsigned int			tx_in_progress;
-	unsigned int			tx_mode;
-	unsigned int			rx_mode;
-
-	struct s3c24xx_uart_info	*info;
-	struct clk			*clk;
-	struct clk			*baudclk;
-	struct uart_port		port;
-	struct s3c24xx_serial_drv_data	*drv_data;
-
-	/* reference to platform data */
-	struct s3c2410_uartcfg		*cfg;
-
-	struct s3c24xx_uart_dma		*dma;
-
-#ifdef CONFIG_ARM_S3C24XX_CPUFREQ
-	struct notifier_block		freq_transition;
-#endif
-};
-
-/* conversion functions */
-
-#define s3c24xx_dev_to_port(__dev) dev_get_drvdata(__dev)
-
-/* register access controls */
-
-#define portaddr(port, reg) ((port)->membase + (reg))
-#define portaddrl(port, reg) \
-	((unsigned long *)(unsigned long)((port)->membase + (reg)))
-
-#define rd_regb(port, reg) (readb_relaxed(portaddr(port, reg)))
-#define rd_regl(port, reg) (readl_relaxed(portaddr(port, reg)))
-
-#define wr_regb(port, reg, val) writeb_relaxed(val, portaddr(port, reg))
-#define wr_regl(port, reg, val) writel_relaxed(val, portaddr(port, reg))
-
-/* Byte-order aware bit setting/clearing functions. */
-
-static inline void s3c24xx_set_bit(struct uart_port *port, int idx,
-				   unsigned int reg)
-{
-	unsigned long flags;
-	u32 val;
-
-	local_irq_save(flags);
-	val = rd_regl(port, reg);
-	val |= (1 << idx);
-	wr_regl(port, reg, val);
-	local_irq_restore(flags);
-}
-
-static inline void s3c24xx_clear_bit(struct uart_port *port, int idx,
-				     unsigned int reg)
-{
-	unsigned long flags;
-	u32 val;
-
-	local_irq_save(flags);
-	val = rd_regl(port, reg);
-	val &= ~(1 << idx);
-	wr_regl(port, reg, val);
-	local_irq_restore(flags);
-}
-
-#endif
diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index 67c5a84d0a26..1a3bf5879344 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -44,11 +44,8 @@
 #include <linux/clk.h>
 #include <linux/cpufreq.h>
 #include <linux/of.h>
-
 #include <asm/irq.h>
 
-#include "samsung.h"
-
 #if	defined(CONFIG_SERIAL_SAMSUNG_DEBUG) &&	\
 	!defined(MODULE)
 
@@ -89,6 +86,136 @@ static void dbg(const char *fmt, ...)
 /* flag to ignore all characters coming in */
 #define RXSTAT_DUMMY_READ (0x10000000)
 
+struct s3c24xx_uart_info {
+	char			*name;
+	unsigned int		type;
+	unsigned int		fifosize;
+	unsigned long		rx_fifomask;
+	unsigned long		rx_fifoshift;
+	unsigned long		rx_fifofull;
+	unsigned long		tx_fifomask;
+	unsigned long		tx_fifoshift;
+	unsigned long		tx_fifofull;
+	unsigned int		def_clk_sel;
+	unsigned long		num_clks;
+	unsigned long		clksel_mask;
+	unsigned long		clksel_shift;
+
+	/* uart port features */
+
+	unsigned int		has_divslot:1;
+};
+
+struct s3c24xx_serial_drv_data {
+	struct s3c24xx_uart_info	*info;
+	struct s3c2410_uartcfg		*def_cfg;
+	unsigned int			fifosize[CONFIG_SERIAL_SAMSUNG_UARTS];
+};
+
+struct s3c24xx_uart_dma {
+	unsigned int			rx_chan_id;
+	unsigned int			tx_chan_id;
+
+	struct dma_slave_config		rx_conf;
+	struct dma_slave_config		tx_conf;
+
+	struct dma_chan			*rx_chan;
+	struct dma_chan			*tx_chan;
+
+	dma_addr_t			rx_addr;
+	dma_addr_t			tx_addr;
+
+	dma_cookie_t			rx_cookie;
+	dma_cookie_t			tx_cookie;
+
+	char				*rx_buf;
+
+	dma_addr_t			tx_transfer_addr;
+
+	size_t				rx_size;
+	size_t				tx_size;
+
+	struct dma_async_tx_descriptor	*tx_desc;
+	struct dma_async_tx_descriptor	*rx_desc;
+
+	int				tx_bytes_requested;
+	int				rx_bytes_requested;
+};
+
+struct s3c24xx_uart_port {
+	unsigned char			rx_claimed;
+	unsigned char			tx_claimed;
+	unsigned int			pm_level;
+	unsigned long			baudclk_rate;
+	unsigned int			min_dma_size;
+
+	unsigned int			rx_irq;
+	unsigned int			tx_irq;
+
+	unsigned int			tx_in_progress;
+	unsigned int			tx_mode;
+	unsigned int			rx_mode;
+
+	struct s3c24xx_uart_info	*info;
+	struct clk			*clk;
+	struct clk			*baudclk;
+	struct uart_port		port;
+	struct s3c24xx_serial_drv_data	*drv_data;
+
+	/* reference to platform data */
+	struct s3c2410_uartcfg		*cfg;
+
+	struct s3c24xx_uart_dma		*dma;
+
+#ifdef CONFIG_ARM_S3C24XX_CPUFREQ
+	struct notifier_block		freq_transition;
+#endif
+};
+
+/* conversion functions */
+
+#define s3c24xx_dev_to_port(__dev) dev_get_drvdata(__dev)
+
+/* register access controls */
+
+#define portaddr(port, reg) ((port)->membase + (reg))
+#define portaddrl(port, reg) \
+	((unsigned long *)(unsigned long)((port)->membase + (reg)))
+
+#define rd_regb(port, reg) (readb_relaxed(portaddr(port, reg)))
+#define rd_regl(port, reg) (readl_relaxed(portaddr(port, reg)))
+
+#define wr_regb(port, reg, val) writeb_relaxed(val, portaddr(port, reg))
+#define wr_regl(port, reg, val) writel_relaxed(val, portaddr(port, reg))
+
+/* Byte-order aware bit setting/clearing functions. */
+
+static inline void s3c24xx_set_bit(struct uart_port *port, int idx,
+				   unsigned int reg)
+{
+	unsigned long flags;
+	u32 val;
+
+	local_irq_save(flags);
+	val = rd_regl(port, reg);
+	val |= (1 << idx);
+	wr_regl(port, reg, val);
+	local_irq_restore(flags);
+}
+
+static inline void s3c24xx_clear_bit(struct uart_port *port, int idx,
+				     unsigned int reg)
+{
+	unsigned long flags;
+	u32 val;
+
+	local_irq_save(flags);
+	val = rd_regl(port, reg);
+	val &= ~(1 << idx);
+	wr_regl(port, reg, val);
+	local_irq_restore(flags);
+}
+
 static inline struct s3c24xx_uart_port *to_ourport(struct uart_port *port)
 {
 	return container_of(port, struct s3c24xx_uart_port, port);
-- 
2.24.0


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

* [PATCH 06/10] tty: serial: samsung_tty: drop unneded dbg() calls
  2019-12-10 14:36 [PATCH 01/10] tty: serial: samsung: allow driver to be built by anyone Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2019-12-10 14:37 ` [PATCH 05/10] tty: serial: samsung_tty: delete samsung.h Greg Kroah-Hartman
@ 2019-12-10 14:37 ` Greg Kroah-Hartman
  2019-12-10 14:53   ` Krzysztof Kozlowski
  2019-12-10 14:37 ` [PATCH 07/10] tty: serial: samsung_tty: use standard debugging macros Greg Kroah-Hartman
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 30+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-10 14:37 UTC (permalink / raw)
  To: linux-serial
  Cc: Greg Kroah-Hartman, Kukjin Kim, Krzysztof Kozlowski, Hyunki Koo,
	HYUN-KI KOO, Shinbeom Choi, Jiri Slaby, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

Now that the kernel has ftrace, any debugging calls that just do "made
it to this function!" and "leaving this function!" can be removed.

On the quest to move the samsung_tty driver over to use the standard
kernel debugging functions, drop these unneeded calls.

Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Hyunki Koo <kkoos00@naver.com>
Cc: HYUN-KI KOO <hyunki00.koo@samsung.com>
Cc: Shinbeom Choi <sbeom.choi@samsung.com>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/tty/serial/samsung_tty.c | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index 1a3bf5879344..37749f09066d 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -1136,9 +1136,6 @@ static int s3c24xx_serial_startup(struct uart_port *port)
 	struct s3c24xx_uart_port *ourport = to_ourport(port);
 	int ret;
 
-	dbg("s3c24xx_serial_startup: port=%p (%08llx,%p)\n",
-	    port, (unsigned long long)port->mapbase, port->membase);
-
 	rx_enabled(port) = 1;
 
 	ret = request_irq(ourport->rx_irq, s3c24xx_serial_rx_chars, 0,
@@ -1165,8 +1162,6 @@ static int s3c24xx_serial_startup(struct uart_port *port)
 
 	ourport->tx_claimed = 1;
 
-	dbg("s3c24xx_serial_startup ok\n");
-
 	/* the port reset code should have done the correct
 	 * register setup for the port controls */
 
@@ -1184,9 +1179,6 @@ static int s3c64xx_serial_startup(struct uart_port *port)
 	unsigned int ufcon;
 	int ret;
 
-	dbg("s3c64xx_serial_startup: port=%p (%08llx,%p)\n",
-	    port, (unsigned long long)port->mapbase, port->membase);
-
 	wr_regl(port, S3C64XX_UINTM, 0xf);
 	if (ourport->dma) {
 		ret = s3c24xx_serial_request_dma(ourport);
@@ -1224,7 +1216,6 @@ static int s3c64xx_serial_startup(struct uart_port *port)
 	/* Enable Rx Interrupt */
 	s3c24xx_clear_bit(port, S3C64XX_UINTM_RXD, S3C64XX_UINTM);
 
-	dbg("s3c64xx_serial_startup ok\n");
 	return ret;
 }
 
@@ -1870,8 +1861,6 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
 	struct resource *res;
 	int ret;
 
-	dbg("s3c24xx_serial_init_port: port=%p, platdev=%p\n", port, platdev);
-
 	if (platdev == NULL)
 		return -ENODEV;
 
@@ -2011,8 +2000,6 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)
 			index = ret;
 	}
 
-	dbg("s3c24xx_serial_probe(%p) %d\n", pdev, index);
-
 	if (index >= ARRAY_SIZE(s3c24xx_serial_ports)) {
 		dev_err(&pdev->dev, "serial%d out of range\n", index);
 		return -EINVAL;
@@ -2273,10 +2260,6 @@ s3c24xx_serial_get_options(struct uart_port *port, int *baud,
 	ucon   = rd_regl(port, S3C2410_UCON);
 	ubrdiv = rd_regl(port, S3C2410_UBRDIV);
 
-	dbg("s3c24xx_serial_get_options: port=%p\n"
-	    "registers: ulcon=%08x, ucon=%08x, ubdriv=%08x\n",
-	    port, ulcon, ucon, ubrdiv);
-
 	if (s3c24xx_port_configured(ucon)) {
 		switch (ulcon & S3C2410_LCON_CSMASK) {
 		case S3C2410_LCON_CS5:
@@ -2334,9 +2317,6 @@ s3c24xx_serial_console_setup(struct console *co, char *options)
 	int parity = 'n';
 	int flow = 'n';
 
-	dbg("s3c24xx_serial_console_setup: co=%p (%d), %s\n",
-	    co, co->index, options);
-
 	/* is this a valid port */
 
 	if (co->index == -1 || co->index >= CONFIG_SERIAL_SAMSUNG_UARTS)
@@ -2351,8 +2331,6 @@ s3c24xx_serial_console_setup(struct console *co, char *options)
 
 	cons_uart = port;
 
-	dbg("s3c24xx_serial_console_setup: port=%p (%d)\n", port, co->index);
-
 	/*
 	 * Check whether an invalid uart number has been specified, and
 	 * if so, search for the first available port that does have
-- 
2.24.0


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

* [PATCH 07/10] tty: serial: samsung_tty: use standard debugging macros
  2019-12-10 14:36 [PATCH 01/10] tty: serial: samsung: allow driver to be built by anyone Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2019-12-10 14:37 ` [PATCH 06/10] tty: serial: samsung_tty: drop unneded dbg() calls Greg Kroah-Hartman
@ 2019-12-10 14:37 ` Greg Kroah-Hartman
  2019-12-10 15:10   ` Krzysztof Kozlowski
  2019-12-10 14:37 ` [PATCH 08/10] tty: serial: samsung_tty: use 'unsigned int' not 'unsigned' Greg Kroah-Hartman
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 30+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-10 14:37 UTC (permalink / raw)
  To: linux-serial
  Cc: Greg Kroah-Hartman, Kukjin Kim, Krzysztof Kozlowski, Hyunki Koo,
	HYUN-KI KOO, Shinbeom Choi, Jiri Slaby, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

The dbg() macro for the driver is not needed at all, all drivers should
use the common dynamic debugging infrastructure, not roll their own.  So
delete the custom macro and convert the driver to use dev_dbg() instead,
providing a lot more information than the previous macro provided.

Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Hyunki Koo <kkoos00@naver.com>
Cc: HYUN-KI KOO <hyunki00.koo@samsung.com>
Cc: Shinbeom Choi <sbeom.choi@samsung.com>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/tty/serial/samsung_tty.c | 78 ++++++++++++--------------------
 1 file changed, 30 insertions(+), 48 deletions(-)

diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index 37749f09066d..12f6b2872076 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -46,28 +46,6 @@
 #include <linux/of.h>
 #include <asm/irq.h>
 
-#if	defined(CONFIG_SERIAL_SAMSUNG_DEBUG) &&	\
-	!defined(MODULE)
-
-extern void printascii(const char *);
-
-__printf(1, 2)
-static void dbg(const char *fmt, ...)
-{
-	va_list va;
-	char buff[256];
-
-	va_start(va, fmt);
-	vscnprintf(buff, sizeof(buff), fmt, va);
-	va_end(va);
-
-	printascii(buff);
-}
-
-#else
-#define dbg(fmt, ...) do { if (0) no_printk(fmt, ##__VA_ARGS__); } while (0)
-#endif
-
 /* UART name and device definitions */
 
 #define S3C24XX_SERIAL_NAME	"ttySAC"
@@ -517,7 +495,7 @@ static void s3c24xx_serial_stop_rx(struct uart_port *port)
 	unsigned int received;
 
 	if (rx_enabled(port)) {
-		dbg("s3c24xx_serial_stop_rx: port=%p\n", port);
+		dev_dbg(port->dev, "stopping rx\n");
 		if (s3c24xx_serial_has_interrupt_mask(port))
 			s3c24xx_set_bit(port, S3C64XX_UINTM_RXD,
 					S3C64XX_UINTM);
@@ -768,12 +746,13 @@ static void s3c24xx_serial_rx_drain_fifo(struct s3c24xx_uart_port *ourport)
 		port->icount.rx++;
 
 		if (unlikely(uerstat & S3C2410_UERSTAT_ANY)) {
-			dbg("rxerr: port ch=0x%02x, rxs=0x%08x\n",
-			    ch, uerstat);
+			dev_dbg(port->dev,
+				"rxerr: port ch=0x%02x, rxs=0x%08x\n",
+				ch, uerstat);
 
 			/* check for break */
 			if (uerstat & S3C2410_UERSTAT_BREAK) {
-				dbg("break!\n");
+				dev_dbg(port->dev, "break!\n");
 				port->icount.brk++;
 				if (uart_handle_break(port))
 					continue; /* Ignore character */
@@ -1148,7 +1127,7 @@ static int s3c24xx_serial_startup(struct uart_port *port)
 
 	ourport->rx_claimed = 1;
 
-	dbg("requesting tx irq...\n");
+	dev_dbg(port->dev, "requesting tx irq...\n");
 
 	tx_enabled(port) = 1;
 
@@ -1433,29 +1412,30 @@ static void s3c24xx_serial_set_termios(struct uart_port *port,
 
 		if (cfg->has_fracval) {
 			udivslot = (div & 15);
-			dbg("fracval = %04x\n", udivslot);
+			dev_dbg(port->dev, "fracval = %04x\n", udivslot);
 		} else {
 			udivslot = udivslot_table[div & 15];
-			dbg("udivslot = %04x (div %d)\n", udivslot, div & 15);
+			dev_dbg(port->dev, "udivslot = %04x (div %d)\n",
+				udivslot, div & 15);
 		}
 	}
 
 	switch (termios->c_cflag & CSIZE) {
 	case CS5:
-		dbg("config: 5bits/char\n");
+		dev_dbg(port->dev, "config: 5bits/char\n");
 		ulcon = S3C2410_LCON_CS5;
 		break;
 	case CS6:
-		dbg("config: 6bits/char\n");
+		dev_dbg(port->dev, "config: 6bits/char\n");
 		ulcon = S3C2410_LCON_CS6;
 		break;
 	case CS7:
-		dbg("config: 7bits/char\n");
+		dev_dbg(port->dev, "config: 7bits/char\n");
 		ulcon = S3C2410_LCON_CS7;
 		break;
 	case CS8:
 	default:
-		dbg("config: 8bits/char\n");
+		dev_dbg(port->dev, "config: 8bits/char\n");
 		ulcon = S3C2410_LCON_CS8;
 		break;
 	}
@@ -1477,8 +1457,9 @@ static void s3c24xx_serial_set_termios(struct uart_port *port,
 
 	spin_lock_irqsave(&port->lock, flags);
 
-	dbg("setting ulcon to %08x, brddiv to %d, udivslot %08x\n",
-	    ulcon, quot, udivslot);
+	dev_dbg(port->dev,
+		"setting ulcon to %08x, brddiv to %d, udivslot %08x\n",
+		ulcon, quot, udivslot);
 
 	wr_regl(port, S3C2410_ULCON, ulcon);
 	wr_regl(port, S3C2410_UBRDIV, quot);
@@ -1499,10 +1480,11 @@ static void s3c24xx_serial_set_termios(struct uart_port *port,
 	if (ourport->info->has_divslot)
 		wr_regl(port, S3C2443_DIVSLOT, udivslot);
 
-	dbg("uart: ulcon = 0x%08x, ucon = 0x%08x, ufcon = 0x%08x\n",
-	    rd_regl(port, S3C2410_ULCON),
-	    rd_regl(port, S3C2410_UCON),
-	    rd_regl(port, S3C2410_UFCON));
+	dev_dbg(port->dev,
+		"uart: ulcon = 0x%08x, ucon = 0x%08x, ufcon = 0x%08x\n",
+		rd_regl(port, S3C2410_ULCON),
+		rd_regl(port, S3C2410_UCON),
+		rd_regl(port, S3C2410_UFCON));
 
 	/*
 	 * Update the per-port timeout.
@@ -1877,7 +1859,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
 	port->uartclk = 1;
 
 	if (cfg->uart_flags & UPF_CONS_FLOW) {
-		dbg("s3c24xx_serial_init_port: enabling flow control\n");
+		dev_dbg(port->dev, "enabling flow control\n");
 		port->flags |= UPF_CONS_FLOW;
 	}
 
@@ -1889,7 +1871,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
 		return -EINVAL;
 	}
 
-	dbg("resource %pR)\n", res);
+	dev_dbg(port->dev, "resource %pR)\n", res);
 
 	port->membase = devm_ioremap(port->dev, res->start, resource_size(res));
 	if (!port->membase) {
@@ -1951,9 +1933,9 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
 		wr_regl(port, S3C64XX_UINTSP, 0xf);
 	}
 
-	dbg("port: map=%pa, mem=%p, irq=%d (%d,%d), clock=%u\n",
-	    &port->mapbase, port->membase, port->irq,
-	    ourport->rx_irq, ourport->tx_irq, port->uartclk);
+	dev_dbg(port->dev, "port: map=%pa, mem=%p, irq=%d (%d,%d), clock=%u\n",
+		&port->mapbase, port->membase, port->irq,
+		ourport->rx_irq, ourport->tx_irq, port->uartclk);
 
 	/* reset the fifos (and setup the uart) */
 	s3c24xx_serial_resetport(port, cfg);
@@ -2034,7 +2016,7 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)
 	ourport->min_dma_size = max_t(int, ourport->port.fifosize,
 				    dma_get_cache_alignment());
 
-	dbg("%s: initialising port %p...\n", __func__, ourport);
+	dev_dbg(&pdev->dev, "%s: initialising port %p...\n", __func__, ourport);
 
 	ret = s3c24xx_serial_init_port(ourport, pdev);
 	if (ret < 0)
@@ -2048,7 +2030,7 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)
 		}
 	}
 
-	dbg("%s: adding port\n", __func__);
+	dev_dbg(&pdev->dev, "%s: adding port\n", __func__);
 	uart_add_one_port(&s3c24xx_uart_drv, &ourport->port);
 	platform_set_drvdata(pdev, &ourport->port);
 
@@ -2303,7 +2285,7 @@ s3c24xx_serial_get_options(struct uart_port *port, int *baud,
 			rate = 1;
 
 		*baud = rate / (16 * (ubrdiv + 1));
-		dbg("calculated baud %d\n", *baud);
+		dev_dbg(port->dev, "calculated baud %d\n", *baud);
 	}
 
 }
@@ -2341,7 +2323,7 @@ s3c24xx_serial_console_setup(struct console *co, char *options)
 	else
 		s3c24xx_serial_get_options(port, &baud, &parity, &bits);
 
-	dbg("s3c24xx_serial_console_setup: baud %d\n", baud);
+	dev_dbg(port->dev, "baud %d\n", baud);
 
 	return uart_set_options(port, co, baud, parity, bits, flow);
 }
-- 
2.24.0


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

* [PATCH 08/10] tty: serial: samsung_tty: use 'unsigned int' not 'unsigned'
  2019-12-10 14:36 [PATCH 01/10] tty: serial: samsung: allow driver to be built by anyone Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2019-12-10 14:37 ` [PATCH 07/10] tty: serial: samsung_tty: use standard debugging macros Greg Kroah-Hartman
@ 2019-12-10 14:37 ` Greg Kroah-Hartman
  2019-12-10 15:10   ` Krzysztof Kozlowski
  2019-12-10 15:12   ` Marc Gonzalez
  2019-12-10 14:37 ` [PATCH 09/10] tty: serial: samsung_tty: fix up minor comment formatting Greg Kroah-Hartman
                   ` (2 subsequent siblings)
  9 siblings, 2 replies; 30+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-10 14:37 UTC (permalink / raw)
  To: linux-serial
  Cc: Greg Kroah-Hartman, Kukjin Kim, Krzysztof Kozlowski, Hyunki Koo,
	HYUN-KI KOO, Shinbeom Choi, Jiri Slaby, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

The function uart_console_write() expects an unsigned int, so use that
variable type, not 'unsigned', which is generally frowned apon in the
kernel now.

Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Hyunki Koo <kkoos00@naver.com>
Cc: HYUN-KI KOO <hyunki00.koo@samsung.com>
Cc: Shinbeom Choi <sbeom.choi@samsung.com>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/tty/serial/samsung_tty.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index 12f6b2872076..3dfb4f37ec69 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -2613,7 +2613,8 @@ static void samsung_early_putc(struct uart_port *port, int c)
 	writeb(c, port->membase + S3C2410_UTXH);
 }
 
-static void samsung_early_write(struct console *con, const char *s, unsigned n)
+static void samsung_early_write(struct console *con, const char *s,
+				unsigned int n)
 {
 	struct earlycon_device *dev = con->data;
 
-- 
2.24.0


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

* [PATCH 09/10] tty: serial: samsung_tty: fix up minor comment formatting
  2019-12-10 14:36 [PATCH 01/10] tty: serial: samsung: allow driver to be built by anyone Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2019-12-10 14:37 ` [PATCH 08/10] tty: serial: samsung_tty: use 'unsigned int' not 'unsigned' Greg Kroah-Hartman
@ 2019-12-10 14:37 ` Greg Kroah-Hartman
  2019-12-10 15:14   ` Krzysztof Kozlowski
  2019-12-10 14:37 ` [PATCH 10/10] tty: serial: samsung_tty: fix blank line checkpatch warning Greg Kroah-Hartman
  2019-12-10 14:46 ` [PATCH 01/10] tty: serial: samsung: allow driver to be built by anyone Krzysztof Kozlowski
  9 siblings, 1 reply; 30+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-10 14:37 UTC (permalink / raw)
  To: linux-serial
  Cc: Greg Kroah-Hartman, Kukjin Kim, Krzysztof Kozlowski, Hyunki Koo,
	HYUN-KI KOO, Shinbeom Choi, Jiri Slaby, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

Fix up some minor formatting of comment blocks to make checkpatch
happier and to make things look more uniform.

Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Hyunki Koo <kkoos00@naver.com>
Cc: HYUN-KI KOO <hyunki00.koo@samsung.com>
Cc: Shinbeom Choi <sbeom.choi@samsung.com>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/tty/serial/samsung_tty.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index 3dfb4f37ec69..4aebed241068 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -4,7 +4,7 @@
  *
  * Ben Dooks, Copyright (c) 2003-2008 Simtec Electronics
  *	http://armlinux.simtec.co.uk/
-*/
+ */
 
 /* Hote on 2410 error handling
  *
@@ -19,7 +19,7 @@
  * and change the policy on BREAK
  *
  * BJD, 04-Nov-2004
-*/
+ */
 
 #if defined(CONFIG_SERIAL_SAMSUNG_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
 #define SUPPORT_SYSRQ
@@ -838,7 +838,7 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id)
 
 	/* if there isn't anything more to transmit, or the uart is now
 	 * stopped, disable the uart and exit
-	*/
+	 */
 
 	if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
 		s3c24xx_serial_stop_tx(port);
@@ -1142,7 +1142,8 @@ static int s3c24xx_serial_startup(struct uart_port *port)
 	ourport->tx_claimed = 1;
 
 	/* the port reset code should have done the correct
-	 * register setup for the port controls */
+	 * register setup for the port controls
+	 */
 
 	return ret;
 
@@ -1242,7 +1243,7 @@ static void s3c24xx_serial_pm(struct uart_port *port, unsigned int level,
  * baud clocks (and the resultant actual baud rates) and then tries to
  * pick the closest one and select that.
  *
-*/
+ */
 
 #define MAX_CLK_NAME_LENGTH 15
 
@@ -1683,7 +1684,7 @@ s3c24xx_serial_ports[CONFIG_SERIAL_SAMSUNG_UARTS] = {
 /* s3c24xx_serial_resetport
  *
  * reset the fifos and other the settings.
-*/
+ */
 
 static void s3c24xx_serial_resetport(struct uart_port *port,
 				   struct s3c2410_uartcfg *cfg)
@@ -1737,7 +1738,8 @@ static int s3c24xx_serial_cpufreq_transition(struct notifier_block *nb,
 
 	if (val == CPUFREQ_PRECHANGE) {
 		/* we should really shut the port down whilst the
-		 * frequency change is in progress. */
+		 * frequency change is in progress.
+		 */
 
 	} else if (val == CPUFREQ_POSTCHANGE) {
 		struct ktermios *termios;
-- 
2.24.0


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

* [PATCH 10/10] tty: serial: samsung_tty: fix blank line checkpatch warning
  2019-12-10 14:36 [PATCH 01/10] tty: serial: samsung: allow driver to be built by anyone Greg Kroah-Hartman
                   ` (7 preceding siblings ...)
  2019-12-10 14:37 ` [PATCH 09/10] tty: serial: samsung_tty: fix up minor comment formatting Greg Kroah-Hartman
@ 2019-12-10 14:37 ` Greg Kroah-Hartman
  2019-12-10 15:13   ` Krzysztof Kozlowski
  2019-12-10 14:46 ` [PATCH 01/10] tty: serial: samsung: allow driver to be built by anyone Krzysztof Kozlowski
  9 siblings, 1 reply; 30+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-10 14:37 UTC (permalink / raw)
  To: linux-serial
  Cc: Greg Kroah-Hartman, Kukjin Kim, Krzysztof Kozlowski, Hyunki Koo,
	HYUN-KI KOO, Shinbeom Choi, Jiri Slaby, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

checkpatch is giving a bunch of:
	WARNING: Missing a blank line after declarations
messages on this file, so fix up all instances of that issue.

Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Hyunki Koo <kkoos00@naver.com>
Cc: HYUN-KI KOO <hyunki00.koo@samsung.com>
Cc: Shinbeom Choi <sbeom.choi@samsung.com>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/tty/serial/samsung_tty.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index 4aebed241068..d5c75d288498 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -1543,6 +1543,7 @@ static void s3c24xx_serial_release_port(struct uart_port *port)
 static int s3c24xx_serial_request_port(struct uart_port *port)
 {
 	const char *name = s3c24xx_serial_portname(port);
+
 	return request_mem_region(port->mapbase, MAP_SIZE, name) ? 0 : -EBUSY;
 }
 
@@ -1963,6 +1964,7 @@ static inline struct s3c24xx_serial_drv_data *s3c24xx_get_driver_data(
 #ifdef CONFIG_OF
 	if (pdev->dev.of_node) {
 		const struct of_device_id *match;
+
 		match = of_match_node(s3c24xx_uart_dt_match, pdev->dev.of_node);
 		return (struct s3c24xx_serial_drv_data *)match->data;
 	}
@@ -2109,6 +2111,7 @@ static int s3c24xx_serial_resume_noirq(struct device *dev)
 		/* restore IRQ mask */
 		if (s3c24xx_serial_has_interrupt_mask(port)) {
 			unsigned int uintm = 0xf;
+
 			if (tx_enabled(port))
 				uintm &= ~S3C64XX_UINTM_TXD_MSK;
 			if (rx_enabled(port))
-- 
2.24.0


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

* Re: [PATCH 01/10] tty: serial: samsung: allow driver to be built by anyone
  2019-12-10 14:36 [PATCH 01/10] tty: serial: samsung: allow driver to be built by anyone Greg Kroah-Hartman
                   ` (8 preceding siblings ...)
  2019-12-10 14:37 ` [PATCH 10/10] tty: serial: samsung_tty: fix blank line checkpatch warning Greg Kroah-Hartman
@ 2019-12-10 14:46 ` Krzysztof Kozlowski
  2019-12-10 14:54   ` Greg Kroah-Hartman
  9 siblings, 1 reply; 30+ messages in thread
From: Krzysztof Kozlowski @ 2019-12-10 14:46 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-serial, Kukjin Kim, Hyunki Koo, HYUN-KI KOO, Shinbeom Choi,
	Jiri Slaby, linux-arm-kernel, linux-samsung-soc, linux-kernel

On Tue, Dec 10, 2019 at 03:36:57PM +0100, Greg Kroah-Hartman wrote:
> There is no need to tie this driver to only the OMAP platform,

s/OMAP/Exynos/

Beside that:
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof


> especially for build testing.  So add COMPILE_TEST as an option allowing
> it to be built on any platform.
> 
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Hyunki Koo <kkoos00@naver.com>
> Cc: HYUN-KI KOO <hyunki00.koo@samsung.com>
> Cc: Shinbeom Choi <sbeom.choi@samsung.com>
> Cc: Jiri Slaby <jslaby@suse.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-serial@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/tty/serial/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
> index 99f5da3bf913..c835e10bd97e 100644
> --- a/drivers/tty/serial/Kconfig
> +++ b/drivers/tty/serial/Kconfig
> @@ -237,7 +237,7 @@ config SERIAL_CLPS711X_CONSOLE
>  
>  config SERIAL_SAMSUNG
>  	tristate "Samsung SoC serial support"
> -	depends on PLAT_SAMSUNG || ARCH_EXYNOS
> +	depends on PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST
>  	select SERIAL_CORE
>  	help
>  	  Support for the on-chip UARTs on the Samsung S3C24XX series CPUs,
> -- 
> 2.24.0
> 

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

* Re: [PATCH 02/10] tty: serial: samsung_tty: fix build warning
  2019-12-10 14:36 ` [PATCH 02/10] tty: serial: samsung_tty: fix build warning Greg Kroah-Hartman
@ 2019-12-10 14:48   ` Krzysztof Kozlowski
  2019-12-11 11:01   ` Enrico Weigelt, metux IT consult
  1 sibling, 0 replies; 30+ messages in thread
From: Krzysztof Kozlowski @ 2019-12-10 14:48 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-serial, Kukjin Kim, Hyunki Koo, HYUN-KI KOO, Shinbeom Choi,
	Jiri Slaby, linux-arm-kernel, linux-samsung-soc, linux-kernel

On Tue, Dec 10, 2019 at 03:36:58PM +0100, Greg Kroah-Hartman wrote:
> Fix a build warning on systems that do not have CONFIG_OF enabled.
> 

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof


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

* Re: [PATCH 04/10] tty: serial: samsung.h: remove reset_port callback from struct s3c24xx_uart_info
  2019-12-10 14:37 ` [PATCH 04/10] tty: serial: samsung.h: remove reset_port callback from struct s3c24xx_uart_info Greg Kroah-Hartman
@ 2019-12-10 14:50   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 30+ messages in thread
From: Krzysztof Kozlowski @ 2019-12-10 14:50 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-serial, Kukjin Kim, Hyunki Koo, HYUN-KI KOO, Shinbeom Choi,
	Jiri Slaby, linux-arm-kernel, linux-samsung-soc, linux-kernel

On Tue, Dec 10, 2019 at 03:37:00PM +0100, Greg Kroah-Hartman wrote:
> The callback was never set, nor called, so remove the pointer entirely
> from struct s3c24xx_uart_info.

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof


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

* Re: [PATCH 05/10] tty: serial: samsung_tty: delete samsung.h
  2019-12-10 14:37 ` [PATCH 05/10] tty: serial: samsung_tty: delete samsung.h Greg Kroah-Hartman
@ 2019-12-10 14:52   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 30+ messages in thread
From: Krzysztof Kozlowski @ 2019-12-10 14:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-serial, Kukjin Kim, Hyunki Koo, HYUN-KI KOO, Shinbeom Choi,
	Jiri Slaby, linux-arm-kernel, linux-samsung-soc, linux-kernel

On Tue, Dec 10, 2019 at 03:37:01PM +0100, Greg Kroah-Hartman wrote:
> There is no need for a .h file for a single .c file, so just move all of
> the content of samsung.h into samsung_tty.c
> 
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Hyunki Koo <kkoos00@naver.com>
> Cc: HYUN-KI KOO <hyunki00.koo@samsung.com>
> Cc: Shinbeom Choi <sbeom.choi@samsung.com>
> Cc: Jiri Slaby <jslaby@suse.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-serial@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/tty/serial/samsung.h     | 144 -------------------------------
>  drivers/tty/serial/samsung_tty.c | 133 +++++++++++++++++++++++++++-
>  2 files changed, 130 insertions(+), 147 deletions(-)
>  delete mode 100644 drivers/tty/serial/samsung.h

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof


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

* Re: [PATCH 06/10] tty: serial: samsung_tty: drop unneded dbg() calls
  2019-12-10 14:37 ` [PATCH 06/10] tty: serial: samsung_tty: drop unneded dbg() calls Greg Kroah-Hartman
@ 2019-12-10 14:53   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 30+ messages in thread
From: Krzysztof Kozlowski @ 2019-12-10 14:53 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-serial, Kukjin Kim, Hyunki Koo, HYUN-KI KOO, Shinbeom Choi,
	Jiri Slaby, linux-arm-kernel, linux-samsung-soc, linux-kernel

On Tue, Dec 10, 2019 at 03:37:02PM +0100, Greg Kroah-Hartman wrote:
> Now that the kernel has ftrace, any debugging calls that just do "made
> it to this function!" and "leaving this function!" can be removed.
> 
> On the quest to move the samsung_tty driver over to use the standard
> kernel debugging functions, drop these unneeded calls.
> 
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Hyunki Koo <kkoos00@naver.com>
> Cc: HYUN-KI KOO <hyunki00.koo@samsung.com>
> Cc: Shinbeom Choi <sbeom.choi@samsung.com>
> Cc: Jiri Slaby <jslaby@suse.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-serial@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/tty/serial/samsung_tty.c | 22 ----------------------
>  1 file changed, 22 deletions(-)

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof


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

* Re: [PATCH 01/10] tty: serial: samsung: allow driver to be built by anyone
  2019-12-10 14:46 ` [PATCH 01/10] tty: serial: samsung: allow driver to be built by anyone Krzysztof Kozlowski
@ 2019-12-10 14:54   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 30+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-10 14:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-serial, Kukjin Kim, Hyunki Koo, HYUN-KI KOO, Shinbeom Choi,
	Jiri Slaby, linux-arm-kernel, linux-samsung-soc, linux-kernel

On Tue, Dec 10, 2019 at 03:46:56PM +0100, Krzysztof Kozlowski wrote:
> On Tue, Dec 10, 2019 at 03:36:57PM +0100, Greg Kroah-Hartman wrote:
> > There is no need to tie this driver to only the OMAP platform,
> 
> s/OMAP/Exynos/

Oops, sorry, was thinking of another driver :)

> Beside that:
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Thanks for the review, will fix up the text in here when I apply this.

greg k-h

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

* Re: [PATCH 07/10] tty: serial: samsung_tty: use standard debugging macros
  2019-12-10 14:37 ` [PATCH 07/10] tty: serial: samsung_tty: use standard debugging macros Greg Kroah-Hartman
@ 2019-12-10 15:10   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 30+ messages in thread
From: Krzysztof Kozlowski @ 2019-12-10 15:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-serial, Kukjin Kim, Hyunki Koo, HYUN-KI KOO, Shinbeom Choi,
	Jiri Slaby, linux-arm-kernel, linux-samsung-soc, linux-kernel

On Tue, Dec 10, 2019 at 03:37:03PM +0100, Greg Kroah-Hartman wrote:
> The dbg() macro for the driver is not needed at all, all drivers should
> use the common dynamic debugging infrastructure, not roll their own.  So
> delete the custom macro and convert the driver to use dev_dbg() instead,
> providing a lot more information than the previous macro provided.
> 

Since now we have early console this should be functionally equal and
makes sense.

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof


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

* Re: [PATCH 08/10] tty: serial: samsung_tty: use 'unsigned int' not 'unsigned'
  2019-12-10 14:37 ` [PATCH 08/10] tty: serial: samsung_tty: use 'unsigned int' not 'unsigned' Greg Kroah-Hartman
@ 2019-12-10 15:10   ` Krzysztof Kozlowski
  2019-12-10 15:12   ` Marc Gonzalez
  1 sibling, 0 replies; 30+ messages in thread
From: Krzysztof Kozlowski @ 2019-12-10 15:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-serial, Kukjin Kim, Hyunki Koo, HYUN-KI KOO, Shinbeom Choi,
	Jiri Slaby, linux-arm-kernel, linux-samsung-soc, linux-kernel

On Tue, Dec 10, 2019 at 03:37:04PM +0100, Greg Kroah-Hartman wrote:
> The function uart_console_write() expects an unsigned int, so use that
> variable type, not 'unsigned', which is generally frowned apon in the
> kernel now.

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof


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

* Re: [PATCH 03/10] tty: serial: samsung.h: fix up minor comment issues
  2019-12-10 14:36 ` [PATCH 03/10] tty: serial: samsung.h: fix up minor comment issues Greg Kroah-Hartman
@ 2019-12-10 15:12   ` Krzysztof Kozlowski
  2019-12-12 11:06     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 30+ messages in thread
From: Krzysztof Kozlowski @ 2019-12-10 15:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-serial, Kukjin Kim, Hyunki Koo, HYUN-KI KOO, Shinbeom Choi,
	Jiri Slaby, linux-arm-kernel, linux-samsung-soc, linux-kernel

On Tue, Dec 10, 2019 at 03:36:59PM +0100, Greg Kroah-Hartman wrote:
> checkpatch found some minor issues with comments in samsung.h, so fix
> that up.
>

No, you remove this header two patches later. No point to fix checkpatch
issues here.

Best regards,
Krzysztof


> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Hyunki Koo <kkoos00@naver.com>
> Cc: HYUN-KI KOO <hyunki00.koo@samsung.com>
> Cc: Shinbeom Choi <sbeom.choi@samsung.com>
> Cc: Jiri Slaby <jslaby@suse.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-serial@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/tty/serial/samsung.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/samsung.h b/drivers/tty/serial/samsung.h
> index f93022113f59..cdfd53acead3 100644
> --- a/drivers/tty/serial/samsung.h
> +++ b/drivers/tty/serial/samsung.h
> @@ -1,4 +1,4 @@
> -// SPDX-License-Identifier: GPL-2.0
> +/* SPDX-License-Identifier: GPL-2.0 */
>  #ifndef __SAMSUNG_H
>  #define __SAMSUNG_H
>  
> @@ -7,7 +7,7 @@
>   *
>   * Ben Dooks, Copyright (c) 2003-2008 Simtec Electronics
>   *	http://armlinux.simtec.co.uk/
> -*/
> + */
>  
>  #include <linux/dmaengine.h>
>  
> -- 
> 2.24.0
> 

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

* Re: [PATCH 08/10] tty: serial: samsung_tty: use 'unsigned int' not 'unsigned'
  2019-12-10 14:37 ` [PATCH 08/10] tty: serial: samsung_tty: use 'unsigned int' not 'unsigned' Greg Kroah-Hartman
  2019-12-10 15:10   ` Krzysztof Kozlowski
@ 2019-12-10 15:12   ` Marc Gonzalez
  2019-12-12 11:08     ` Greg Kroah-Hartman
  1 sibling, 1 reply; 30+ messages in thread
From: Marc Gonzalez @ 2019-12-10 15:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-serial; +Cc: Jiri Slaby, Linux ARM, LKML

[ Trim recipients list ]

On 10/12/2019 15:37, Greg Kroah-Hartman wrote:

> The function uart_console_write() expects an unsigned int, so use that
> variable type, not 'unsigned', which is generally frowned apon in the
> kernel now.

"frowned upon"

Wait, what?!

'unsigned' and 'unsigned int' are the same type, if I remember my C
lessons correctly.

Is this a uniformization issue?

Regards.

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

* Re: [PATCH 10/10] tty: serial: samsung_tty: fix blank line checkpatch warning
  2019-12-10 14:37 ` [PATCH 10/10] tty: serial: samsung_tty: fix blank line checkpatch warning Greg Kroah-Hartman
@ 2019-12-10 15:13   ` Krzysztof Kozlowski
  2019-12-12 11:09     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 30+ messages in thread
From: Krzysztof Kozlowski @ 2019-12-10 15:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-serial, Kukjin Kim, Hyunki Koo, HYUN-KI KOO, Shinbeom Choi,
	Jiri Slaby, linux-arm-kernel, linux-samsung-soc, linux-kernel

On Tue, Dec 10, 2019 at 03:37:06PM +0100, Greg Kroah-Hartman wrote:
> checkpatch is giving a bunch of:
> 	WARNING: Missing a blank line after declarations
> messages on this file, so fix up all instances of that issue.

I would prefer to squash it with previous. These are not bugs, just
minor coding style violations so there is no point to split it per
patch. Too much churn.

Best regards,
Krzysztof

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

* Re: [PATCH 09/10] tty: serial: samsung_tty: fix up minor comment formatting
  2019-12-10 14:37 ` [PATCH 09/10] tty: serial: samsung_tty: fix up minor comment formatting Greg Kroah-Hartman
@ 2019-12-10 15:14   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 30+ messages in thread
From: Krzysztof Kozlowski @ 2019-12-10 15:14 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-serial, Kukjin Kim, Hyunki Koo, HYUN-KI KOO, Shinbeom Choi,
	Jiri Slaby, linux-arm-kernel, linux-samsung-soc, linux-kernel

On Tue, Dec 10, 2019 at 03:37:05PM +0100, Greg Kroah-Hartman wrote:
> Fix up some minor formatting of comment blocks to make checkpatch
> happier and to make things look more uniform.
> 
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Hyunki Koo <kkoos00@naver.com>
> Cc: HYUN-KI KOO <hyunki00.koo@samsung.com>
> Cc: Shinbeom Choi <sbeom.choi@samsung.com>
> Cc: Jiri Slaby <jslaby@suse.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-serial@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/tty/serial/samsung_tty.c | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
(also if combined with next one)

Best regards,
Krzysztof


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

* Re: [PATCH 02/10] tty: serial: samsung_tty: fix build warning
  2019-12-10 14:36 ` [PATCH 02/10] tty: serial: samsung_tty: fix build warning Greg Kroah-Hartman
  2019-12-10 14:48   ` Krzysztof Kozlowski
@ 2019-12-11 11:01   ` Enrico Weigelt, metux IT consult
  2019-12-11 12:13     ` Greg Kroah-Hartman
  1 sibling, 1 reply; 30+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-12-11 11:01 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-serial
  Cc: Kukjin Kim, Krzysztof Kozlowski, Hyunki Koo, HYUN-KI KOO,
	Shinbeom Choi, Jiri Slaby, linux-arm-kernel, linux-samsung-soc,
	linux-kernel

On 10.12.19 15:36, Greg Kroah-Hartman wrote:

Hi,

> diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
> index 83fd51607741..67c5a84d0a26 100644
> --- a/drivers/tty/serial/samsung_tty.c
> +++ b/drivers/tty/serial/samsung_tty.c
> @@ -1851,7 +1851,10 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
>  
>  /* Device driver serial port probe */
>  
> +#ifdef CONFIG_OF
>  static const struct of_device_id s3c24xx_uart_dt_match[];
> +#endif
> +

By the way: I've got some patch for conditionally declaring of match
tables (including MODULE_DEVICE_TABE() call), so such ifdef's aren't
needed anymore.

Would you like to see it ?
(IIRC already posted it quite some time ago, but probably went
unnoticed)


--mtx

---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

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

* Re: [PATCH 02/10] tty: serial: samsung_tty: fix build warning
  2019-12-11 11:01   ` Enrico Weigelt, metux IT consult
@ 2019-12-11 12:13     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 30+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 12:13 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult
  Cc: linux-serial, Kukjin Kim, Krzysztof Kozlowski, Hyunki Koo,
	HYUN-KI KOO, Shinbeom Choi, Jiri Slaby, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

On Wed, Dec 11, 2019 at 12:01:28PM +0100, Enrico Weigelt, metux IT consult wrote:
> On 10.12.19 15:36, Greg Kroah-Hartman wrote:
> 
> Hi,
> 
> > diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
> > index 83fd51607741..67c5a84d0a26 100644
> > --- a/drivers/tty/serial/samsung_tty.c
> > +++ b/drivers/tty/serial/samsung_tty.c
> > @@ -1851,7 +1851,10 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
> >  
> >  /* Device driver serial port probe */
> >  
> > +#ifdef CONFIG_OF
> >  static const struct of_device_id s3c24xx_uart_dt_match[];
> > +#endif
> > +
> 
> By the way: I've got some patch for conditionally declaring of match
> tables (including MODULE_DEVICE_TABE() call), so such ifdef's aren't
> needed anymore.

That's not why this #ifdef is needed.

greg k-h

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

* Re: [PATCH 03/10] tty: serial: samsung.h: fix up minor comment issues
  2019-12-10 15:12   ` Krzysztof Kozlowski
@ 2019-12-12 11:06     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 30+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-12 11:06 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-serial, Kukjin Kim, Hyunki Koo, HYUN-KI KOO, Shinbeom Choi,
	Jiri Slaby, linux-arm-kernel, linux-samsung-soc, linux-kernel

On Tue, Dec 10, 2019 at 04:12:04PM +0100, Krzysztof Kozlowski wrote:
> On Tue, Dec 10, 2019 at 03:36:59PM +0100, Greg Kroah-Hartman wrote:
> > checkpatch found some minor issues with comments in samsung.h, so fix
> > that up.
> >
> 
> No, you remove this header two patches later. No point to fix checkpatch
> issues here.

It's nice to delete "clean" files :)


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

* Re: [PATCH 08/10] tty: serial: samsung_tty: use 'unsigned int' not 'unsigned'
  2019-12-10 15:12   ` Marc Gonzalez
@ 2019-12-12 11:08     ` Greg Kroah-Hartman
  2019-12-12 16:09       ` Christoph Hellwig
  0 siblings, 1 reply; 30+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-12 11:08 UTC (permalink / raw)
  To: Marc Gonzalez; +Cc: linux-serial, Jiri Slaby, Linux ARM, LKML

On Tue, Dec 10, 2019 at 04:12:07PM +0100, Marc Gonzalez wrote:
> [ Trim recipients list ]
> 
> On 10/12/2019 15:37, Greg Kroah-Hartman wrote:
> 
> > The function uart_console_write() expects an unsigned int, so use that
> > variable type, not 'unsigned', which is generally frowned apon in the
> > kernel now.
> 
> "frowned upon"
> 
> Wait, what?!
> 
> 'unsigned' and 'unsigned int' are the same type, if I remember my C
> lessons correctly.
> 
> Is this a uniformization issue?

Yes.  It's a long-time checkpatch warning, it's good to be explicit for
this type of thing.

thanks,

greg k-h

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

* Re: [PATCH 10/10] tty: serial: samsung_tty: fix blank line checkpatch warning
  2019-12-10 15:13   ` Krzysztof Kozlowski
@ 2019-12-12 11:09     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 30+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-12 11:09 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-serial, Kukjin Kim, Hyunki Koo, HYUN-KI KOO, Shinbeom Choi,
	Jiri Slaby, linux-arm-kernel, linux-samsung-soc, linux-kernel

On Tue, Dec 10, 2019 at 04:13:45PM +0100, Krzysztof Kozlowski wrote:
> On Tue, Dec 10, 2019 at 03:37:06PM +0100, Greg Kroah-Hartman wrote:
> > checkpatch is giving a bunch of:
> > 	WARNING: Missing a blank line after declarations
> > messages on this file, so fix up all instances of that issue.
> 
> I would prefer to squash it with previous. These are not bugs, just
> minor coding style violations so there is no point to split it per
> patch. Too much churn.

For coding style fixes, in staging, I require "one type of change per
patch" otherwise big "fix all the coding style issues" patches are
impossible to review.

Breaking it up into tiny pieces makes it easy/trivial to review, which
makes it easier for maintainers, which is the key here.  There is no
"churn".

thanks,

greg k-h

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

* Re: [PATCH 08/10] tty: serial: samsung_tty: use 'unsigned int' not 'unsigned'
  2019-12-12 11:08     ` Greg Kroah-Hartman
@ 2019-12-12 16:09       ` Christoph Hellwig
  2019-12-12 16:12         ` Greg Kroah-Hartman
  0 siblings, 1 reply; 30+ messages in thread
From: Christoph Hellwig @ 2019-12-12 16:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Marc Gonzalez, LKML, Linux ARM, linux-serial, Jiri Slaby

On Thu, Dec 12, 2019 at 12:08:34PM +0100, Greg Kroah-Hartman wrote:
> Yes.  It's a long-time checkpatch warning, it's good to be explicit for
> this type of thing.

There is literally no practical benefit going either way.  It is
just checkpatch forcing one personal opinion on people.

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

* Re: [PATCH 08/10] tty: serial: samsung_tty: use 'unsigned int' not 'unsigned'
  2019-12-12 16:09       ` Christoph Hellwig
@ 2019-12-12 16:12         ` Greg Kroah-Hartman
  2019-12-19  9:25           ` Marc Gonzalez
  0 siblings, 1 reply; 30+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-12 16:12 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Marc Gonzalez, LKML, Linux ARM, linux-serial, Jiri Slaby

On Thu, Dec 12, 2019 at 08:09:49AM -0800, Christoph Hellwig wrote:
> On Thu, Dec 12, 2019 at 12:08:34PM +0100, Greg Kroah-Hartman wrote:
> > Yes.  It's a long-time checkpatch warning, it's good to be explicit for
> > this type of thing.
> 
> There is literally no practical benefit going either way.  It is
> just checkpatch forcing one personal opinion on people.

Fair enough, but, I was trying to align up the variables to be the same
type that was then used in a function call.  That's the only reason I
made this change.

thanks,

greg k-h

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

* Re: [PATCH 08/10] tty: serial: samsung_tty: use 'unsigned int' not 'unsigned'
  2019-12-12 16:12         ` Greg Kroah-Hartman
@ 2019-12-19  9:25           ` Marc Gonzalez
  0 siblings, 0 replies; 30+ messages in thread
From: Marc Gonzalez @ 2019-12-19  9:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Christoph Hellwig
  Cc: LKML, Linux ARM, linux-serial, Jiri Slaby

On 12/12/2019 17:12, Greg Kroah-Hartman wrote:

> On Thu, Dec 12, 2019 at 08:09:49AM -0800, Christoph Hellwig wrote:
>
>> On Thu, Dec 12, 2019 at 12:08:34PM +0100, Greg Kroah-Hartman wrote:
>>
>>> Yes.  It's a long-time checkpatch warning, it's good to be explicit for
>>> this type of thing.
>>
>> There is literally no practical benefit going either way.  It is
>> just checkpatch forcing one personal opinion on people.
> 
> Fair enough, but, I was trying to align up the variables to be the same
> type that was then used in a function call.  That's the only reason I
> made this change.

Do you type 'long long unsigned int' for an ULL?

Regards.

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

end of thread, other threads:[~2019-12-19  9:25 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 14:36 [PATCH 01/10] tty: serial: samsung: allow driver to be built by anyone Greg Kroah-Hartman
2019-12-10 14:36 ` [PATCH 02/10] tty: serial: samsung_tty: fix build warning Greg Kroah-Hartman
2019-12-10 14:48   ` Krzysztof Kozlowski
2019-12-11 11:01   ` Enrico Weigelt, metux IT consult
2019-12-11 12:13     ` Greg Kroah-Hartman
2019-12-10 14:36 ` [PATCH 03/10] tty: serial: samsung.h: fix up minor comment issues Greg Kroah-Hartman
2019-12-10 15:12   ` Krzysztof Kozlowski
2019-12-12 11:06     ` Greg Kroah-Hartman
2019-12-10 14:37 ` [PATCH 04/10] tty: serial: samsung.h: remove reset_port callback from struct s3c24xx_uart_info Greg Kroah-Hartman
2019-12-10 14:50   ` Krzysztof Kozlowski
2019-12-10 14:37 ` [PATCH 05/10] tty: serial: samsung_tty: delete samsung.h Greg Kroah-Hartman
2019-12-10 14:52   ` Krzysztof Kozlowski
2019-12-10 14:37 ` [PATCH 06/10] tty: serial: samsung_tty: drop unneded dbg() calls Greg Kroah-Hartman
2019-12-10 14:53   ` Krzysztof Kozlowski
2019-12-10 14:37 ` [PATCH 07/10] tty: serial: samsung_tty: use standard debugging macros Greg Kroah-Hartman
2019-12-10 15:10   ` Krzysztof Kozlowski
2019-12-10 14:37 ` [PATCH 08/10] tty: serial: samsung_tty: use 'unsigned int' not 'unsigned' Greg Kroah-Hartman
2019-12-10 15:10   ` Krzysztof Kozlowski
2019-12-10 15:12   ` Marc Gonzalez
2019-12-12 11:08     ` Greg Kroah-Hartman
2019-12-12 16:09       ` Christoph Hellwig
2019-12-12 16:12         ` Greg Kroah-Hartman
2019-12-19  9:25           ` Marc Gonzalez
2019-12-10 14:37 ` [PATCH 09/10] tty: serial: samsung_tty: fix up minor comment formatting Greg Kroah-Hartman
2019-12-10 15:14   ` Krzysztof Kozlowski
2019-12-10 14:37 ` [PATCH 10/10] tty: serial: samsung_tty: fix blank line checkpatch warning Greg Kroah-Hartman
2019-12-10 15:13   ` Krzysztof Kozlowski
2019-12-12 11:09     ` Greg Kroah-Hartman
2019-12-10 14:46 ` [PATCH 01/10] tty: serial: samsung: allow driver to be built by anyone Krzysztof Kozlowski
2019-12-10 14:54   ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).