Re: [18/21] drm/i915: extract intel_runtime_pm.h from intel_drv.h

Jani Nikula
2019-05-22T10:35:01Z

On Tue, 21 May 2019, Nathan Chancellor <natechancellor@gmail.com> wrote:
> Hi Jani,
>
> On Mon, Apr 29, 2019 at 03:29:36PM +0300, Jani Nikula wrote:
>> It used to be handy that we only had a couple of headers, but over time
>> intel_drv.h has become unwieldy. Extract declarations to a separate
>> header file corresponding to the implementation module, clarifying the
>> modularity of the driver.
>>
>> Ensure the new header is self-contained, and do so with minimal further
>> includes, using forward declarations as needed. Include the new header
>> only where needed, and sort the modified include directives while at it
>> and as needed.
>>
>> No functional changes.
>>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>
> <snip>
>
>> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.h b/drivers/gpu/drm/i915/intel_runtime_pm.h
>> new file mode 100644
>> index 000000..692277
>> --- /dev/null
>> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.h
>> @@ -0,0 +1,105 @@
>> +/* SPDX-License-Identifier: MIT */
>> +/*
>> + * Copyright © 2019 Intel Corporation
>> + */
>> +
>> +#ifndef __INTEL_RUNTIME_PM_H__
>> +#define __INTEL_RUNTIME_PM_H__
>> +
>> +#include <linux/stackdepot.h>
>> +#include <linux/types.h>
>> +
>> +struct drm_i915_private;
>> +
>> +typedef depot_stack_handle_t intel_wakeref_t;
>
> Just as an FYI, this particular change causes a slew of clang warnings:
> https://travis-ci.com/ClangBuiltLinux/continuous-integration/jobs/201754420#L2435
>
> I am not sure how exactly you'd like this resolved so I didn't want to
> provide a useless patch. I figured I would let you know about it and
> leave it up to you.

Thanks for the report, fix is [1].

I wonder why gcc allows dupe definitions. *shrug*

BR,
Jani.

[1] http://patchwork.freedesktop.org/patch/msgid/20190522103505.2082-1-jani.nikula@intel.com

--
Jani Nikula, Intel Open Source Graphics Center