Re: [PATCH v19 1/2] fpga: lattice-sysconfig-spi: add Lattice sysCONFIG FPGA manager

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2022-10-20 at 09:52:29 +0800, Xu Yilun wrote:
> On 2022-10-19 at 12:10:14 +0300, Ivan Bornyakov wrote:
> > Add support to the FPGA manager for programming Lattice ECP5 FPGA over
> > slave SPI sysCONFIG interface.
> > 
> > sysCONFIG interface core functionality is separate from both ECP5 and
> > SPI specifics, so support for other FPGAs with different port types can
> > be added in the future.
> > 
> > Signed-off-by: Ivan Bornyakov <i.bornyakov@xxxxxxxxxxx>

[...]
 
> > +static int sysconfig_spi_bitstream_burst_init(struct sysconfig_priv *priv)
> > +{
> > +	const u8 lsc_bitstream_burst[] = SYSCONFIG_LSC_BITSTREAM_BURST;
> > +	struct spi_device *spi = to_spi_device(priv->dev);
> > +	struct spi_transfer xfer = {};
> > +	struct spi_message msg;
> > +	size_t buf_len;
> > +	void *buf;
> > +	int ret;
> > +
> > +	buf_len = sizeof(lsc_bitstream_burst);
> > +
> > +	buf = kmalloc(buf_len, GFP_KERNEL);
> > +	if (!buf)
> > +		return -ENOMEM;
> > +
> > +	memcpy(buf, lsc_bitstream_burst, buf_len);

Could you help fix this lkp issue and I could re-apply the patch?

  config: arm-randconfig-c034-20221024 (attached as .config)
  compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0

  If you fix the issue, kindly add following tag where applicable
  | Reported-by: kernel test robot <lkp@xxxxxxxxx>

  cocci warnings: (new ones prefixed by >>)
  >> drivers/fpga/lattice-sysconfig-spi.c:33:7-14: WARNING opportunity for kmemdup


Thanks,
Yilun



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux