Message ID | 20190404133306.27317-2-hegdevasant@linux.vnet.ibm.com |
---|---|
State | Superseded |
Headers | show |
Series | [1/3] libflash/ipmi-hiomap: Fix blocks count issue | expand |
On Fri, 5 Apr 2019, at 00:03, Vasant Hegde wrote: > Cc: Andrew Jeffery <andrew@aj.id.au> > Cc: skiboot-stable@lists.ozlabs.org > Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> > --- > libflash/test/test-ipmi-hiomap.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libflash/test/test-ipmi-hiomap.c > b/libflash/test/test-ipmi-hiomap.c > index dc855c5a1..c4cc76d8c 100644 > --- a/libflash/test/test-ipmi-hiomap.c > +++ b/libflash/test/test-ipmi-hiomap.c > @@ -207,6 +207,7 @@ int64_t lpc_write(enum OpalLPCAddressType addr_type > __attribute__((unused)), > uint32_t data __attribute__((unused)), > uint32_t sz __attribute__((unused))) > { > + assert(sz != 0); Need to drop the __attribute__((unused)) from sz, otherwise it's misleading. > return 0; > } > > -- > 2.14.3 > >
On 04/08/2019 07:35 AM, Andrew Jeffery wrote: > > > On Fri, 5 Apr 2019, at 00:03, Vasant Hegde wrote: >> Cc: Andrew Jeffery <andrew@aj.id.au> >> Cc: skiboot-stable@lists.ozlabs.org >> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> >> --- >> libflash/test/test-ipmi-hiomap.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/libflash/test/test-ipmi-hiomap.c >> b/libflash/test/test-ipmi-hiomap.c >> index dc855c5a1..c4cc76d8c 100644 >> --- a/libflash/test/test-ipmi-hiomap.c >> +++ b/libflash/test/test-ipmi-hiomap.c >> @@ -207,6 +207,7 @@ int64_t lpc_write(enum OpalLPCAddressType addr_type >> __attribute__((unused)), >> uint32_t data __attribute__((unused)), >> uint32_t sz __attribute__((unused))) >> { >> + assert(sz != 0); > > Need to drop the __attribute__((unused)) from sz, otherwise it's misleading. Ah! I missed to remove attribute. Will fix it in v2. Thanks! -Vasant
diff --git a/libflash/test/test-ipmi-hiomap.c b/libflash/test/test-ipmi-hiomap.c index dc855c5a1..c4cc76d8c 100644 --- a/libflash/test/test-ipmi-hiomap.c +++ b/libflash/test/test-ipmi-hiomap.c @@ -207,6 +207,7 @@ int64_t lpc_write(enum OpalLPCAddressType addr_type __attribute__((unused)), uint32_t data __attribute__((unused)), uint32_t sz __attribute__((unused))) { + assert(sz != 0); return 0; }
Cc: Andrew Jeffery <andrew@aj.id.au> Cc: skiboot-stable@lists.ozlabs.org Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> --- libflash/test/test-ipmi-hiomap.c | 1 + 1 file changed, 1 insertion(+)