linux_dsm_epyc7002/drivers
Guenter Roeck dcb00ee817 hwmon: (max6621) Use HWMON_CHANNEL_INFO macro
The HWMON_CHANNEL_INFO macro simplifies the code, reduces the likelihood
of errors, and makes the code easier to read.

The conversion was done automatically with coccinelle. The semantic patch
used to make this change is as follows.

@r@
initializer list elements;
identifier i;
@@

-u32 i[] = {
-  elements,
-  0
-};

@s@
identifier r.i,j,ty;
@@

-struct hwmon_channel_info j = {
-       .type = ty,
-       .config = i,
-};

@script:ocaml t@
ty << s.ty;
elements << r.elements;
shorter;
elems;
@@

shorter :=
   make_ident (List.hd(List.rev (Str.split (Str.regexp "_") ty)));
elems :=
   make_ident
    (String.concat ","
     (List.map (fun x -> Printf.sprintf "\n\t\t\t   %s" x)
       (Str.split (Str.regexp " , ") elements)))

@@
identifier s.j,t.shorter;
identifier t.elems;
@@

- &j
+ HWMON_CHANNEL_INFO(shorter,elems)

This patch does not introduce functional changes. Many thanks to
Julia Lawall for providing the semantic patch.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-04-15 17:19:53 -07:00
..
accessibility
acpi ACPI fix for 5.1-rc4 2019-04-04 14:48:11 -10:00
amba
android binder: fix race between munmap() and direct reclaim 2019-03-21 06:51:32 +01:00
ata libata: fix using DMA buffers on stack 2019-03-28 08:16:04 -06:00
atm
auxdisplay auxdisplay: charlcd: make backlight initial state configurable 2019-03-17 08:48:45 +01:00
base Device properties framework fix for 5.1-rc2 2019-03-22 12:08:52 -07:00
bcma
block xsysace: Fix error handling in ace_setup 2019-04-06 10:51:12 -06:00
bluetooth
bus
cdrom
char tty: mark Siemens R3964 line discipline as BROKEN 2019-04-05 05:56:44 -10:00
clk
clocksource clocksource/drivers/clps711x: Remove board support 2019-03-24 11:30:11 +01:00
connector
cpufreq cpufreq/intel_pstate: Load only on Intel hardware 2019-04-01 23:39:23 +02:00
cpuidle
crypto
dax device-dax for 5.1 2019-03-16 13:05:32 -07:00
dca
devfreq
dio
dma dmaengine: stm32-mdma: Revert "dmaengine: stm32-mdma: Add a check on read_u32_array" 2019-03-25 21:56:54 +05:30
dma-buf
edac
eisa
extcon
firewire
firmware
fmc
fpga
fsi
gnss
gpio gpio fixes for v5.1-rc3 2019-03-29 03:04:47 +01:00
gpu Only one fix for DSC (backoff after drm_modeset_lock deadlock) 2019-04-05 10:45:32 +10:00
hid HID: input: add mapping for Assistant key 2019-04-03 13:33:25 +02:00
hsi
hv
hwmon hwmon: (max6621) Use HWMON_CHANNEL_INFO macro 2019-04-15 17:19:53 -07:00
hwspinlock
hwtracing ARM updates for 5.1-rc1 2019-03-15 14:37:46 -07:00
i2c i2c: imx: don't leak the i2c adapter on error 2019-04-06 17:54:28 +02:00
i3c
ide
idle
iio
infiniband i40iw: Avoid panic when handling the inetdev event 2019-03-17 21:40:40 -03:00
input
interconnect
iommu Merge branch 'akpm' (patches from Andrew) 2019-03-29 16:02:28 -07:00
ipack
irqchip irqchip/irq-mvebu-sei: Make mvebu_sei_ap806_caps static 2019-03-21 16:43:00 +01:00
isdn mISDN: hfcpci: Test both vendor & device ID for Digium HFC4S 2019-03-18 18:32:44 -07:00
leds leds: trigger: netdev: use memcpy in device_name_store 2019-03-30 19:09:32 +01:00
lightnvm
macintosh
mailbox
mcb
md dm integrity: fix deadlock with overlapping I/O 2019-04-05 18:49:08 -04:00
media
memory
memstick
message
mfd mfd: sun6i-prcm: Allow to compile with COMPILE_TEST 2019-04-03 08:38:07 +01:00
misc
mmc mmc: renesas_sdhi: limit block count to 16 bit for old revisions 2019-03-21 11:41:46 +01:00
mtd mtd: cfi: fix deadloop in cfi_cmdset_0002.c do_write_buffer 2019-04-05 00:39:19 +02:00
mux
net ibmvnic: Fix completion structure initialization 2019-04-04 18:36:07 -07:00
nfc
ntb
nubus
nvdimm device-dax for 5.1 2019-03-16 13:05:32 -07:00
nvme nvmet: fix error flow during ns enable 2019-03-28 18:15:03 +01:00
nvmem
of
opp
oprofile
parisc Revert: parisc: Use F_EXTEND() macro in iosapic code 2019-04-06 19:07:55 +02:00
parport Revert "parport: daisy: use new parport device model" 2019-03-25 14:49:00 -07:00
pci PCI/LINK: Deduplicate bandwidth reports for multi-function devices 2019-03-25 17:59:07 -05:00
pcmcia
perf
phy phy: sun4i-usb: Support set_mode to USB_HOST for non-OTG PHYs 2019-03-26 16:48:55 +09:00
pinctrl
platform Chrome Platform fixes for v5.1-rc2 2019-03-19 11:28:15 -07:00
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset reset: meson-audio-arb: Fix missing .owner setting of reset_controller_dev 2019-03-25 16:22:10 +01:00
rpmsg
rtc rtc: da9063: set uie_unsupported when relevant 2019-04-02 23:33:09 +02:00
s390 SCSI fixes on 20190329 2019-03-29 14:58:49 -07:00
sbus
scsi scsi: lpfc: Fix missing wakeups on abort threads 2019-04-03 23:35:09 -04:00
sfi
sh
siox
slimbus
sn
soc This pull request brings in a build fix for arm64 with bcm2835 2019-03-18 10:31:24 -07:00
soundwire
spi
spmi
ssb
staging staging: vt6655: Remove vif check from vnt_interrupt 2019-03-29 17:25:45 +01:00
target SCSI misc on 20190315 2019-03-16 12:51:50 -07:00
tc
tee
thermal Merge branches 'fixes' and 'thermal-intel' into next 2019-03-18 22:37:44 +08:00
thunderbolt
tty tty: fix NULL pointer issue when tty_port ops is not set 2019-03-28 01:21:21 +09:00
uio
usb USB-serial fixes for 5.1-rc3 2019-03-29 15:31:16 +01:00
uwb
vfio vfio/type1: Limit DMA mappings per container 2019-04-03 12:43:05 -06:00
vhost
video
virt virt: vbox: Implement passing requestor info to the host for VirtualBox 6.0.x 2019-03-28 01:55:18 +09:00
virtio
visorbus
vlynq
vme
w1
watchdog
xen xen: fixes for 5.1-rc4 2019-04-07 06:12:10 -10:00
zorro
Kconfig
Makefile