public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] audit of linux/device.h users in include/*
@ 2012-03-05  0:34 Paul Gortmaker
  2012-03-05  0:34 ` [PATCH 1/2] device.h: cleanup users outside of linux/include (C files) Paul Gortmaker
  2012-03-05  0:34 ` [PATCH 2/2] device.h: audit and cleanup users in main include dir Paul Gortmaker
  0 siblings, 2 replies; 6+ messages in thread
From: Paul Gortmaker @ 2012-03-05  0:34 UTC (permalink / raw)
  To: linux-arch; +Cc: linux-kernel, Paul Gortmaker

Nearly every subsystem has some kind of header with a proto like:

	void foo(struct device *dev);

and yet there is no reason for most of these guys to care about the
sub fields within the device struct.  This allows us to significantly
reduce the scope of headers including headers.  For this instance, a
reduction of about 40% is achieved by replacing the include with the
simple fact that the device is some kind of a struct.

Unlike the much larger module.h cleanup, this one is simply two
commits.  One to fix the implicit <linux/device.h> users, and then
one to delete the device.h includes from the linux/include/ dir
wherever possible.  The assumption is that this cleanup will not
go in through subsystem maintainers in a fragmented fashion, but
instead be pulled as a whole.

Paul.
---

Paul Gortmaker (2):
  device.h: cleanup users outside of linux/include (C files)
  device.h: audit and cleanup users in main include dir

 drivers/base/power/clock_ops.c        |    1 +
 drivers/base/power/common.c           |    1 +
 drivers/base/power/opp.c              |    1 +
 drivers/base/regmap/regcache-lzo.c    |    1 +
 drivers/base/regmap/regcache-rbtree.c |    1 +
 drivers/base/regmap/regcache.c        |    1 +
 drivers/base/regmap/regmap-debugfs.c  |    1 +
 drivers/base/regmap/regmap-irq.c      |    1 +
 drivers/edac/edac_stub.c              |    1 +
 drivers/edac/mce_amd_inj.c            |    1 +
 drivers/mfd/wm8994-regmap.c           |    1 +
 drivers/power/apm_power.c             |    1 +
 drivers/power/power_supply.h          |    4 ++++
 drivers/power/power_supply_leds.c     |    1 +
 drivers/power/power_supply_sysfs.c    |    1 +
 include/linux/amba/pl022.h            |    2 --
 include/linux/atmdev.h                |    2 +-
 include/linux/attribute_container.h   |    3 ++-
 include/linux/c2port.h                |    3 ++-
 include/linux/cdrom.h                 |    1 -
 include/linux/cpu.h                   |    3 ++-
 include/linux/cpufreq.h               |    1 -
 include/linux/crash_dump.h            |    1 -
 include/linux/dma-buf.h               |    2 +-
 include/linux/edac.h                  |    6 +++++-
 include/linux/fb.h                    |    1 -
 include/linux/firewire.h              |    3 ++-
 include/linux/hwmon-sysfs.h           |    2 ++
 include/linux/hwmon.h                 |    2 +-
 include/linux/hwspinlock.h            |    2 +-
 include/linux/ide.h                   |    3 ++-
 include/linux/ipmi.h                  |    2 +-
 include/linux/ipmi_smi.h              |    3 ++-
 include/linux/jz4740-adc.h            |    2 +-
 include/linux/maple.h                 |    2 +-
 include/linux/mfd/abx500.h            |    3 ++-
 include/linux/mfd/abx500/ab5500.h     |    2 +-
 include/linux/mfd/abx500/ab8500.h     |    4 +++-
 include/linux/mfd/pm8xxx/pm8921.h     |    1 -
 include/linux/mfd/stmpe.h             |    4 +++-
 include/linux/mfd/tc3589x.h           |    2 +-
 include/linux/mlx4/driver.h           |    1 -
 include/linux/mmc/card.h              |    1 +
 include/linux/mmc/core.h              |    1 -
 include/linux/mmc/host.h              |    1 +
 include/linux/netdevice.h             |    2 +-
 include/linux/of_device.h             |    3 ++-
 include/linux/opp.h                   |    1 +
 include/linux/phy.h                   |    5 +++--
 include/linux/pm_domain.h             |    2 ++
 include/linux/power_supply.h          |    3 ++-
 include/linux/regmap.h                |    2 +-
 include/linux/regulator/consumer.h    |    3 ++-
 include/linux/rfkill.h                |    2 +-
 include/linux/rio_drv.h               |    1 -
 include/linux/serial_pnx8xxx.h        |    1 -
 include/linux/spi/mmc_spi.h           |    2 +-
 include/linux/wimax/debug.h           |    2 +-
 include/media/media-device.h          |    3 ++-
 include/media/v4l2-ctrls.h            |    1 -
 include/media/v4l2-ioctl.h            |    1 -
 include/net/mac80211.h                |    3 ++-
 include/scsi/scsi_device.h            |    2 +-
 include/sound/core.h                  |    5 ++---
 include/sound/soc-dapm.h              |    3 ++-
 include/trace/events/regmap.h         |    2 +-
 include/trace/events/rpm.h            |    3 ++-
 include/trace/events/writeback.h      |    1 -
 net/rfkill/core.c                     |    1 +
 sound/core/init.c                     |    1 +
 sound/core/pcm.c                      |    1 +
 sound/core/seq/seq.c                  |    1 +
 sound/core/timer.c                    |    1 +
 73 files changed, 90 insertions(+), 52 deletions(-)

-- 
1.7.9.1

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

end of thread, other threads:[~2012-03-05 10:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-05  0:34 [RFC PATCH 0/2] audit of linux/device.h users in include/* Paul Gortmaker
2012-03-05  0:34 ` [PATCH 1/2] device.h: cleanup users outside of linux/include (C files) Paul Gortmaker
2012-03-05  0:34   ` Paul Gortmaker
2012-03-05  0:34 ` [PATCH 2/2] device.h: audit and cleanup users in main include dir Paul Gortmaker
2012-03-05  0:34   ` Paul Gortmaker
2012-03-05 10:06   ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox