> There is a place holder zero length array in this driver. > But since the structure is embedded in other structures, > it could not have been safely used anyway. > There doesn't appear to be any uses of it in the current code. > > Signed-off-by: Stephen Hemminger <step...@networkplumber.org> > --- > drivers/common/dpaax/caamflib/desc/ipsec.h | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/common/dpaax/caamflib/desc/ipsec.h > b/drivers/common/dpaax/caamflib/desc/ipsec.h > index 95fc3ea5ba3b..9d59b93292f9 100644 > --- a/drivers/common/dpaax/caamflib/desc/ipsec.h > +++ b/drivers/common/dpaax/caamflib/desc/ipsec.h > @@ -336,7 +336,6 @@ struct ipsec_encap_gcm { > * @ip_hdr_len: optional IP Header length (in bytes) > * reserved - 16b > * Opt. IP Hdr Len - 16b > - * @ip_hdr: optional IP Header content (only for IPsec legacy mode) > */ > struct ipsec_encap_pdb { > uint32_t options; > @@ -350,7 +349,6 @@ struct ipsec_encap_pdb { > }; > uint32_t spi; > uint32_t ip_hdr_len; > - uint8_t ip_hdr[0]; [Hemant] This should be replaced with uint8_t ip_hdr[]; > }; > > static inline unsigned int > @@ -776,7 +774,7 @@ cnstr_shdsc_ipsec_encap(uint32_t *descbuf, bool ps, > bool swap, > PROGRAM_SET_36BIT_ADDR(p); > phdr = SHR_HDR(p, share, hdr, 0); > __rta_copy_ipsec_encap_pdb(p, pdb, cipherdata->algtype); > - COPY_DATA(p, pdb->ip_hdr, pdb->ip_hdr_len); > + [Hemant] Don't remove it. It will break the code.
> SET_LABEL(p, hdr); > pkeyjmp = JUMP(p, keyjmp, LOCAL_JUMP, ALL_TRUE, BOTH|SHRD); > if (authdata->keylen) > @@ -913,7 +911,7 @@ cnstr_shdsc_ipsec_encap_des_aes_xcbc(uint32_t > *descbuf, > PROGRAM_CNTXT_INIT(p, descbuf, 0); > phdr = SHR_HDR(p, share, hdr, 0); > __rta_copy_ipsec_encap_pdb(p, pdb, cipherdata->algtype); > - COPY_DATA(p, pdb->ip_hdr, pdb->ip_hdr_len); > + [Hemant] Don't remove it > SET_LABEL(p, hdr); > pkeyjump = JUMP(p, keyjump, LOCAL_JUMP, ALL_TRUE, SHRD | > SELF); > /* > -- > 2.42.0