* [PATCH] nvmem: core: fix nvmem_cell_write inline function
@ 2019-09-08 12:10 Sebastian Reichel
2019-09-09 9:26 ` Nandor Han
2019-09-17 7:57 ` Arnd Bergmann
0 siblings, 2 replies; 6+ messages in thread
From: Sebastian Reichel @ 2019-09-08 12:10 UTC (permalink / raw)
To: Srinivas Kandagatla
Cc: Sebastian Reichel, kbuild test robot, Han Nandor, linux-kernel
From: Sebastian Reichel <sebastian.reichel@collabora.com>
nvmem_cell_write's buf argument uses different types based on
the configuration of CONFIG_NVMEM. The function prototype for
enabled NVMEM uses 'void *' type, but the static dummy function
for disabled NVMEM uses 'const char *' instead. Fix the different
behaviour by always expecting a 'void *' typed buf argument.
Fixes: 7a78a7f7695b ("power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface")
Reported-by: kbuild test robot <lkp@intel.com>
Cc: Han Nandor <nandor.han@vaisala.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
include/linux/nvmem-consumer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
index 8f8be5b00060..5c17cb733224 100644
--- a/include/linux/nvmem-consumer.h
+++ b/include/linux/nvmem-consumer.h
@@ -118,7 +118,7 @@ static inline void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len)
}
static inline int nvmem_cell_write(struct nvmem_cell *cell,
- const char *buf, size_t len)
+ void *buf, size_t len)
{
return -EOPNOTSUPP;
}
--
2.23.0.rc1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] nvmem: core: fix nvmem_cell_write inline function
2019-09-08 12:10 [PATCH] nvmem: core: fix nvmem_cell_write inline function Sebastian Reichel
@ 2019-09-09 9:26 ` Nandor Han
2019-09-09 10:18 ` Sebastian Reichel
2019-09-17 7:57 ` Arnd Bergmann
1 sibling, 1 reply; 6+ messages in thread
From: Nandor Han @ 2019-09-09 9:26 UTC (permalink / raw)
To: Sebastian Reichel, Srinivas Kandagatla
Cc: Sebastian Reichel, kbuild test robot, linux-kernel
On 9/8/19 3:10 PM, Sebastian Reichel wrote:
> From: Sebastian Reichel <sebastian.reichel@collabora.com>
>
> nvmem_cell_write's buf argument uses different types based on
> the configuration of CONFIG_NVMEM. The function prototype for
> enabled NVMEM uses 'void *' type, but the static dummy function
> for disabled NVMEM uses 'const char *' instead. Fix the different
> behaviour by always expecting a 'void *' typed buf argument.
>
> Fixes: 7a78a7f7695b ("power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface")
> Reported-by: kbuild test robot <lkp@intel.com>
> Cc: Han Nandor <nandor.han@vaisala.com>
> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---
> include/linux/nvmem-consumer.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
> index 8f8be5b00060..5c17cb733224 100644
> --- a/include/linux/nvmem-consumer.h
> +++ b/include/linux/nvmem-consumer.h
> @@ -118,7 +118,7 @@ static inline void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len)
> }
>
> static inline int nvmem_cell_write(struct nvmem_cell *cell,
> - const char *buf, size_t len)
> + void *buf, size_t len)
nitpick: alignment issue?
Review-By: Han Nandor <nandor.han@vaisala.com>
Nandor
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] nvmem: core: fix nvmem_cell_write inline function
2019-09-09 9:26 ` Nandor Han
@ 2019-09-09 10:18 ` Sebastian Reichel
2019-09-09 12:00 ` Nandor Han
0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Reichel @ 2019-09-09 10:18 UTC (permalink / raw)
To: Nandor Han; +Cc: Srinivas Kandagatla, kbuild test robot, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1778 bytes --]
Hi,
On Mon, Sep 09, 2019 at 12:26:06PM +0300, Nandor Han wrote:
> On 9/8/19 3:10 PM, Sebastian Reichel wrote:
> > From: Sebastian Reichel <sebastian.reichel@collabora.com>
> >
> > nvmem_cell_write's buf argument uses different types based on
> > the configuration of CONFIG_NVMEM. The function prototype for
> > enabled NVMEM uses 'void *' type, but the static dummy function
> > for disabled NVMEM uses 'const char *' instead. Fix the different
> > behaviour by always expecting a 'void *' typed buf argument.
> >
> > Fixes: 7a78a7f7695b ("power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface")
> > Reported-by: kbuild test robot <lkp@intel.com>
> > Cc: Han Nandor <nandor.han@vaisala.com>
> > Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> > Cc: linux-kernel@vger.kernel.org
> > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> > ---
> > include/linux/nvmem-consumer.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
> > index 8f8be5b00060..5c17cb733224 100644
> > --- a/include/linux/nvmem-consumer.h
> > +++ b/include/linux/nvmem-consumer.h
> > @@ -118,7 +118,7 @@ static inline void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len)
> > }
> > static inline int nvmem_cell_write(struct nvmem_cell *cell,
> > - const char *buf, size_t len)
> > + void *buf, size_t len)
>
> nitpick: alignment issue?
This actually fixes the alignment issue as a side-effect.
I guess I should have mentioned it in the changelog.
> Review-By: Han Nandor <nandor.han@vaisala.com>
I suppose you meant to write "Reviewed-by" instead of inventing your
own tag?
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] nvmem: core: fix nvmem_cell_write inline function
2019-09-09 10:18 ` Sebastian Reichel
@ 2019-09-09 12:00 ` Nandor Han
0 siblings, 0 replies; 6+ messages in thread
From: Nandor Han @ 2019-09-09 12:00 UTC (permalink / raw)
To: Sebastian Reichel; +Cc: Srinivas Kandagatla, kbuild test robot, linux-kernel
On 9/9/19 1:18 PM, Sebastian Reichel wrote:
> Hi,
>
> On Mon, Sep 09, 2019 at 12:26:06PM +0300, Nandor Han wrote:
>> On 9/8/19 3:10 PM, Sebastian Reichel wrote:
>>> From: Sebastian Reichel <sebastian.reichel@collabora.com>
>>>
>>> nvmem_cell_write's buf argument uses different types based on
>>> the configuration of CONFIG_NVMEM. The function prototype for
>>> enabled NVMEM uses 'void *' type, but the static dummy function
>>> for disabled NVMEM uses 'const char *' instead. Fix the different
>>> behaviour by always expecting a 'void *' typed buf argument.
>>>
>>> Fixes: 7a78a7f7695b ("power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface")
>>> Reported-by: kbuild test robot <lkp@intel.com>
>>> Cc: Han Nandor <nandor.han@vaisala.com>
>>> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>>> Cc: linux-kernel@vger.kernel.org
>>> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
>>> ---
>>> include/linux/nvmem-consumer.h | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
>>> index 8f8be5b00060..5c17cb733224 100644
>>> --- a/include/linux/nvmem-consumer.h
>>> +++ b/include/linux/nvmem-consumer.h
>>> @@ -118,7 +118,7 @@ static inline void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len)
>>> }
>>> static inline int nvmem_cell_write(struct nvmem_cell *cell,
>>> - const char *buf, size_t len)
>>> + void *buf, size_t len)
>>
>> nitpick: alignment issue?
>
> This actually fixes the alignment issue as a side-effect.
> I guess I should have mentioned it in the changelog.
>
>> Review-By: Han Nandor <nandor.han@vaisala.com>
>
> I suppose you meant to write "Reviewed-by" instead of inventing your
> own tag?
>
Yes :)
Nandor
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] nvmem: core: fix nvmem_cell_write inline function
2019-09-08 12:10 [PATCH] nvmem: core: fix nvmem_cell_write inline function Sebastian Reichel
2019-09-09 9:26 ` Nandor Han
@ 2019-09-17 7:57 ` Arnd Bergmann
2019-09-17 8:20 ` Srinivas Kandagatla
1 sibling, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2019-09-17 7:57 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Srinivas Kandagatla, Sebastian Reichel, kbuild test robot,
Han Nandor, linux-kernel@vger.kernel.org
On Mon, Sep 9, 2019 at 3:45 PM Sebastian Reichel <sre@kernel.org> wrote:
>
> From: Sebastian Reichel <sebastian.reichel@collabora.com>
>
> nvmem_cell_write's buf argument uses different types based on
> the configuration of CONFIG_NVMEM. The function prototype for
> enabled NVMEM uses 'void *' type, but the static dummy function
> for disabled NVMEM uses 'const char *' instead. Fix the different
> behaviour by always expecting a 'void *' typed buf argument.
>
> Fixes: 7a78a7f7695b ("power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface")
> Reported-by: kbuild test robot <lkp@intel.com>
> Cc: Han Nandor <nandor.han@vaisala.com>
> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
I still see the issue in linux-next, did this get dropped by accident?
Arnd
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] nvmem: core: fix nvmem_cell_write inline function
2019-09-17 7:57 ` Arnd Bergmann
@ 2019-09-17 8:20 ` Srinivas Kandagatla
0 siblings, 0 replies; 6+ messages in thread
From: Srinivas Kandagatla @ 2019-09-17 8:20 UTC (permalink / raw)
To: Arnd Bergmann, Sebastian Reichel
Cc: Sebastian Reichel, kbuild test robot, Han Nandor,
linux-kernel@vger.kernel.org
On 17/09/2019 08:57, Arnd Bergmann wrote:
> On Mon, Sep 9, 2019 at 3:45 PM Sebastian Reichel <sre@kernel.org> wrote:
>>
>> From: Sebastian Reichel <sebastian.reichel@collabora.com>
>>
>> nvmem_cell_write's buf argument uses different types based on
>> the configuration of CONFIG_NVMEM. The function prototype for
>> enabled NVMEM uses 'void *' type, but the static dummy function
>> for disabled NVMEM uses 'const char *' instead. Fix the different
>> behaviour by always expecting a 'void *' typed buf argument.
>>
>> Fixes: 7a78a7f7695b ("power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface")
>> Reported-by: kbuild test robot <lkp@intel.com>
>> Cc: Han Nandor <nandor.han@vaisala.com>
>> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>> Cc: linux-kernel@vger.kernel.org
>> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
>
> I still see the issue in linux-next, did this get dropped by accident?
>
I just pushed it to nvmem tree, should be fixed in next soon!
--srini
> Arnd
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-09-17 8:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-08 12:10 [PATCH] nvmem: core: fix nvmem_cell_write inline function Sebastian Reichel
2019-09-09 9:26 ` Nandor Han
2019-09-09 10:18 ` Sebastian Reichel
2019-09-09 12:00 ` Nandor Han
2019-09-17 7:57 ` Arnd Bergmann
2019-09-17 8:20 ` Srinivas Kandagatla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox