WSL2-Linux-Kernel/drivers/staging
Gustavo Padovan a02b9dc90d dma-buf/sync_file: refactor fence storage in struct sync_file
Create sync_file->fence to abstract the type of fence we are using for
each sync_file. If only one fence is present we use a normal struct fence
but if there is more fences to be added to the sync_file a fence_array
is created.

This change cleans up sync_file a bit. We don't need to have sync_file_cb
array anymore. Instead, as we always have  one fence, only one fence
callback is registered per sync_file.

v2: Comments from Chris Wilson and Christian König
	- Not using fence_ops anymore
	- fence_is_array() was created to differentiate fence from fence_array
	- fence_array_teardown() is now exported and used under fence_is_array()
	- struct sync_file lost num_fences member

v3: Comments from Chris Wilson and Christian König
	- struct sync_file lost status member in favor of fence_is_signaled()
	- drop use of fence_array_teardown()
	- use sizeof(*fence) to allocate only an array on fence pointers

v4: Comments from Chris Wilson
	- use sizeof(*fence) to reallocate array
	- fix typo in comments
	- protect num_fences sum against overflows
	- use array->base instead of casting the to struct fence

v5: fixes checkpatch warnings

v6: fix case where all fences are signaled.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
2016-08-11 15:33:24 +05:30
..
android dma-buf/sync_file: refactor fence storage in struct sync_file 2016-08-11 15:33:24 +05:30
board
clocking-wizard
comedi staging: comedi: avoid using timeval 2016-06-17 21:14:34 -07:00
dgnc Staging and IIO driver update for 4.7-rc1 2016-05-20 22:20:48 -07:00
emxx_udc staging: emxx_udc: allow modular build 2016-07-26 08:47:08 -07:00
fbtft
fsl-mc staging: fsl-mc: convert mc command build/parse to use C structs 2016-06-26 17:14:03 -07:00
fwserial Staging and IIO driver update for 4.7-rc1 2016-05-20 22:20:48 -07:00
gdm724x staging/gdm724x: fix "alignment should match open parenthesis" issues 2016-05-09 14:25:52 +02:00
goldfish
gs_fpgaboot
i4l staging: i4l: act2000: remove extra space 2016-05-01 14:33:34 -07:00
iio Third set of IIO new device support, features and cleanups for the 4.8 cycle. 2016-07-14 12:05:29 +09:00
ks7010 staging: ks7010: remove bogus NULL checks 2016-06-18 19:47:00 -07:00
lustre Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-08-07 10:01:14 -04:00
media [media] cec: fix off-by-one memset 2016-07-28 20:16:35 -03:00
most
mt29f_spinand staging: mt29f_spinand: set ECC algorithm explicitly 2016-05-05 23:52:04 +02:00
netlogic
nvec
octeon
octeon-usb
olpc_dcon
rtl8188eu Revert "Staging: rtl8188eu: rtw_efuse: Use sizeof type *pointer instead of sizeof type." 2016-06-17 11:21:45 -07:00
rtl8192e treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
rtl8192u rtl8192u: Remove unused semaphore rf_sem 2016-06-18 19:50:48 -07:00
rtl8712 rtl8712: Fixed alignment to match open parenthesis 2016-05-01 13:57:12 -07:00
rtl8723au nl80211: support beacon report scanning 2016-07-06 14:51:31 +02:00
rts5208
skein staging: skein: cleanup: align code to parentheses 2016-05-03 14:07:11 -07:00
slicoss
sm750fb
speakup Staging and IIO driver update for 4.7-rc1 2016-05-20 22:20:48 -07:00
unisys staging: unisys: visornic: change return statements 2016-06-07 22:58:16 -07:00
vme Staging and IIO driver update for 4.7-rc1 2016-05-20 22:20:48 -07:00
vt6655 Staging and IIO driver update for 4.7-rc1 2016-05-20 22:20:48 -07:00
vt6656 Staging and IIO driver update for 4.7-rc1 2016-05-20 22:20:48 -07:00
wilc1000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-07-27 12:03:20 -07:00
wlan-ng nl80211: support beacon report scanning 2016-07-06 14:51:31 +02:00
xgifb
Kconfig staging: ks7010: add driver from Nanonote extra-repository 2016-06-07 22:42:53 -07:00
Makefile staging: ks7010: add driver from Nanonote extra-repository 2016-06-07 22:42:53 -07:00