Hi Ioana, > -----Original Message----- > From: Ioana Ciornei <ioana.cior...@nxp.com> > Sent: Wednesday, September 16, 2020 10:33 PM > To: Y.b. Lu <yangbo...@nxp.com>; netdev@vger.kernel.org > Cc: Y.b. Lu <yangbo...@nxp.com>; David S . Miller <da...@davemloft.net>; > Jakub Kicinski <k...@kernel.org>; Ioana Ciocoi Radulescu > <ruxandra.radule...@nxp.com>; Richard Cochran > <richardcoch...@gmail.com> > Subject: RE: [v3, 6/6] dpaa2-eth: fix a build warning in dpmac.c > > > > Subject: [v3, 6/6] dpaa2-eth: fix a build warning in dpmac.c > > > > Fix below sparse warning in dpmac.c. > > warning: cast to restricted __le64 > > > > Signed-off-by: Yangbo Lu <yangbo...@nxp.com> > > --- > > Changes for v3: > > - Added this patch. > > --- > > drivers/net/ethernet/freescale/dpaa2/dpmac.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/ethernet/freescale/dpaa2/dpmac.c > > b/drivers/net/ethernet/freescale/dpaa2/dpmac.c > > index d5997b6..71f165c 100644 > > --- a/drivers/net/ethernet/freescale/dpaa2/dpmac.c > > +++ b/drivers/net/ethernet/freescale/dpaa2/dpmac.c > > @@ -177,7 +177,7 @@ int dpmac_get_counter(struct fsl_mc_io *mc_io, > u32 > > cmd_flags, u16 token, > > return err; > > > > dpmac_rsp = (struct dpmac_rsp_get_counter *)cmd.params; > > - *value = le64_to_cpu(dpmac_rsp->counter); > > + *value = dpmac_rsp->counter; > > > > Hi Yangbo, > > The proper fix for this is to define as __le64 the counter in the > dpmac_rsp_get_counter structure as below: > > --- a/drivers/net/ethernet/freescale/dpaa2/dpmac-cmd.h > +++ b/drivers/net/ethernet/freescale/dpaa2/dpmac-cmd.h > @@ -67,7 +67,7 @@ struct dpmac_cmd_get_counter { > > struct dpmac_rsp_get_counter { > u64 pad; > - u64 counter; > + __le64 counter; > }; > > Also, if you feel like this is not really part of the series I can take it > and send the > patch separately.
Thank you. Let me send the fix for v2 separately. > > Thanks, > Ioana > > > return 0; > > } > > -- > > 2.7.4