* [PATCH v2 0/5] auxdisplay: Introduce charlcd_free()
@ 2019-03-12 14:44 Andy Shevchenko
2019-03-12 14:44 ` [PATCH v2 1/5] auxdisplay: hd44780: Fix memory leak on ->remove() Andy Shevchenko
` (5 more replies)
0 siblings, 6 replies; 15+ messages in thread
From: Andy Shevchenko @ 2019-03-12 14:44 UTC (permalink / raw)
To: Miguel Ojeda Sandonis, Willy Tarreau, linux-kernel
Cc: Andy Shevchenko, Geert Uytterhoeven
I have found a memory leak in hd44780 and it becomes that we have no
counterpart to charlcd_alloc() that developers can easily miss.
So, this series fixes a leak and introduces the charlcd_free().
In v2:
- add new patch to convert to_priv() to charlcd_to_priv()
- address Geert's comment what should be freed
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Andy Shevchenko (5):
auxdisplay: hd44780: Fix memory leak on ->remove()
auxdisplay: charlcd: Move to_priv() to charlcd namespace
auxdisplay: charlcd: Introduce charlcd_free() helper
auxdisplay: panel: Convert to use charlcd_free()
auxdisplay: hd44780: Convert to use charlcd_free()
drivers/auxdisplay/charlcd.c | 32 +++++++++++++++++++-------------
drivers/auxdisplay/hd44780.c | 4 +++-
drivers/auxdisplay/panel.c | 4 ++--
include/misc/charlcd.h | 1 +
4 files changed, 25 insertions(+), 16 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 1/5] auxdisplay: hd44780: Fix memory leak on ->remove()
2019-03-12 14:44 [PATCH v2 0/5] auxdisplay: Introduce charlcd_free() Andy Shevchenko
@ 2019-03-12 14:44 ` Andy Shevchenko
2019-03-12 15:05 ` Geert Uytterhoeven
2019-03-12 14:44 ` [PATCH v2 2/5] auxdisplay: charlcd: Move to_priv() to charlcd namespace Andy Shevchenko
` (4 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Andy Shevchenko @ 2019-03-12 14:44 UTC (permalink / raw)
To: Miguel Ojeda Sandonis, Willy Tarreau, linux-kernel
Cc: Andy Shevchenko, Geert Uytterhoeven
We have to free on ->remove() the allocated resources on ->probe().
Fixes: d47d88361fee ("auxdisplay: Add HD44780 Character LCD support")
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/auxdisplay/hd44780.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/auxdisplay/hd44780.c b/drivers/auxdisplay/hd44780.c
index 9ad93ea42fdc..3cde351fb5c9 100644
--- a/drivers/auxdisplay/hd44780.c
+++ b/drivers/auxdisplay/hd44780.c
@@ -280,6 +280,8 @@ static int hd44780_remove(struct platform_device *pdev)
struct charlcd *lcd = platform_get_drvdata(pdev);
charlcd_unregister(lcd);
+
+ kfree(lcd);
return 0;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v2 2/5] auxdisplay: charlcd: Move to_priv() to charlcd namespace
2019-03-12 14:44 [PATCH v2 0/5] auxdisplay: Introduce charlcd_free() Andy Shevchenko
2019-03-12 14:44 ` [PATCH v2 1/5] auxdisplay: hd44780: Fix memory leak on ->remove() Andy Shevchenko
@ 2019-03-12 14:44 ` Andy Shevchenko
2019-03-12 15:07 ` Geert Uytterhoeven
2019-03-12 14:44 ` [PATCH v2 3/5] auxdisplay: charlcd: Introduce charlcd_free() helper Andy Shevchenko
` (3 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Andy Shevchenko @ 2019-03-12 14:44 UTC (permalink / raw)
To: Miguel Ojeda Sandonis, Willy Tarreau, linux-kernel
Cc: Andy Shevchenko, Geert Uytterhoeven
In order to be more particular in names, rename to_priv() macro
to charlcd_to_priv().
No functional change intended.
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/auxdisplay/charlcd.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c
index 60e0b772673f..407acd22efa8 100644
--- a/drivers/auxdisplay/charlcd.c
+++ b/drivers/auxdisplay/charlcd.c
@@ -91,7 +91,7 @@ struct charlcd_priv {
unsigned long long drvdata[0];
};
-#define to_priv(p) container_of(p, struct charlcd_priv, lcd)
+#define charlcd_to_priv(p) container_of(p, struct charlcd_priv, lcd)
/* Device single-open policy control */
static atomic_t charlcd_available = ATOMIC_INIT(1);
@@ -105,7 +105,7 @@ static void long_sleep(int ms)
/* turn the backlight on or off */
static void charlcd_backlight(struct charlcd *lcd, int on)
{
- struct charlcd_priv *priv = to_priv(lcd);
+ struct charlcd_priv *priv = charlcd_to_priv(lcd);
if (!lcd->ops->backlight)
return;
@@ -134,7 +134,7 @@ static void charlcd_bl_off(struct work_struct *work)
/* turn the backlight on for a little while */
void charlcd_poke(struct charlcd *lcd)
{
- struct charlcd_priv *priv = to_priv(lcd);
+ struct charlcd_priv *priv = charlcd_to_priv(lcd);
if (!lcd->ops->backlight)
return;
@@ -152,7 +152,7 @@ EXPORT_SYMBOL_GPL(charlcd_poke);
static void charlcd_gotoxy(struct charlcd *lcd)
{
- struct charlcd_priv *priv = to_priv(lcd);
+ struct charlcd_priv *priv = charlcd_to_priv(lcd);
unsigned int addr;
/*
@@ -170,7 +170,7 @@ static void charlcd_gotoxy(struct charlcd *lcd)
static void charlcd_home(struct charlcd *lcd)
{
- struct charlcd_priv *priv = to_priv(lcd);
+ struct charlcd_priv *priv = charlcd_to_priv(lcd);
priv->addr.x = 0;
priv->addr.y = 0;
@@ -179,7 +179,7 @@ static void charlcd_home(struct charlcd *lcd)
static void charlcd_print(struct charlcd *lcd, char c)
{
- struct charlcd_priv *priv = to_priv(lcd);
+ struct charlcd_priv *priv = charlcd_to_priv(lcd);
if (priv->addr.x < lcd->bwidth) {
if (lcd->char_conv)
@@ -211,7 +211,7 @@ static void charlcd_clear_fast(struct charlcd *lcd)
/* clears the display and resets X/Y */
static void charlcd_clear_display(struct charlcd *lcd)
{
- struct charlcd_priv *priv = to_priv(lcd);
+ struct charlcd_priv *priv = charlcd_to_priv(lcd);
lcd->ops->write_cmd(lcd, LCD_CMD_DISPLAY_CLEAR);
priv->addr.x = 0;
@@ -223,7 +223,7 @@ static void charlcd_clear_display(struct charlcd *lcd)
static int charlcd_init_display(struct charlcd *lcd)
{
void (*write_cmd_raw)(struct charlcd *lcd, int cmd);
- struct charlcd_priv *priv = to_priv(lcd);
+ struct charlcd_priv *priv = charlcd_to_priv(lcd);
u8 init;
if (lcd->ifwidth != 4 && lcd->ifwidth != 8)
@@ -369,7 +369,7 @@ static bool parse_xy(const char *s, unsigned long *x, unsigned long *y)
static inline int handle_lcd_special_code(struct charlcd *lcd)
{
- struct charlcd_priv *priv = to_priv(lcd);
+ struct charlcd_priv *priv = charlcd_to_priv(lcd);
/* LCD special codes */
@@ -580,7 +580,7 @@ static inline int handle_lcd_special_code(struct charlcd *lcd)
static void charlcd_write_char(struct charlcd *lcd, char c)
{
- struct charlcd_priv *priv = to_priv(lcd);
+ struct charlcd_priv *priv = charlcd_to_priv(lcd);
/* first, we'll test if we're in escape mode */
if ((c != '\n') && priv->esc_seq.len >= 0) {
@@ -705,7 +705,7 @@ static ssize_t charlcd_write(struct file *file, const char __user *buf,
static int charlcd_open(struct inode *inode, struct file *file)
{
- struct charlcd_priv *priv = to_priv(the_charlcd);
+ struct charlcd_priv *priv = charlcd_to_priv(the_charlcd);
int ret;
ret = -EBUSY;
@@ -766,7 +766,7 @@ static void charlcd_puts(struct charlcd *lcd, const char *s)
/* initialize the LCD driver */
static int charlcd_init(struct charlcd *lcd)
{
- struct charlcd_priv *priv = to_priv(lcd);
+ struct charlcd_priv *priv = charlcd_to_priv(lcd);
int ret;
if (lcd->ops->backlight) {
@@ -866,7 +866,7 @@ EXPORT_SYMBOL_GPL(charlcd_register);
int charlcd_unregister(struct charlcd *lcd)
{
- struct charlcd_priv *priv = to_priv(lcd);
+ struct charlcd_priv *priv = charlcd_to_priv(lcd);
unregister_reboot_notifier(&panel_notifier);
charlcd_puts(lcd, "\x0cLCD driver unloaded.\x1b[Lc\x1b[Lb\x1b[L-");
--
2.20.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v2 3/5] auxdisplay: charlcd: Introduce charlcd_free() helper
2019-03-12 14:44 [PATCH v2 0/5] auxdisplay: Introduce charlcd_free() Andy Shevchenko
2019-03-12 14:44 ` [PATCH v2 1/5] auxdisplay: hd44780: Fix memory leak on ->remove() Andy Shevchenko
2019-03-12 14:44 ` [PATCH v2 2/5] auxdisplay: charlcd: Move to_priv() to charlcd namespace Andy Shevchenko
@ 2019-03-12 14:44 ` Andy Shevchenko
2019-03-12 15:08 ` Geert Uytterhoeven
2019-03-12 14:44 ` [PATCH v2 4/5] auxdisplay: panel: Convert to use charlcd_free() Andy Shevchenko
` (2 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Andy Shevchenko @ 2019-03-12 14:44 UTC (permalink / raw)
To: Miguel Ojeda Sandonis, Willy Tarreau, linux-kernel
Cc: Andy Shevchenko, Geert Uytterhoeven
The charlcd_free() is a counterpart to charlcd_alloc()
and should be called symmetrically on tear down.
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/auxdisplay/charlcd.c | 6 ++++++
include/misc/charlcd.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c
index 407acd22efa8..a351a9400054 100644
--- a/drivers/auxdisplay/charlcd.c
+++ b/drivers/auxdisplay/charlcd.c
@@ -818,6 +818,12 @@ struct charlcd *charlcd_alloc(unsigned int drvdata_size)
}
EXPORT_SYMBOL_GPL(charlcd_alloc);
+void charlcd_free(struct charlcd *lcd)
+{
+ kfree(charlcd_to_priv(lcd));
+}
+EXPORT_SYMBOL_GPL(charlcd_free);
+
static int panel_notify_sys(struct notifier_block *this, unsigned long code,
void *unused)
{
diff --git a/include/misc/charlcd.h b/include/misc/charlcd.h
index 23f61850f363..1832402324ce 100644
--- a/include/misc/charlcd.h
+++ b/include/misc/charlcd.h
@@ -35,6 +35,7 @@ struct charlcd_ops {
};
struct charlcd *charlcd_alloc(unsigned int drvdata_size);
+void charlcd_free(struct charlcd *lcd);
int charlcd_register(struct charlcd *lcd);
int charlcd_unregister(struct charlcd *lcd);
--
2.20.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v2 4/5] auxdisplay: panel: Convert to use charlcd_free()
2019-03-12 14:44 [PATCH v2 0/5] auxdisplay: Introduce charlcd_free() Andy Shevchenko
` (2 preceding siblings ...)
2019-03-12 14:44 ` [PATCH v2 3/5] auxdisplay: charlcd: Introduce charlcd_free() helper Andy Shevchenko
@ 2019-03-12 14:44 ` Andy Shevchenko
2019-03-12 15:10 ` Geert Uytterhoeven
2019-03-12 14:44 ` [PATCH v2 5/5] auxdisplay: hd44780: " Andy Shevchenko
2019-03-12 15:11 ` [PATCH v2 0/5] auxdisplay: Introduce charlcd_free() Miguel Ojeda
5 siblings, 1 reply; 15+ messages in thread
From: Andy Shevchenko @ 2019-03-12 14:44 UTC (permalink / raw)
To: Miguel Ojeda Sandonis, Willy Tarreau, linux-kernel; +Cc: Andy Shevchenko
Convert to use charlcd_free() instead of kfree() for sake of type check.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/auxdisplay/panel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
index 21b9b2f2470a..e06de63497cf 100644
--- a/drivers/auxdisplay/panel.c
+++ b/drivers/auxdisplay/panel.c
@@ -1620,7 +1620,7 @@ static void panel_attach(struct parport *port)
if (lcd.enabled)
charlcd_unregister(lcd.charlcd);
err_unreg_device:
- kfree(lcd.charlcd);
+ charlcd_free(lcd.charlcd);
lcd.charlcd = NULL;
parport_unregister_device(pprt);
pprt = NULL;
@@ -1647,7 +1647,7 @@ static void panel_detach(struct parport *port)
if (lcd.enabled) {
charlcd_unregister(lcd.charlcd);
lcd.initialized = false;
- kfree(lcd.charlcd);
+ charlcd_free(lcd.charlcd);
lcd.charlcd = NULL;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v2 5/5] auxdisplay: hd44780: Convert to use charlcd_free()
2019-03-12 14:44 [PATCH v2 0/5] auxdisplay: Introduce charlcd_free() Andy Shevchenko
` (3 preceding siblings ...)
2019-03-12 14:44 ` [PATCH v2 4/5] auxdisplay: panel: Convert to use charlcd_free() Andy Shevchenko
@ 2019-03-12 14:44 ` Andy Shevchenko
2019-03-12 15:11 ` Geert Uytterhoeven
2019-03-12 15:11 ` [PATCH v2 0/5] auxdisplay: Introduce charlcd_free() Miguel Ojeda
5 siblings, 1 reply; 15+ messages in thread
From: Andy Shevchenko @ 2019-03-12 14:44 UTC (permalink / raw)
To: Miguel Ojeda Sandonis, Willy Tarreau, linux-kernel; +Cc: Andy Shevchenko
Convert to use charlcd_free() instead of kfree() for sake of type check.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/auxdisplay/hd44780.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/auxdisplay/hd44780.c b/drivers/auxdisplay/hd44780.c
index 3cde351fb5c9..ab15b64707ad 100644
--- a/drivers/auxdisplay/hd44780.c
+++ b/drivers/auxdisplay/hd44780.c
@@ -271,7 +271,7 @@ static int hd44780_probe(struct platform_device *pdev)
return 0;
fail:
- kfree(lcd);
+ charlcd_free(lcd);
return ret;
}
@@ -281,7 +281,7 @@ static int hd44780_remove(struct platform_device *pdev)
charlcd_unregister(lcd);
- kfree(lcd);
+ charlcd_free(lcd);
return 0;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH v2 1/5] auxdisplay: hd44780: Fix memory leak on ->remove()
2019-03-12 14:44 ` [PATCH v2 1/5] auxdisplay: hd44780: Fix memory leak on ->remove() Andy Shevchenko
@ 2019-03-12 15:05 ` Geert Uytterhoeven
0 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2019-03-12 15:05 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Miguel Ojeda Sandonis, Willy Tarreau, Linux Kernel Mailing List
On Tue, Mar 12, 2019 at 3:44 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> We have to free on ->remove() the allocated resources on ->probe().
>
> Fixes: d47d88361fee ("auxdisplay: Add HD44780 Character LCD support")
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 2/5] auxdisplay: charlcd: Move to_priv() to charlcd namespace
2019-03-12 14:44 ` [PATCH v2 2/5] auxdisplay: charlcd: Move to_priv() to charlcd namespace Andy Shevchenko
@ 2019-03-12 15:07 ` Geert Uytterhoeven
2019-03-12 15:33 ` Andy Shevchenko
0 siblings, 1 reply; 15+ messages in thread
From: Geert Uytterhoeven @ 2019-03-12 15:07 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Miguel Ojeda Sandonis, Willy Tarreau, Linux Kernel Mailing List
Hi Andy,
On Tue, Mar 12, 2019 at 3:44 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> In order to be more particular in names, rename to_priv() macro
> to charlcd_to_priv().
As this is a macro, not a function, the name doesn't end up as a symbol in
the binary anyway, and it's for internal use by the driver only.
> No functional change intended.
>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Regardless:
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 3/5] auxdisplay: charlcd: Introduce charlcd_free() helper
2019-03-12 14:44 ` [PATCH v2 3/5] auxdisplay: charlcd: Introduce charlcd_free() helper Andy Shevchenko
@ 2019-03-12 15:08 ` Geert Uytterhoeven
0 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2019-03-12 15:08 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Miguel Ojeda Sandonis, Willy Tarreau, Linux Kernel Mailing List
On Tue, Mar 12, 2019 at 3:44 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> The charlcd_free() is a counterpart to charlcd_alloc()
> and should be called symmetrically on tear down.
>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 4/5] auxdisplay: panel: Convert to use charlcd_free()
2019-03-12 14:44 ` [PATCH v2 4/5] auxdisplay: panel: Convert to use charlcd_free() Andy Shevchenko
@ 2019-03-12 15:10 ` Geert Uytterhoeven
0 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2019-03-12 15:10 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Miguel Ojeda Sandonis, Willy Tarreau, Linux Kernel Mailing List
On Tue, Mar 12, 2019 at 3:46 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> Convert to use charlcd_free() instead of kfree() for sake of type check.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 5/5] auxdisplay: hd44780: Convert to use charlcd_free()
2019-03-12 14:44 ` [PATCH v2 5/5] auxdisplay: hd44780: " Andy Shevchenko
@ 2019-03-12 15:11 ` Geert Uytterhoeven
0 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2019-03-12 15:11 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Miguel Ojeda Sandonis, Willy Tarreau, Linux Kernel Mailing List
On Tue, Mar 12, 2019 at 3:46 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> Convert to use charlcd_free() instead of kfree() for sake of type check.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 0/5] auxdisplay: Introduce charlcd_free()
2019-03-12 14:44 [PATCH v2 0/5] auxdisplay: Introduce charlcd_free() Andy Shevchenko
` (4 preceding siblings ...)
2019-03-12 14:44 ` [PATCH v2 5/5] auxdisplay: hd44780: " Andy Shevchenko
@ 2019-03-12 15:11 ` Miguel Ojeda
2019-03-12 15:46 ` Andy Shevchenko
5 siblings, 1 reply; 15+ messages in thread
From: Miguel Ojeda @ 2019-03-12 15:11 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Willy Tarreau, linux-kernel, Geert Uytterhoeven
On Tue, Mar 12, 2019 at 3:44 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> I have found a memory leak in hd44780 and it becomes that we have no
> counterpart to charlcd_alloc() that developers can easily miss.
Side-note now that I see these patches: I forgot to CC you in a series
for charlcd that we got from Mans a week or two ago -- please take a
chance to review them if you want! Also pinging Geert & Willy again in
case they want to take a look.
Cheers,
Miguel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 2/5] auxdisplay: charlcd: Move to_priv() to charlcd namespace
2019-03-12 15:07 ` Geert Uytterhoeven
@ 2019-03-12 15:33 ` Andy Shevchenko
0 siblings, 0 replies; 15+ messages in thread
From: Andy Shevchenko @ 2019-03-12 15:33 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Miguel Ojeda Sandonis, Willy Tarreau, Linux Kernel Mailing List
On Tue, Mar 12, 2019 at 04:07:37PM +0100, Geert Uytterhoeven wrote:
> Hi Andy,
>
> On Tue, Mar 12, 2019 at 3:44 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > In order to be more particular in names, rename to_priv() macro
> > to charlcd_to_priv().
>
> As this is a macro, not a function, the name doesn't end up as a symbol in
> the binary anyway, and it's for internal use by the driver only.
I understand this, and I did in order to avoid potential collisions
in the future.
>
> > No functional change intended.
> >
> > Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Regardless:
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Thanks!
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 0/5] auxdisplay: Introduce charlcd_free()
2019-03-12 15:11 ` [PATCH v2 0/5] auxdisplay: Introduce charlcd_free() Miguel Ojeda
@ 2019-03-12 15:46 ` Andy Shevchenko
2019-03-17 7:40 ` Miguel Ojeda
0 siblings, 1 reply; 15+ messages in thread
From: Andy Shevchenko @ 2019-03-12 15:46 UTC (permalink / raw)
To: Miguel Ojeda; +Cc: Willy Tarreau, linux-kernel, Geert Uytterhoeven
On Tue, Mar 12, 2019 at 04:11:36PM +0100, Miguel Ojeda wrote:
> On Tue, Mar 12, 2019 at 3:44 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > I have found a memory leak in hd44780 and it becomes that we have no
> > counterpart to charlcd_alloc() that developers can easily miss.
>
> Side-note now that I see these patches: I forgot to CC you in a series
> for charlcd that we got from Mans a week or two ago -- please take a
> chance to review them if you want! Also pinging Geert & Willy again in
> case they want to take a look.
Done.
It seems these two series are orthogonal to each other, so, can be applied
separately.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 0/5] auxdisplay: Introduce charlcd_free()
2019-03-12 15:46 ` Andy Shevchenko
@ 2019-03-17 7:40 ` Miguel Ojeda
0 siblings, 0 replies; 15+ messages in thread
From: Miguel Ojeda @ 2019-03-17 7:40 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Willy Tarreau, linux-kernel, Geert Uytterhoeven
On Tue, Mar 12, 2019 at 4:46 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> It seems these two series are orthogonal to each other, so, can be applied
> separately.
Sent to -next for a few days.
Cheers,
Miguel
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2019-03-17 7:40 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-12 14:44 [PATCH v2 0/5] auxdisplay: Introduce charlcd_free() Andy Shevchenko
2019-03-12 14:44 ` [PATCH v2 1/5] auxdisplay: hd44780: Fix memory leak on ->remove() Andy Shevchenko
2019-03-12 15:05 ` Geert Uytterhoeven
2019-03-12 14:44 ` [PATCH v2 2/5] auxdisplay: charlcd: Move to_priv() to charlcd namespace Andy Shevchenko
2019-03-12 15:07 ` Geert Uytterhoeven
2019-03-12 15:33 ` Andy Shevchenko
2019-03-12 14:44 ` [PATCH v2 3/5] auxdisplay: charlcd: Introduce charlcd_free() helper Andy Shevchenko
2019-03-12 15:08 ` Geert Uytterhoeven
2019-03-12 14:44 ` [PATCH v2 4/5] auxdisplay: panel: Convert to use charlcd_free() Andy Shevchenko
2019-03-12 15:10 ` Geert Uytterhoeven
2019-03-12 14:44 ` [PATCH v2 5/5] auxdisplay: hd44780: " Andy Shevchenko
2019-03-12 15:11 ` Geert Uytterhoeven
2019-03-12 15:11 ` [PATCH v2 0/5] auxdisplay: Introduce charlcd_free() Miguel Ojeda
2019-03-12 15:46 ` Andy Shevchenko
2019-03-17 7:40 ` Miguel Ojeda
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).