All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/gpu/drm/radeon/cik.c: Deinline cik_irq_ack, save 1728 bytes
@ 2016-04-08 18:35 Denys Vlasenko
  2016-04-08 18:35 ` [PATCH] drivers/gpu/drm/radeon/si.c: Deinline si_irq_ack, save 1792 bytes Denys Vlasenko
  2016-04-08 18:35 ` [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_write_buffer, save 5316 bytes Denys Vlasenko
  0 siblings, 2 replies; 4+ messages in thread
From: Denys Vlasenko @ 2016-04-08 18:35 UTC (permalink / raw)
  To: Alex Deucher; +Cc: Denys Vlasenko, Christian König, linux-kernel

This function compiles to 1766 bytes of machine code.
Two callsites.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: linux-kernel@vger.kernel.org
---
 drivers/gpu/drm/radeon/cik.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
index 4c30d8c..669cde4 100644
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -7658,7 +7658,7 @@ int cik_irq_set(struct radeon_device *rdev)
  * etc.) (CIK).  Certain interrupts sources are sw
  * generated and do not require an explicit ack.
  */
-static inline void cik_irq_ack(struct radeon_device *rdev)
+static void cik_irq_ack(struct radeon_device *rdev)
 {
 	u32 tmp;
 
-- 
2.1.0

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

* [PATCH] drivers/gpu/drm/radeon/si.c: Deinline si_irq_ack, save 1792 bytes
  2016-04-08 18:35 [PATCH] drivers/gpu/drm/radeon/cik.c: Deinline cik_irq_ack, save 1728 bytes Denys Vlasenko
@ 2016-04-08 18:35 ` Denys Vlasenko
  2016-04-08 18:35 ` [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_write_buffer, save 5316 bytes Denys Vlasenko
  1 sibling, 0 replies; 4+ messages in thread
From: Denys Vlasenko @ 2016-04-08 18:35 UTC (permalink / raw)
  To: Alex Deucher; +Cc: Denys Vlasenko, Christian König, linux-kernel

This function compiles to 1760 bytes of machine code.
Two callsites.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: linux-kernel@vger.kernel.org
---
 drivers/gpu/drm/radeon/si.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index f878d69..134917b 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
@@ -6242,7 +6242,7 @@ int si_irq_set(struct radeon_device *rdev)
 	return 0;
 }
 
-static inline void si_irq_ack(struct radeon_device *rdev)
+static void si_irq_ack(struct radeon_device *rdev)
 {
 	u32 tmp;
 
-- 
2.1.0

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

* [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_write_buffer, save 5316 bytes
  2016-04-08 18:35 [PATCH] drivers/gpu/drm/radeon/cik.c: Deinline cik_irq_ack, save 1728 bytes Denys Vlasenko
  2016-04-08 18:35 ` [PATCH] drivers/gpu/drm/radeon/si.c: Deinline si_irq_ack, save 1792 bytes Denys Vlasenko
@ 2016-04-08 18:35 ` Denys Vlasenko
  2016-07-10  1:54   ` Brian Norris
  1 sibling, 1 reply; 4+ messages in thread
From: Denys Vlasenko @ 2016-04-08 18:35 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Denys Vlasenko, Brian Norris, Dan Carpenter, Artem Bityutskiy,
	linux-mtd, linux-kernel

This function compiles to 2554 bytes of machine code.
In C, the function is almost 200 lines long.

It has only one callsite, but forced inlining that much code
makes gcc generate significantly worse code. Let gcc itself decide
what to do.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: David Woodhouse <David.Woodhouse@intel.com>
CC: Brian Norris <computersforpeace@gmail.com>
CC: Dan Carpenter <dan.carpenter@oracle.com>
CC: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
CC: linux-mtd@lists.infradead.org
CC: linux-kernel@vger.kernel.org
---
 drivers/mtd/chips/cfi_cmdset_0020.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c
index 9a1a6ff..70dd2b1 100644
--- a/drivers/mtd/chips/cfi_cmdset_0020.c
+++ b/drivers/mtd/chips/cfi_cmdset_0020.c
@@ -416,7 +416,7 @@ static int cfi_staa_read (struct mtd_info *mtd, loff_t from, size_t len, size_t
 	return ret;
 }
 
-static inline int do_write_buffer(struct map_info *map, struct flchip *chip,
+static int do_write_buffer(struct map_info *map, struct flchip *chip,
 				  unsigned long adr, const u_char *buf, int len)
 {
 	struct cfi_private *cfi = map->fldrv_priv;
-- 
2.1.0

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

* Re: [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_write_buffer, save 5316 bytes
  2016-04-08 18:35 ` [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_write_buffer, save 5316 bytes Denys Vlasenko
@ 2016-07-10  1:54   ` Brian Norris
  0 siblings, 0 replies; 4+ messages in thread
From: Brian Norris @ 2016-07-10  1:54 UTC (permalink / raw)
  To: Denys Vlasenko
  Cc: David Woodhouse, Dan Carpenter, Artem Bityutskiy, linux-mtd,
	linux-kernel

On Fri, Apr 08, 2016 at 08:35:43PM +0200, Denys Vlasenko wrote:
> This function compiles to 2554 bytes of machine code.
> In C, the function is almost 200 lines long.
> 
> It has only one callsite, but forced inlining that much code
> makes gcc generate significantly worse code. Let gcc itself decide
> what to do.
> 
> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
> CC: David Woodhouse <David.Woodhouse@intel.com>
> CC: Brian Norris <computersforpeace@gmail.com>
> CC: Dan Carpenter <dan.carpenter@oracle.com>
> CC: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> CC: linux-mtd@lists.infradead.org
> CC: linux-kernel@vger.kernel.org

Applied to l2-mtd.git

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

end of thread, other threads:[~2016-07-10  1:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-08 18:35 [PATCH] drivers/gpu/drm/radeon/cik.c: Deinline cik_irq_ack, save 1728 bytes Denys Vlasenko
2016-04-08 18:35 ` [PATCH] drivers/gpu/drm/radeon/si.c: Deinline si_irq_ack, save 1792 bytes Denys Vlasenko
2016-04-08 18:35 ` [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_write_buffer, save 5316 bytes Denys Vlasenko
2016-07-10  1:54   ` Brian Norris

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