linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] use resource_size
@ 2020-01-01 17:49 Julia Lawall
  2020-01-01 17:49 ` [PATCH 01/10] USB: omap_udc: " Julia Lawall
                   ` (9 more replies)
  0 siblings, 10 replies; 24+ messages in thread
From: Julia Lawall @ 2020-01-01 17:49 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: kernel-janitors, linuxppc-dev, linux-fbdev, dri-devel, linux-usb,
	linux-kernel, alsa-devel, netdev, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, linux-arm-kernel, linux-mips

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

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

end of thread, other threads:[~2020-01-29  5:18 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-01 17:49 [PATCH 00/10] use resource_size Julia Lawall
2020-01-01 17:49 ` [PATCH 01/10] USB: omap_udc: " Julia Lawall
2020-01-01 17:49 ` [PATCH 02/10] ALSA: ml403-ac97cr: " Julia Lawall
2020-01-01 19:17   ` Takashi Iwai
2020-01-01 19:23     ` Julia Lawall
2020-01-02 15:13       ` Takashi Iwai
2020-01-01 17:49 ` [PATCH 03/10] fbdev: s1d13xxxfb: " Julia Lawall
2020-01-15 16:06   ` Bartlomiej Zolnierkiewicz
2020-01-01 17:49 ` [PATCH 04/10] fsl/fman: " Julia Lawall
2020-01-03  0:31   ` David Miller
2020-01-01 17:49 ` [PATCH 05/10] powerpc/83xx: " Julia Lawall
2020-01-06 18:06   ` Scott Wood
2020-01-29  5:17   ` Michael Ellerman
2020-01-01 17:49 ` [PATCH 06/10] ASoC: SOF: imx8: " Julia Lawall
2020-01-01 21:41   ` Applied "ASoC: SOF: imx8: use resource_size" to the asoc tree Mark Brown
2020-01-01 17:49 ` [PATCH 07/10] video: fbdev: use resource_size Julia Lawall
2020-01-15 16:10   ` Bartlomiej Zolnierkiewicz
2020-01-01 17:49 ` [PATCH 08/10] MIPS: " Julia Lawall
2020-01-01 22:25   ` Philippe Mathieu-Daudé
2020-01-10 19:36   ` Paul Burton
2020-01-01 17:49 ` [PATCH 09/10] x86/crash: " Julia Lawall
2020-01-09 13:47   ` [tip: x86/cleanups] x86/crash: Use resource_size() tip-bot2 for Julia Lawall
2020-01-01 17:49 ` [PATCH 10/10] powerpc/powernv: use resource_size Julia Lawall
2020-01-29  5:17   ` Michael Ellerman

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