[drm:drm-next 1199/1208] drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c:198:26: error: redefinition of 'tinydrm_of_find_backlight'
kbuild test robot
fengguang.wu at intel.com
Thu Feb 23 08:14:32 UTC 2017
tree: git://people.freedesktop.org/~airlied/linux.git drm-next
head: f81fa767077bbc9ac49c61ed97d28de09f3d069d
commit: 9f69eb5c36a644571cca6b2f8dc5f6a7cba04a8b [1199/1208] drm/tinydrm: Add helper functions
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
git checkout 9f69eb5c36a644571cca6b2f8dc5f6a7cba04a8b
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c:198:26: error: redefinition of 'tinydrm_of_find_backlight'
struct backlight_device *tinydrm_of_find_backlight(struct device *dev)
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c:11:0:
include/drm/tinydrm/tinydrm-helpers.h:53:1: note: previous definition of 'tinydrm_of_find_backlight' was here
tinydrm_of_find_backlight(struct device *dev)
^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c:230:5: error: redefinition of 'tinydrm_enable_backlight'
int tinydrm_enable_backlight(struct backlight_device *backlight)
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c:11:0:
include/drm/tinydrm/tinydrm-helpers.h:58:19: note: previous definition of 'tinydrm_enable_backlight' was here
static inline int tinydrm_enable_backlight(struct backlight_device *backlight)
^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c:258:5: error: redefinition of 'tinydrm_disable_backlight'
int tinydrm_disable_backlight(struct backlight_device *backlight)
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c:11:0:
include/drm/tinydrm/tinydrm-helpers.h:64:1: note: previous definition of 'tinydrm_disable_backlight' was here
tinydrm_disable_backlight(struct backlight_device *backlight)
^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/tinydrm_of_find_backlight +198 drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c
192 * Returns:
193 * NULL if there's no backlight property.
194 * Error pointer -EPROBE_DEFER if the DT node is found, but no backlight device
195 * is found.
196 * If the backlight device is found, a pointer to the structure is returned.
197 */
> 198 struct backlight_device *tinydrm_of_find_backlight(struct device *dev)
199 {
200 struct backlight_device *backlight;
201 struct device_node *np;
202
203 np = of_parse_phandle(dev->of_node, "backlight", 0);
204 if (!np)
205 return NULL;
206
207 backlight = of_find_backlight_by_node(np);
208 of_node_put(np);
209
210 if (!backlight)
211 return ERR_PTR(-EPROBE_DEFER);
212
213 if (!backlight->props.brightness) {
214 backlight->props.brightness = backlight->props.max_brightness;
215 DRM_DEBUG_KMS("Backlight brightness set to %d\n",
216 backlight->props.brightness);
217 }
218
219 return backlight;
220 }
221 EXPORT_SYMBOL(tinydrm_of_find_backlight);
222
223 /**
224 * tinydrm_enable_backlight - Enable backlight helper
225 * @backlight: Backlight device
226 *
227 * Returns:
228 * Zero on success, negative error code on failure.
229 */
> 230 int tinydrm_enable_backlight(struct backlight_device *backlight)
231 {
232 unsigned int old_state;
233 int ret;
234
235 if (!backlight)
236 return 0;
237
238 old_state = backlight->props.state;
239 backlight->props.state &= ~BL_CORE_FBBLANK;
240 DRM_DEBUG_KMS("Backlight state: 0x%x -> 0x%x\n", old_state,
241 backlight->props.state);
242
243 ret = backlight_update_status(backlight);
244 if (ret)
245 DRM_ERROR("Failed to enable backlight %d\n", ret);
246
247 return ret;
248 }
249 EXPORT_SYMBOL(tinydrm_enable_backlight);
250
251 /**
252 * tinydrm_disable_backlight - Disable backlight helper
253 * @backlight: Backlight device
254 *
255 * Returns:
256 * Zero on success, negative error code on failure.
257 */
> 258 int tinydrm_disable_backlight(struct backlight_device *backlight)
259 {
260 unsigned int old_state;
261 int ret;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 57998 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170223/9961a7ae/attachment-0001.gz>
More information about the dri-devel
mailing list