Subject: Re: [PATCH net-next v3 2/5] ptp: ocp: add Orolia timecard support

From: Jakub Kicinski <[email-masked]>
Date: Tue, 18 Oct 2022 19:47:32 -0700

On Tue, 18 Oct 2022 12:01:19 +0300 Vadim Fedorenko wrote:
> From: Vadim Fedorenko <[email-masked]>
> 
> This brings in the Orolia timecard support from the GitHub repository.
> The card uses different drivers to provide access to i2c EEPROM and
> firmware SPI flash. And it also has a bit different EEPROM map, but
> other parts of the code are the same and could be reused.

> +static const struct ocp_attr_group art_timecard_groups[];
> +static const struct ocp_sma_op ocp_art_sma_op;

Clang is not on board:

drivers/ptp/ptp_ocp.c:384:32: warning: tentative definition of variable with internal linkage has incomplete non-array type 'const struct ocp_sma_op' [-Wtentative-definition-incomplete-type]
static const struct ocp_sma_op ocp_art_sma_op;
                               ^
drivers/ptp/ptp_ocp.c:349:15: note: forward declaration of 'struct ocp_sma_op'
        const struct ocp_sma_op *sma_op;
                     ^

You may need to throw an extern in there.

Is it not possible to just order things correctly in the first place? 
Is there a dependency cycle?