media: v4l2-subdev.h: v4l2_subdev_call: use temp __sd variable
authorHans Verkuil <hverkuil@xs4all.nl>
Fri, 8 Feb 2019 08:49:23 +0000 (03:49 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 18 Feb 2019 15:58:59 +0000 (10:58 -0500)
commit3d769df5fc32dc3cb12d6ccb61690b09371b8b3f
tree518a7e17f442f7302846cbc3f9b3817086114174
parent5515e414f42bf2769caae15b634004d456658284
media: v4l2-subdev.h: v4l2_subdev_call: use temp __sd variable

The sd argument of this macro can be a more complex expression. Since it
is used 5 times in the macro it can be evaluated that many times as well.

So assign it to a temp variable in the beginning and use that instead.

This also avoids any potential side-effects of evaluating sd.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
include/media/v4l2-subdev.h