linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/4] devres: provide and use devm_kstrdup_const()
@ 2018-09-25 12:46 Bartosz Golaszewski
  2018-09-25 12:46 ` [PATCH v4 1/4] devres: constify p in devm_kfree() Bartosz Golaszewski
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Bartosz Golaszewski @ 2018-09-25 12:46 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J . Wysocki, Jassi Brar,
	Thierry Reding, Jonathan Hunter, Arnd Bergmann, Ulf Hansson,
	Rob Herring, Bjorn Helgaas, Arend van Spriel, Robin Murphy,
	Vivek Gautam, Joe Perches, Heikki Krogerus, Andrew Morton,
	Mike Rapoport, Roman Gushchin, Michal Hocko, Huang Ying,
	Andy Shevchenko, Bjorn Andersson
  Cc: linux-kernel, linux-tegra, linux-arch, linux-mm, Bartosz Golaszewski

This series implements devm_kstrdup_const() together with some
prerequisite changes and uses it in pmc-atom driver.

v1 -> v2:
- fixed the changelog in the patch implementing devm_kstrdup_const()
- fixed the kernel doc
- moved is_kernel_rodata() to asm-generic/sections.h
- fixed constness

v2 -> v3:
- rebased on top of 4.19-rc5 as there were some conflicts in the
  pmc-atom driver
- collected Reviewed-by tags

v3 -> v4:
- Andy NAK'ed patch 4/4 so I added a different example
- collected more tags

Bartosz Golaszewski (4):
  devres: constify p in devm_kfree()
  mm: move is_kernel_rodata() to asm-generic/sections.h
  devres: provide devm_kstrdup_const()
  mailbox: tegra-hsp: use devm_kstrdup_const()

 drivers/base/devres.c          | 43 ++++++++++++++++++++++++++++++++--
 drivers/mailbox/tegra-hsp.c    | 41 +++++++-------------------------
 include/asm-generic/sections.h | 14 +++++++++++
 include/linux/device.h         |  5 +++-
 mm/util.c                      |  7 ------
 5 files changed, 68 insertions(+), 42 deletions(-)

-- 
2.18.0


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

* [PATCH v4 1/4] devres: constify p in devm_kfree()
  2018-09-25 12:46 [PATCH v4 0/4] devres: provide and use devm_kstrdup_const() Bartosz Golaszewski
@ 2018-09-25 12:46 ` Bartosz Golaszewski
  2018-09-25 12:46 ` [PATCH v4 2/4] mm: move is_kernel_rodata() to asm-generic/sections.h Bartosz Golaszewski
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Bartosz Golaszewski @ 2018-09-25 12:46 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J . Wysocki, Jassi Brar,
	Thierry Reding, Jonathan Hunter, Arnd Bergmann, Ulf Hansson,
	Rob Herring, Bjorn Helgaas, Arend van Spriel, Robin Murphy,
	Vivek Gautam, Joe Perches, Heikki Krogerus, Andrew Morton,
	Mike Rapoport, Roman Gushchin, Michal Hocko, Huang Ying,
	Andy Shevchenko, Bjorn Andersson
  Cc: linux-kernel, linux-tegra, linux-arch, linux-mm, Bartosz Golaszewski

Make devm_kfree() signature uniform with that of kfree(). To avoid
compiler warnings: cast p to (void *) when calling devres_destroy().

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 drivers/base/devres.c  | 5 +++--
 include/linux/device.h | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/base/devres.c b/drivers/base/devres.c
index f98a097e73f2..438c91a43508 100644
--- a/drivers/base/devres.c
+++ b/drivers/base/devres.c
@@ -885,11 +885,12 @@ EXPORT_SYMBOL_GPL(devm_kasprintf);
  *
  * Free memory allocated with devm_kmalloc().
  */
-void devm_kfree(struct device *dev, void *p)
+void devm_kfree(struct device *dev, const void *p)
 {
 	int rc;
 
-	rc = devres_destroy(dev, devm_kmalloc_release, devm_kmalloc_match, p);
+	rc = devres_destroy(dev, devm_kmalloc_release,
+			    devm_kmalloc_match, (void *)p);
 	WARN_ON(rc);
 }
 EXPORT_SYMBOL_GPL(devm_kfree);
diff --git a/include/linux/device.h b/include/linux/device.h
index 8f882549edee..33f7cb271fbb 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -692,7 +692,7 @@ static inline void *devm_kcalloc(struct device *dev,
 {
 	return devm_kmalloc_array(dev, n, size, flags | __GFP_ZERO);
 }
-extern void devm_kfree(struct device *dev, void *p);
+extern void devm_kfree(struct device *dev, const void *p);
 extern char *devm_kstrdup(struct device *dev, const char *s, gfp_t gfp) __malloc;
 extern void *devm_kmemdup(struct device *dev, const void *src, size_t len,
 			  gfp_t gfp);
-- 
2.18.0


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

* [PATCH v4 2/4] mm: move is_kernel_rodata() to asm-generic/sections.h
  2018-09-25 12:46 [PATCH v4 0/4] devres: provide and use devm_kstrdup_const() Bartosz Golaszewski
  2018-09-25 12:46 ` [PATCH v4 1/4] devres: constify p in devm_kfree() Bartosz Golaszewski
@ 2018-09-25 12:46 ` Bartosz Golaszewski
  2018-09-25 12:46 ` [PATCH v4 3/4] devres: provide devm_kstrdup_const() Bartosz Golaszewski
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Bartosz Golaszewski @ 2018-09-25 12:46 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J . Wysocki, Jassi Brar,
	Thierry Reding, Jonathan Hunter, Arnd Bergmann, Ulf Hansson,
	Rob Herring, Bjorn Helgaas, Arend van Spriel, Robin Murphy,
	Vivek Gautam, Joe Perches, Heikki Krogerus, Andrew Morton,
	Mike Rapoport, Roman Gushchin, Michal Hocko, Huang Ying,
	Andy Shevchenko, Bjorn Andersson
  Cc: linux-kernel, linux-tegra, linux-arch, linux-mm, Bartosz Golaszewski

Export this routine so that we can use it later in devm_kstrdup_const()
and devm_kfree_const().

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
---
 include/asm-generic/sections.h | 14 ++++++++++++++
 mm/util.c                      |  7 -------
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
index 849cd8eb5ca0..d79abca81a52 100644
--- a/include/asm-generic/sections.h
+++ b/include/asm-generic/sections.h
@@ -141,4 +141,18 @@ static inline bool init_section_intersects(void *virt, size_t size)
 	return memory_intersects(__init_begin, __init_end, virt, size);
 }
 
+/**
+ * is_kernel_rodata - checks if the pointer address is located in the
+ *                    .rodata section
+ *
+ * @addr: address to check
+ *
+ * Returns: true if the address is located in .rodata, false otherwise.
+ */
+static inline bool is_kernel_rodata(unsigned long addr)
+{
+	return addr >= (unsigned long)__start_rodata &&
+	       addr < (unsigned long)__end_rodata;
+}
+
 #endif /* _ASM_GENERIC_SECTIONS_H_ */
diff --git a/mm/util.c b/mm/util.c
index 9e3ebd2ef65f..470f5cd80b64 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -15,17 +15,10 @@
 #include <linux/vmalloc.h>
 #include <linux/userfaultfd_k.h>
 
-#include <asm/sections.h>
 #include <linux/uaccess.h>
 
 #include "internal.h"
 
-static inline int is_kernel_rodata(unsigned long addr)
-{
-	return addr >= (unsigned long)__start_rodata &&
-		addr < (unsigned long)__end_rodata;
-}
-
 /**
  * kfree_const - conditionally free memory
  * @x: pointer to the memory
-- 
2.18.0


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

* [PATCH v4 3/4] devres: provide devm_kstrdup_const()
  2018-09-25 12:46 [PATCH v4 0/4] devres: provide and use devm_kstrdup_const() Bartosz Golaszewski
  2018-09-25 12:46 ` [PATCH v4 1/4] devres: constify p in devm_kfree() Bartosz Golaszewski
  2018-09-25 12:46 ` [PATCH v4 2/4] mm: move is_kernel_rodata() to asm-generic/sections.h Bartosz Golaszewski
@ 2018-09-25 12:46 ` Bartosz Golaszewski
  2018-09-25 12:46 ` [PATCH v4 4/4] mailbox: tegra-hsp: use devm_kstrdup_const() Bartosz Golaszewski
  2018-09-25 12:51 ` [PATCH v4 0/4] devres: provide and " Robin Murphy
  4 siblings, 0 replies; 8+ messages in thread
From: Bartosz Golaszewski @ 2018-09-25 12:46 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J . Wysocki, Jassi Brar,
	Thierry Reding, Jonathan Hunter, Arnd Bergmann, Ulf Hansson,
	Rob Herring, Bjorn Helgaas, Arend van Spriel, Robin Murphy,
	Vivek Gautam, Joe Perches, Heikki Krogerus, Andrew Morton,
	Mike Rapoport, Roman Gushchin, Michal Hocko, Huang Ying,
	Andy Shevchenko, Bjorn Andersson
  Cc: linux-kernel, linux-tegra, linux-arch, linux-mm, Bartosz Golaszewski

Provide a resource managed version of kstrdup_const(). This variant
internally calls devm_kstrdup() on pointers that are outside of
.rodata section and returns the string as is otherwise.

Also provide a corresponding version of devm_kfree().

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
---
 drivers/base/devres.c  | 38 ++++++++++++++++++++++++++++++++++++++
 include/linux/device.h |  3 +++
 2 files changed, 41 insertions(+)

diff --git a/drivers/base/devres.c b/drivers/base/devres.c
index 438c91a43508..48185d57bc5b 100644
--- a/drivers/base/devres.c
+++ b/drivers/base/devres.c
@@ -11,6 +11,8 @@
 #include <linux/slab.h>
 #include <linux/percpu.h>
 
+#include <asm/sections.h>
+
 #include "base.h"
 
 struct devres_node {
@@ -822,6 +824,28 @@ char *devm_kstrdup(struct device *dev, const char *s, gfp_t gfp)
 }
 EXPORT_SYMBOL_GPL(devm_kstrdup);
 
+/**
+ * devm_kstrdup_const - resource managed conditional string duplication
+ * @dev: device for which to duplicate the string
+ * @s: the string to duplicate
+ * @gfp: the GFP mask used in the kmalloc() call when allocating memory
+ *
+ * Strings allocated by devm_kstrdup_const will be automatically freed when
+ * the associated device is detached.
+ *
+ * RETURNS:
+ * Source string if it is in .rodata section otherwise it falls back to
+ * devm_kstrdup.
+ */
+const char *devm_kstrdup_const(struct device *dev, const char *s, gfp_t gfp)
+{
+	if (is_kernel_rodata((unsigned long)s))
+		return s;
+
+	return devm_kstrdup(dev, s, gfp);
+}
+EXPORT_SYMBOL(devm_kstrdup_const);
+
 /**
  * devm_kvasprintf - Allocate resource managed space and format a string
  *		     into that.
@@ -895,6 +919,20 @@ void devm_kfree(struct device *dev, const void *p)
 }
 EXPORT_SYMBOL_GPL(devm_kfree);
 
+/**
+ * devm_kfree_const - Resource managed conditional kfree
+ * @dev: device this memory belongs to
+ * @p: memory to free
+ *
+ * Function calls devm_kfree only if @p is not in .rodata section.
+ */
+void devm_kfree_const(struct device *dev, const void *p)
+{
+	if (!is_kernel_rodata((unsigned long)p))
+		devm_kfree(dev, p);
+}
+EXPORT_SYMBOL(devm_kfree_const);
+
 /**
  * devm_kmemdup - Resource-managed kmemdup
  * @dev: Device this memory belongs to
diff --git a/include/linux/device.h b/include/linux/device.h
index 33f7cb271fbb..79ccc6eb0975 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -693,7 +693,10 @@ static inline void *devm_kcalloc(struct device *dev,
 	return devm_kmalloc_array(dev, n, size, flags | __GFP_ZERO);
 }
 extern void devm_kfree(struct device *dev, const void *p);
+extern void devm_kfree_const(struct device *dev, const void *p);
 extern char *devm_kstrdup(struct device *dev, const char *s, gfp_t gfp) __malloc;
+extern const char *devm_kstrdup_const(struct device *dev,
+				      const char *s, gfp_t gfp);
 extern void *devm_kmemdup(struct device *dev, const void *src, size_t len,
 			  gfp_t gfp);
 
-- 
2.18.0


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

* [PATCH v4 4/4] mailbox: tegra-hsp: use devm_kstrdup_const()
  2018-09-25 12:46 [PATCH v4 0/4] devres: provide and use devm_kstrdup_const() Bartosz Golaszewski
                   ` (2 preceding siblings ...)
  2018-09-25 12:46 ` [PATCH v4 3/4] devres: provide devm_kstrdup_const() Bartosz Golaszewski
@ 2018-09-25 12:46 ` Bartosz Golaszewski
  2018-09-25 12:51 ` [PATCH v4 0/4] devres: provide and " Robin Murphy
  4 siblings, 0 replies; 8+ messages in thread
From: Bartosz Golaszewski @ 2018-09-25 12:46 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J . Wysocki, Jassi Brar,
	Thierry Reding, Jonathan Hunter, Arnd Bergmann, Ulf Hansson,
	Rob Herring, Bjorn Helgaas, Arend van Spriel, Robin Murphy,
	Vivek Gautam, Joe Perches, Heikki Krogerus, Andrew Morton,
	Mike Rapoport, Roman Gushchin, Michal Hocko, Huang Ying,
	Andy Shevchenko, Bjorn Andersson
  Cc: linux-kernel, linux-tegra, linux-arch, linux-mm, Bartosz Golaszewski

Use devm_kstrdup_const() in the tegra-hsp driver. This mostly serves as
an example of how to use this new routine to shrink driver code.

Also use devm_kzalloc() instead of regular kzalloc() to get shrink the
driver even more.

Doorbell objects are only removed in the driver's remove callback so
it's safe to convert all memory allocations to devres.

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
---
 drivers/mailbox/tegra-hsp.c | 41 ++++++++-----------------------------
 1 file changed, 9 insertions(+), 32 deletions(-)

diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c
index 0cde356c11ab..106c94dedbf1 100644
--- a/drivers/mailbox/tegra-hsp.c
+++ b/drivers/mailbox/tegra-hsp.c
@@ -183,14 +183,15 @@ static irqreturn_t tegra_hsp_doorbell_irq(int irq, void *data)
 }
 
 static struct tegra_hsp_channel *
-tegra_hsp_doorbell_create(struct tegra_hsp *hsp, const char *name,
-			  unsigned int master, unsigned int index)
+tegra_hsp_doorbell_create(struct device *dev, struct tegra_hsp *hsp,
+			  const char *name, unsigned int master,
+			  unsigned int index)
 {
 	struct tegra_hsp_doorbell *db;
 	unsigned int offset;
 	unsigned long flags;
 
-	db = kzalloc(sizeof(*db), GFP_KERNEL);
+	db = devm_kzalloc(dev, sizeof(*db), GFP_KERNEL);
 	if (!db)
 		return ERR_PTR(-ENOMEM);
 
@@ -200,7 +201,7 @@ tegra_hsp_doorbell_create(struct tegra_hsp *hsp, const char *name,
 	db->channel.regs = hsp->regs + offset;
 	db->channel.hsp = hsp;
 
-	db->name = kstrdup_const(name, GFP_KERNEL);
+	db->name = devm_kstrdup_const(dev, name, GFP_KERNEL);
 	db->master = master;
 	db->index = index;
 
@@ -211,13 +212,6 @@ tegra_hsp_doorbell_create(struct tegra_hsp *hsp, const char *name,
 	return &db->channel;
 }
 
-static void __tegra_hsp_doorbell_destroy(struct tegra_hsp_doorbell *db)
-{
-	list_del(&db->list);
-	kfree_const(db->name);
-	kfree(db);
-}
-
 static int tegra_hsp_doorbell_send_data(struct mbox_chan *chan, void *data)
 {
 	struct tegra_hsp_doorbell *db = chan->con_priv;
@@ -332,31 +326,16 @@ static struct mbox_chan *of_tegra_hsp_xlate(struct mbox_controller *mbox,
 	return chan ?: ERR_PTR(-EBUSY);
 }
 
-static void tegra_hsp_remove_doorbells(struct tegra_hsp *hsp)
-{
-	struct tegra_hsp_doorbell *db, *tmp;
-	unsigned long flags;
-
-	spin_lock_irqsave(&hsp->lock, flags);
-
-	list_for_each_entry_safe(db, tmp, &hsp->doorbells, list)
-		__tegra_hsp_doorbell_destroy(db);
-
-	spin_unlock_irqrestore(&hsp->lock, flags);
-}
-
-static int tegra_hsp_add_doorbells(struct tegra_hsp *hsp)
+static int tegra_hsp_add_doorbells(struct device *dev, struct tegra_hsp *hsp)
 {
 	const struct tegra_hsp_db_map *map = hsp->soc->map;
 	struct tegra_hsp_channel *channel;
 
 	while (map->name) {
-		channel = tegra_hsp_doorbell_create(hsp, map->name,
+		channel = tegra_hsp_doorbell_create(dev, hsp, map->name,
 						    map->master, map->index);
-		if (IS_ERR(channel)) {
-			tegra_hsp_remove_doorbells(hsp);
+		if (IS_ERR(channel))
 			return PTR_ERR(channel);
-		}
 
 		map++;
 	}
@@ -412,7 +391,7 @@ static int tegra_hsp_probe(struct platform_device *pdev)
 	if (!hsp->mbox.chans)
 		return -ENOMEM;
 
-	err = tegra_hsp_add_doorbells(hsp);
+	err = tegra_hsp_add_doorbells(&pdev->dev, hsp);
 	if (err < 0) {
 		dev_err(&pdev->dev, "failed to add doorbells: %d\n", err);
 		return err;
@@ -423,7 +402,6 @@ static int tegra_hsp_probe(struct platform_device *pdev)
 	err = mbox_controller_register(&hsp->mbox);
 	if (err) {
 		dev_err(&pdev->dev, "failed to register mailbox: %d\n", err);
-		tegra_hsp_remove_doorbells(hsp);
 		return err;
 	}
 
@@ -443,7 +421,6 @@ static int tegra_hsp_remove(struct platform_device *pdev)
 	struct tegra_hsp *hsp = platform_get_drvdata(pdev);
 
 	mbox_controller_unregister(&hsp->mbox);
-	tegra_hsp_remove_doorbells(hsp);
 
 	return 0;
 }
-- 
2.18.0


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

* Re: [PATCH v4 0/4] devres: provide and use devm_kstrdup_const()
  2018-09-25 12:46 [PATCH v4 0/4] devres: provide and use devm_kstrdup_const() Bartosz Golaszewski
                   ` (3 preceding siblings ...)
  2018-09-25 12:46 ` [PATCH v4 4/4] mailbox: tegra-hsp: use devm_kstrdup_const() Bartosz Golaszewski
@ 2018-09-25 12:51 ` Robin Murphy
  2018-09-25 15:48   ` Joe Perches
  4 siblings, 1 reply; 8+ messages in thread
From: Robin Murphy @ 2018-09-25 12:51 UTC (permalink / raw)
  To: Bartosz Golaszewski, Greg Kroah-Hartman, Rafael J . Wysocki,
	Jassi Brar, Thierry Reding, Jonathan Hunter, Arnd Bergmann,
	Ulf Hansson, Rob Herring, Bjorn Helgaas, Arend van Spriel,
	Vivek Gautam, Joe Perches, Heikki Krogerus, Andrew Morton,
	Mike Rapoport, Roman Gushchin, Michal Hocko, Huang Ying,
	Andy Shevchenko, Bjorn Andersson
  Cc: linux-kernel, linux-tegra, linux-arch, linux-mm

On 25/09/18 13:46, Bartosz Golaszewski wrote:
> This series implements devm_kstrdup_const() together with some
> prerequisite changes and uses it in pmc-atom driver.

Is anyone expecting me to review this series, or am I just here because 
I once made a couple of entirely unrelated changes to device.h?

Robin.

> v1 -> v2:
> - fixed the changelog in the patch implementing devm_kstrdup_const()
> - fixed the kernel doc
> - moved is_kernel_rodata() to asm-generic/sections.h
> - fixed constness
> 
> v2 -> v3:
> - rebased on top of 4.19-rc5 as there were some conflicts in the
>    pmc-atom driver
> - collected Reviewed-by tags
> 
> v3 -> v4:
> - Andy NAK'ed patch 4/4 so I added a different example
> - collected more tags
> 
> Bartosz Golaszewski (4):
>    devres: constify p in devm_kfree()
>    mm: move is_kernel_rodata() to asm-generic/sections.h
>    devres: provide devm_kstrdup_const()
>    mailbox: tegra-hsp: use devm_kstrdup_const()
> 
>   drivers/base/devres.c          | 43 ++++++++++++++++++++++++++++++++--
>   drivers/mailbox/tegra-hsp.c    | 41 +++++++-------------------------
>   include/asm-generic/sections.h | 14 +++++++++++
>   include/linux/device.h         |  5 +++-
>   mm/util.c                      |  7 ------
>   5 files changed, 68 insertions(+), 42 deletions(-)
> 

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

* Re: [PATCH v4 0/4] devres: provide and use devm_kstrdup_const()
  2018-09-25 12:51 ` [PATCH v4 0/4] devres: provide and " Robin Murphy
@ 2018-09-25 15:48   ` Joe Perches
  2018-09-25 16:02     ` Bartosz Golaszewski
  0 siblings, 1 reply; 8+ messages in thread
From: Joe Perches @ 2018-09-25 15:48 UTC (permalink / raw)
  To: Robin Murphy, Bartosz Golaszewski, Greg Kroah-Hartman,
	Rafael J . Wysocki, Jassi Brar, Thierry Reding, Jonathan Hunter,
	Arnd Bergmann, Ulf Hansson, Rob Herring, Bjorn Helgaas,
	Arend van Spriel, Vivek Gautam, Heikki Krogerus, Andrew Morton,
	Mike Rapoport, Roman Gushchin, Michal Hocko, Huang Ying,
	Andy Shevchenko, Bjorn Andersson
  Cc: linux-kernel, linux-tegra, linux-arch, linux-mm

On Tue, 2018-09-25 at 13:51 +0100, Robin Murphy wrote:
> On 25/09/18 13:46, Bartosz Golaszewski wrote:
> > This series implements devm_kstrdup_const() together with some
> > prerequisite changes and uses it in pmc-atom driver.
> 
> Is anyone expecting me to review this series,

Probably not.

> or am I just here because 
> I once made a couple of entirely unrelated changes to device.h?

Most likely yes.

It is likely that Bartosz should update his use of the
get_maintainer.pl script to add "--nogit --nogit-fallback"
so drive-by patch submitters are not also cc'd on these
sorts of series.

$ ./scripts/get_maintainer.pl -f \
	drivers/base/devres.c \
	drivers/mailbox/tegra-hsp.c \
	include/asm-generic/sections.h \
	include/linux/device.h \
	mm/util.c | \
  wc -l
26

$ ./scripts/get_maintainer.pl -f --nogit --nogit-fallback \
	drivers/base/devres.c \
	drivers/mailbox/tegra-hsp.c \
	include/asm-generic/sections.h \
	include/linux/device.h \
	mm/util.c | \
  wc -l
10



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

* Re: [PATCH v4 0/4] devres: provide and use devm_kstrdup_const()
  2018-09-25 15:48   ` Joe Perches
@ 2018-09-25 16:02     ` Bartosz Golaszewski
  0 siblings, 0 replies; 8+ messages in thread
From: Bartosz Golaszewski @ 2018-09-25 16:02 UTC (permalink / raw)
  To: Joe Perches
  Cc: Robin Murphy, Greg Kroah-Hartman, Rafael J . Wysocki, Jassi Brar,
	Thierry Reding, Jonathan Hunter, Arnd Bergmann, Ulf Hansson,
	Rob Herring, Bjorn Helgaas, Arend van Spriel, Vivek Gautam,
	Heikki Krogerus, Andrew Morton, Mike Rapoport, Roman Gushchin,
	Michal Hocko, Huang Ying, Andy Shevchenko, Bjorn Andersson,
	Linux Kernel Mailing List, linux-tegra,
	open list:GENERIC INCLUDE/ASM HEADER FILES, linux-mm

wt., 25 wrz 2018 o 17:48 Joe Perches <joe@perches.com> napisał(a):
>
> On Tue, 2018-09-25 at 13:51 +0100, Robin Murphy wrote:
> > On 25/09/18 13:46, Bartosz Golaszewski wrote:
> > > This series implements devm_kstrdup_const() together with some
> > > prerequisite changes and uses it in pmc-atom driver.
> >
> > Is anyone expecting me to review this series,
>
> Probably not.
>
> > or am I just here because
> > I once made a couple of entirely unrelated changes to device.h?
>
> Most likely yes.
>
> It is likely that Bartosz should update his use of the
> get_maintainer.pl script to add "--nogit --nogit-fallback"
> so drive-by patch submitters are not also cc'd on these
> sorts of series.
>
> $ ./scripts/get_maintainer.pl -f \
>         drivers/base/devres.c \
>         drivers/mailbox/tegra-hsp.c \
>         include/asm-generic/sections.h \
>         include/linux/device.h \
>         mm/util.c | \
>   wc -l
> 26
>
> $ ./scripts/get_maintainer.pl -f --nogit --nogit-fallback \
>         drivers/base/devres.c \
>         drivers/mailbox/tegra-hsp.c \
>         include/asm-generic/sections.h \
>         include/linux/device.h \
>         mm/util.c | \
>   wc -l
> 10
>
>

Hi, sorry for that. Got it and will use next time.

Bartosz

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

end of thread, other threads:[~2018-09-25 16:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-25 12:46 [PATCH v4 0/4] devres: provide and use devm_kstrdup_const() Bartosz Golaszewski
2018-09-25 12:46 ` [PATCH v4 1/4] devres: constify p in devm_kfree() Bartosz Golaszewski
2018-09-25 12:46 ` [PATCH v4 2/4] mm: move is_kernel_rodata() to asm-generic/sections.h Bartosz Golaszewski
2018-09-25 12:46 ` [PATCH v4 3/4] devres: provide devm_kstrdup_const() Bartosz Golaszewski
2018-09-25 12:46 ` [PATCH v4 4/4] mailbox: tegra-hsp: use devm_kstrdup_const() Bartosz Golaszewski
2018-09-25 12:51 ` [PATCH v4 0/4] devres: provide and " Robin Murphy
2018-09-25 15:48   ` Joe Perches
2018-09-25 16:02     ` Bartosz Golaszewski

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).