lkml.org 
[lkml]   [2019]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 3/9] fsl/fman: backup and restore ICID registers
From
From: laurentiu.tudor@nxp.com
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.

\
 
 \ /
  Last update: 2019-04-27 18:20    [W:0.180 / U:1.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site