Re: [PATCH v2 3/9] fsl/fman: backup and restore ICID registers

From: David Miller
Date: Sat Apr 27 2019 - 12:19:20 EST


From: laurentiu.tudor@xxxxxxx
Date: Sat, 27 Apr 2019 10:10:25 +0300

> @@ -1914,7 +1936,10 @@ static int fman_reset(struct fman *fman)
> static int fman_init(struct fman *fman)
> {
> struct fman_cfg *cfg = NULL;
> - int err = 0, i, count;
> + int err = 0, count;
> +#ifdef CONFIG_PPC
> + int i;
> +#endif
>
> if (is_init_done(fman->cfg))
> return -EINVAL;
> @@ -1934,6 +1959,7 @@ static int fman_init(struct fman *fman)
> memset_io((void __iomem *)(fman->base_addr + CGP_OFFSET), 0,
> fman->state->fm_port_num_of_cg);
>
> +#ifdef CONFIG_PPC
> /* Save LIODN info before FMan reset
> * Skipping non-existent port 0 (i = 1)
> */

Sorry, I'm not OK with littering a networking driver with arch ifdefs
all over the place.

Please create a proper abstraction and set of interfaces.

Thank you.