Re: [PATCH v8 13/25] m68k: Dispatch nvram_ops calls to Atari or Mac functions

2018-12-29 Thread Finn Thain
On Sat, 29 Dec 2018, Arnd Bergmann wrote: > On Wed, Dec 26, 2018 at 1:43 AM Finn Thain wrote: > > > + > > +static ssize_t m68k_nvram_get_size(void) > > +{ > > + if (MACH_IS_ATARI) > > + return atari_nvram_get_size(); > > + else if (MACH_IS_MAC) > > +

Re: [PATCH v8 18/25] powerpc: Implement nvram sync ioctl

2018-12-29 Thread Finn Thain
On Sat, 29 Dec 2018, Arnd Bergmann wrote: > > --- a/drivers/char/nvram.c > > +++ b/drivers/char/nvram.c > > @@ -48,6 +48,10 @@ > > #include > > #include > > > > +#ifdef CONFIG_PPC > > +#include > > +#include > > +#endif > > > > static DEFINE_MUTEX(nvram_mutex); > > static

Re: [PATCH v8 00/25] Re-use nvram module

2018-12-29 Thread Finn Thain
On Sun, 30 Dec 2018, I wrote: > > I'm not opposed to exported functions in place of a singleton ops > struct. Other things being equal I'm inclined toward the ops struct, > perhaps because I like encapsulation or perhaps because I don't like > excess generality. (That design decision was made

Re: [PATCH v8 24/25] powerpc: Adopt nvram module for PPC64

2018-12-29 Thread Finn Thain
On Sat, 29 Dec 2018, Arnd Bergmann wrote: > On Wed, Dec 26, 2018 at 1:43 AM Finn Thain wrote: > > > +static ssize_t ppc_nvram_get_size(void) > > +{ > > + if (ppc_md.nvram_size) > > + return ppc_md.nvram_size(); > > + return -ENODEV; > > +} > > > +const struct

Re: [PATCH v8 00/25] Re-use nvram module

2018-12-29 Thread Finn Thain
On Sat, 29 Dec 2018, Arnd Bergmann wrote: > I had a look at the complete series now, and I think this is a great > cleanup. I replied with a couple of minor comments that you may or may > not want to address first. > Thanks for reviewing this. > The one thing I would like to see resolved (I

Re: [PATCH v8 20/25] powerpc, fbdev: Use arch_nvram_ops methods instead of nvram_read_byte() and nvram_write_byte()

2018-12-29 Thread Finn Thain
On Sat, 29 Dec 2018, LEROY Christophe wrote: > Finn Thain a ?crit?: > > > Make use of arch_nvram_ops in device drivers so that the nvram_* function > > exports can be removed. > > > > Since they are no longer global symbols, rename the PPC32 nvram_* functions > > appropriately. > > > >

Re: [PATCH v8 00/25] Re-use nvram module

2018-12-29 Thread Arnd Bergmann
On Wed, Dec 26, 2018 at 1:43 AM Finn Thain wrote: > This allows for removal of drivers/char/generic_nvram.c as well as some > duplicated code in arch/powerpc/kernel/nvram_64.c. By reducing the number > of /dev/nvram char misc device implementations, the number of bugs and > inconsistencies is

Re: [PATCH v8 24/25] powerpc: Adopt nvram module for PPC64

2018-12-29 Thread Arnd Bergmann
On Wed, Dec 26, 2018 at 1:43 AM Finn Thain wrote: > +static ssize_t ppc_nvram_get_size(void) > +{ > + if (ppc_md.nvram_size) > + return ppc_md.nvram_size(); > + return -ENODEV; > +} > +const struct nvram_ops arch_nvram_ops = { > + .read =

Re: [PATCH v8 13/25] m68k: Dispatch nvram_ops calls to Atari or Mac functions

2018-12-29 Thread Arnd Bergmann
On Wed, Dec 26, 2018 at 1:43 AM Finn Thain wrote: > + > +static ssize_t m68k_nvram_get_size(void) > +{ > + if (MACH_IS_ATARI) > + return atari_nvram_get_size(); > + else if (MACH_IS_MAC) > + return mac_pram_get_size(); > + return -ENODEV; > +} > + >

Re: [PATCH v8 18/25] powerpc: Implement nvram sync ioctl

2018-12-29 Thread Arnd Bergmann
> --- a/drivers/char/nvram.c > +++ b/drivers/char/nvram.c > @@ -48,6 +48,10 @@ > #include > #include > > +#ifdef CONFIG_PPC > +#include > +#include > +#endif > > static DEFINE_MUTEX(nvram_mutex); > static DEFINE_SPINLOCK(nvram_state_lock); > @@ -331,6 +335,37 @@ static long

Re: [PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM

2018-12-29 Thread Arnd Bergmann
On Sat, Dec 29, 2018 at 3:51 AM Michael Schmitz wrote: > > Hi Finn, > > Am 29.12.2018 um 15:34 schrieb Finn Thain: > > On Sat, 29 Dec 2018, Michael Schmitz wrote: > > > >> > >> IS_BUILTIN(CONFIG_NVRAM) is probably what Christophe really meant to > >> suggest. > >> > >> Or (really going out on a

Re: [PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM

2018-12-29 Thread Michael Schmitz
Christophe, Am 30.12.2018 um 05:55 schrieb LEROY Christophe: Michael Schmitz a écrit : Hi Finn, Am 29.12.2018 um 14:06 schrieb Finn Thain: On Fri, 28 Dec 2018, LEROY Christophe wrote: diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c index 89f5154c40b6..99e5729d910d

Re: [PATCH v8 20/25] powerpc, fbdev: Use arch_nvram_ops methods instead of nvram_read_byte() and nvram_write_byte()

2018-12-29 Thread LEROY Christophe
Finn Thain a écrit : Make use of arch_nvram_ops in device drivers so that the nvram_* function exports can be removed. Since they are no longer global symbols, rename the PPC32 nvram_* functions appropriately. Signed-off-by: Finn Thain --- arch/powerpc/kernel/setup_32.c | 8

Re: [PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM

2018-12-29 Thread LEROY Christophe
Michael Schmitz a écrit : Hi Finn, Am 29.12.2018 um 14:06 schrieb Finn Thain: On Fri, 28 Dec 2018, LEROY Christophe wrote: diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c index 89f5154c40b6..99e5729d910d 100644 --- a/drivers/scsi/atari_scsi.c +++

Re: [PATCH] powerpc: Fix -mcpu= options for SPE-only compiler

2018-12-29 Thread Segher Boessenkool
On Thu, Dec 27, 2018 at 02:32:07AM +, Ben Hutchings wrote: > On Wed, 2018-12-26 at 17:45 -0600, Segher Boessenkool wrote: > > Hi! > > > > On Wed, Dec 26, 2018 at 02:15:11PM +, Ben Hutchings wrote: > > > GCC for Debian's "powerpcspe" architecture only supports 32-bit > > > SPE targets, and

[PATCH v4] soc/fsl/qe: fix err handling of ucc_of_parse_tdm

2018-12-29 Thread Peng Hao
From: Wen Yang Currently there are some issues with the ucc_of_parse_tdm function: 1, a possible null pointer dereference in ucc_of_parse_tdm, detected by the semantic patch deref_null.cocci, with the following warning: drivers/soc/fsl/qe/qe_tdm.c:177:21-24: ERROR: pdev is NULL but dereferenced.