lkml.org 
[lkml]   [2020]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 00/10] use resource_size
Date
Use resource_size rather than a verbose computation on
the end and start fields.

The semantic patch that makes these changes is as follows:
(http://coccinelle.lip6.fr/)

<smpl>
@@
struct resource ptr;
@@

- ((ptr.end) - (ptr.start) + 1)
+ resource_size(&ptr)

@@
struct resource *ptr;
@@

- ((ptr->end) - (ptr->start) + 1)
+ resource_size(ptr)

@@
struct resource ptr;
@@

- ((ptr.end) + 1 - (ptr.start))
+ resource_size(&ptr)

@@
struct resource *ptr;
@@

- ((ptr->end) + 1 - (ptr->start))
+ resource_size(ptr)
</smpl>

---

arch/mips/kernel/setup.c | 6 ++----
arch/powerpc/platforms/83xx/km83xx.c | 2 +-
arch/powerpc/platforms/powernv/pci-ioda.c | 4 ++--
arch/x86/kernel/crash.c | 2 +-
drivers/net/ethernet/freescale/fman/mac.c | 4 ++--
drivers/usb/gadget/udc/omap_udc.c | 6 +++---
drivers/video/fbdev/cg14.c | 3 +--
drivers/video/fbdev/s1d13xxxfb.c | 16 ++++++++--------
sound/drivers/ml403-ac97cr.c | 4 +---
sound/soc/sof/imx/imx8.c | 3 +--
10 files changed, 22 insertions(+), 28 deletions(-)

\
 
 \ /
  Last update: 2020-01-01 19:27    [W:0.146 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site